From 3a3b05b2f06f108885f11a6c21015117371dd25b Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Wed, 3 Jun 2015 14:53:19 +0800 Subject: [PATCH] Clean up code --- atom/browser/atom_browser_client.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/atom/browser/atom_browser_client.cc b/atom/browser/atom_browser_client.cc index b8f63bc604a3..88aa5b77755c 100644 --- a/atom/browser/atom_browser_client.cc +++ b/atom/browser/atom_browser_client.cc @@ -31,22 +31,23 @@ namespace atom { namespace { -// The default routing id of WebContents, since in Electron a WebContents -// always owns its own RenderProcessHost, this ID is same for every WebContents. +// The default routing id of WebContents. +// In Electron each RenderProcessHost only has one WebContents, so this ID is +// same for every WebContents. int kDefaultRoutingID = 2; // Next navigation should not restart renderer process. bool g_suppress_renderer_process_restart = false; -// Find out the owner of the child process according to child_process_id. +// Find out the owner of the child process according to |process_id|. enum ProcessOwner { OWNER_NATIVE_WINDOW, OWNER_GUEST_WEB_CONTENTS, OWNER_NONE, // it might be devtools though. }; ProcessOwner GetProcessOwner(int process_id, - NativeWindow** window, - WebViewManager::WebViewInfo* info) { + NativeWindow** window, + WebViewManager::WebViewInfo* info) { auto web_contents = content::WebContents::FromRenderViewHost( content::RenderViewHost::FromID(process_id, kDefaultRoutingID)); if (!web_contents)