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

Side by Side Diff: chrome/browser/notifications/balloon_host.cc

Issue 6880089: Don't hold the installed app in BrowserProcessRenderHost, since that's in content layer now. Ext... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix browser tests Created 9 years, 8 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/isolated_app_apitest.cc ('k') | chrome/browser/profiles/profile.h » ('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/notifications/balloon_host.h" 5 #include "chrome/browser/notifications/balloon_host.h"
6 #include "chrome/browser/extensions/extension_process_manager.h" 6 #include "chrome/browser/extensions/extension_process_manager.h"
7 #include "chrome/browser/extensions/extension_service.h" 7 #include "chrome/browser/extensions/extension_service.h"
8 #include "chrome/browser/notifications/balloon.h" 8 #include "chrome/browser/notifications/balloon.h"
9 #include "chrome/browser/notifications/notification.h" 9 #include "chrome/browser/notifications/notification.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 extension_function_dispatcher_.reset( 199 extension_function_dispatcher_.reset(
200 ExtensionFunctionDispatcher::Create( 200 ExtensionFunctionDispatcher::Create(
201 rvh, this, balloon_->notification().content_url())); 201 rvh, this, balloon_->notification().content_url()));
202 } 202 }
203 if (extension_function_dispatcher_.get()) { 203 if (extension_function_dispatcher_.get()) {
204 rvh->AllowBindings(BindingsPolicy::EXTENSION); 204 rvh->AllowBindings(BindingsPolicy::EXTENSION);
205 rvh->set_is_extension_process(true); 205 rvh->set_is_extension_process(true);
206 const Extension* installed_app = 206 const Extension* installed_app =
207 GetProfile()->GetExtensionService()->GetInstalledApp( 207 GetProfile()->GetExtensionService()->GetInstalledApp(
208 balloon_->notification().content_url()); 208 balloon_->notification().content_url());
209 static_cast<BrowserRenderProcessHost*>(rvh->process())->set_installed_app( 209 if (installed_app) {
210 installed_app); 210 GetProfile()->GetExtensionService()->SetInstalledAppForRenderer(
211 rvh->process()->id(), installed_app);
212 }
211 } else if (enable_web_ui_) { 213 } else if (enable_web_ui_) {
212 rvh->AllowBindings(BindingsPolicy::WEB_UI); 214 rvh->AllowBindings(BindingsPolicy::WEB_UI);
213 } 215 }
214 216
215 // Do platform-specific initialization. 217 // Do platform-specific initialization.
216 render_view_host_ = rvh; 218 render_view_host_ = rvh;
217 InitRenderWidgetHostView(); 219 InitRenderWidgetHostView();
218 DCHECK(render_widget_host_view()); 220 DCHECK(render_widget_host_view());
219 221
220 rvh->set_view(render_widget_host_view()); 222 rvh->set_view(render_widget_host_view());
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 262
261 void BalloonHost::NotifyDisconnect() { 263 void BalloonHost::NotifyDisconnect() {
262 if (!should_notify_on_disconnect_) 264 if (!should_notify_on_disconnect_)
263 return; 265 return;
264 266
265 should_notify_on_disconnect_ = false; 267 should_notify_on_disconnect_ = false;
266 NotificationService::current()->Notify( 268 NotificationService::current()->Notify(
267 NotificationType::NOTIFY_BALLOON_DISCONNECTED, 269 NotificationType::NOTIFY_BALLOON_DISCONNECTED,
268 Source<BalloonHost>(this), NotificationService::NoDetails()); 270 Source<BalloonHost>(this), NotificationService::NoDetails());
269 } 271 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/isolated_app_apitest.cc ('k') | chrome/browser/profiles/profile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698