Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(484)

Side by Side Diff: chrome/browser/renderer_host/chrome_render_view_host_observer.cc

Issue 8113035: Remove RenderProcessHost::is_extension_process (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/renderer_host/chrome_render_view_host_observer.h" 5 #include "chrome/browser/renderer_host/chrome_render_view_host_observer.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/dom_operation_notification_details.h" 8 #include "chrome/browser/dom_operation_notification_details.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/net/predictor.h" 10 #include "chrome/browser/net/predictor.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 if (!extension) 65 if (!extension)
66 return; 66 return;
67 67
68 SiteInstance* site_instance = render_view_host()->site_instance(); 68 SiteInstance* site_instance = render_view_host()->site_instance();
69 Profile* profile = Profile::FromBrowserContext( 69 Profile* profile = Profile::FromBrowserContext(
70 site_instance->browsing_instance()->browser_context()); 70 site_instance->browsing_instance()->browser_context());
71 ExtensionProcessManager* process_manager = 71 ExtensionProcessManager* process_manager =
72 profile->GetExtensionProcessManager(); 72 profile->GetExtensionProcessManager();
73 CHECK(process_manager); 73 CHECK(process_manager);
74 74
75 site_instance->GetProcess()->mark_is_extension_process();
76
77 // Register the association between extension and SiteInstance with 75 // Register the association between extension and SiteInstance with
78 // ExtensionProcessManager. 76 // ExtensionProcessManager.
79 // TODO(creis): Use this to replace SetInstalledAppForRenderer. 77 // TODO(creis): Use this to replace SetInstalledAppForRenderer.
80 process_manager->RegisterExtensionSiteInstance(site_instance, 78 process_manager->RegisterExtensionSiteInstance(site_instance,
81 extension); 79 extension);
82 80
83 if (extension->is_app()) { 81 if (extension->is_app()) {
84 // Record which, if any, installed app is associated with this process. 82 // Record which, if any, installed app is associated with this process.
85 // TODO(aa): Totally lame to store this state in a global map in extension 83 // TODO(aa): Totally lame to store this state in a global map in extension
86 // service. Can we get it from EPM instead? 84 // service. Can we get it from EPM instead?
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 Source<RenderViewHost>(render_view_host()), 152 Source<RenderViewHost>(render_view_host()),
155 Details<DomOperationNotificationDetails>(&details)); 153 Details<DomOperationNotificationDetails>(&details));
156 } 154 }
157 155
158 void ChromeRenderViewHostObserver::OnFocusedEditableNodeTouched() { 156 void ChromeRenderViewHostObserver::OnFocusedEditableNodeTouched() {
159 NotificationService::current()->Notify( 157 NotificationService::current()->Notify(
160 chrome::NOTIFICATION_FOCUSED_EDITABLE_NODE_TOUCHED, 158 chrome::NOTIFICATION_FOCUSED_EDITABLE_NODE_TOUCHED,
161 Source<RenderViewHost>(render_view_host()), 159 Source<RenderViewHost>(render_view_host()),
162 NotificationService::NoDetails()); 160 NotificationService::NoDetails());
163 } 161 }
OLDNEW
« no previous file with comments | « chrome/browser/metrics/metrics_service.cc ('k') | chrome/browser/task_manager/task_manager_resource_providers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698