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

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

Issue 8033001: Delegate decision what site instances can be rendered in what process to chrome (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
« no previous file with comments | « chrome/browser/extensions/extension_process_manager.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 // packaged apps, and hosted component apps use extension bindings. 90 // packaged apps, and hosted component apps use extension bindings.
91 Extension::Type type = extension->GetType(); 91 Extension::Type type = extension->GetType();
92 if (type == Extension::TYPE_EXTENSION || 92 if (type == Extension::TYPE_EXTENSION ||
93 type == Extension::TYPE_USER_SCRIPT || 93 type == Extension::TYPE_USER_SCRIPT ||
94 type == Extension::TYPE_PACKAGED_APP || 94 type == Extension::TYPE_PACKAGED_APP ||
95 (type == Extension::TYPE_HOSTED_APP && 95 (type == Extension::TYPE_HOSTED_APP &&
96 extension->location() == Extension::COMPONENT)) { 96 extension->location() == Extension::COMPONENT)) {
97 render_view_host()->AllowBindings(BindingsPolicy::EXTENSION); 97 render_view_host()->AllowBindings(BindingsPolicy::EXTENSION);
98 ChildProcessSecurityPolicy::GetInstance()->GrantExtensionBindings( 98 ChildProcessSecurityPolicy::GetInstance()->GrantExtensionBindings(
99 render_view_host()->process()->id()); 99 render_view_host()->process()->id());
100 process_manager->RegisterProcessHost(render_view_host()->process()->id());
100 } 101 }
101 } 102 }
102 103
103 void ChromeRenderViewHostObserver::InitRenderViewForExtensions() { 104 void ChromeRenderViewHostObserver::InitRenderViewForExtensions() {
104 const Extension* extension = GetExtension(); 105 const Extension* extension = GetExtension();
105 if (!extension) 106 if (!extension)
106 return; 107 return;
107 108
108 SiteInstance* site_instance = render_view_host()->site_instance(); 109 SiteInstance* site_instance = render_view_host()->site_instance();
109 Profile* profile = Profile::FromBrowserContext( 110 Profile* profile = Profile::FromBrowserContext(
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 } 159 }
159 160
160 void ChromeRenderViewHostObserver::OnDomOperationResponse( 161 void ChromeRenderViewHostObserver::OnDomOperationResponse(
161 const std::string& json_string, int automation_id) { 162 const std::string& json_string, int automation_id) {
162 DomOperationNotificationDetails details(json_string, automation_id); 163 DomOperationNotificationDetails details(json_string, automation_id);
163 NotificationService::current()->Notify( 164 NotificationService::current()->Notify(
164 chrome::NOTIFICATION_DOM_OPERATION_RESPONSE, 165 chrome::NOTIFICATION_DOM_OPERATION_RESPONSE,
165 Source<RenderViewHost>(render_view_host()), 166 Source<RenderViewHost>(render_view_host()),
166 Details<DomOperationNotificationDetails>(&details)); 167 Details<DomOperationNotificationDetails>(&details));
167 } 168 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_process_manager.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698