Skip to content
Permalink
Browse files

refactor: simplify content script injection (#18532)

  • Loading branch information...
nornagon committed Jun 4, 2019
1 parent f80601d commit ed5fb4a720be0afde8f246171cd45b1f8fb3a880
@@ -807,6 +807,14 @@ void App::BrowserChildProcessKilled(
void App::RenderProcessReady(content::RenderProcessHost* host) {
ChildProcessLaunched(content::PROCESS_TYPE_RENDERER,
host->GetProcess().Handle());

// TODO(jeremy): this isn't really the right place to be creating
// `WebContents` instances, but this was implicitly happening before in
// `RenderProcessPreferences`, so this is at least more explicit...
content::WebContents* web_contents =
AtomBrowserClient::Get()->GetWebContentsFromProcessID(host->GetID());
if (web_contents)
WebContents::FromOrCreate(v8::Isolate::GetCurrent(), web_contents);
}

void App::RenderProcessDisconnected(base::ProcessId host_pid) {

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

@@ -5,7 +5,6 @@
// Multiply-included file, no traditional include guard.

#include "base/strings/string16.h"
#include "base/values.h"
#include "content/public/common/common_param_traits.h"
#include "ipc/ipc_message_macros.h"
#include "ui/gfx/geometry/rect_f.h"
@@ -22,6 +21,3 @@ IPC_MESSAGE_ROUTED0(AtomAutofillFrameHostMsg_HidePopup)

IPC_MESSAGE_ROUTED1(AtomAutofillFrameMsg_AcceptSuggestion,
base::string16 /* suggestion */)

// Update renderer process preferences.
IPC_MESSAGE_CONTROL1(AtomMsg_UpdatePreferences, base::ListValue)
@@ -29,43 +29,42 @@
#include "electron/buildflags/buildflags.h"
#include "native_mate/dictionary.h"

#define ELECTRON_BUILTIN_MODULES(V) \
V(atom_browser_app) \
V(atom_browser_auto_updater) \
V(atom_browser_browser_view) \
V(atom_browser_content_tracing) \
V(atom_browser_debugger) \
V(atom_browser_dialog) \
V(atom_browser_download_item) \
V(atom_browser_event) \
V(atom_browser_global_shortcut) \
V(atom_browser_in_app_purchase) \
V(atom_browser_menu) \
V(atom_browser_net) \
V(atom_browser_power_monitor) \
V(atom_browser_power_save_blocker) \
V(atom_browser_protocol) \
V(atom_browser_render_process_preferences) \
V(atom_browser_session) \
V(atom_browser_system_preferences) \
V(atom_browser_top_level_window) \
V(atom_browser_tray) \
V(atom_browser_web_contents) \
V(atom_browser_web_contents_view) \
V(atom_browser_view) \
V(atom_browser_web_view_manager) \
V(atom_browser_window) \
V(atom_common_asar) \
V(atom_common_clipboard) \
V(atom_common_command_line) \
V(atom_common_crash_reporter) \
V(atom_common_features) \
V(atom_common_native_image) \
V(atom_common_notification) \
V(atom_common_screen) \
V(atom_common_shell) \
V(atom_common_v8_util) \
V(atom_renderer_ipc) \
#define ELECTRON_BUILTIN_MODULES(V) \
V(atom_browser_app) \
V(atom_browser_auto_updater) \
V(atom_browser_browser_view) \
V(atom_browser_content_tracing) \
V(atom_browser_debugger) \
V(atom_browser_dialog) \
V(atom_browser_download_item) \
V(atom_browser_event) \
V(atom_browser_global_shortcut) \
V(atom_browser_in_app_purchase) \
V(atom_browser_menu) \
V(atom_browser_net) \
V(atom_browser_power_monitor) \
V(atom_browser_power_save_blocker) \
V(atom_browser_protocol) \
V(atom_browser_session) \
V(atom_browser_system_preferences) \
V(atom_browser_top_level_window) \
V(atom_browser_tray) \
V(atom_browser_web_contents) \
V(atom_browser_web_contents_view) \
V(atom_browser_view) \
V(atom_browser_web_view_manager) \
V(atom_browser_window) \
V(atom_common_asar) \
V(atom_common_clipboard) \
V(atom_common_command_line) \
V(atom_common_crash_reporter) \
V(atom_common_features) \
V(atom_common_native_image) \
V(atom_common_notification) \
V(atom_common_screen) \
V(atom_common_shell) \
V(atom_common_v8_util) \
V(atom_renderer_ipc) \
V(atom_renderer_web_frame)

#define ELECTRON_VIEW_MODULES(V) \

0 comments on commit ed5fb4a

Please sign in to comment.
You can’t perform that action at this time.