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

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

Issue 6708114: Revert 79691 - Move WebUIFactory to chrome/browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 9 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/notifications/balloon_host.h" 5 #include "chrome/browser/notifications/balloon_host.h"
6 6
7 #include "chrome/browser/browser_list.h" 7 #include "chrome/browser/browser_list.h"
8 #include "chrome/browser/extensions/extension_process_manager.h" 8 #include "chrome/browser/extensions/extension_process_manager.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/notifications/balloon.h" 10 #include "chrome/browser/notifications/balloon.h"
11 #include "chrome/browser/notifications/notification.h" 11 #include "chrome/browser/notifications/notification.h"
12 #include "chrome/browser/profiles/profile.h" 12 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/browser/renderer_host/browser_render_process_host.h" 13 #include "chrome/browser/renderer_host/browser_render_process_host.h"
14 #include "chrome/browser/renderer_preferences_util.h" 14 #include "chrome/browser/renderer_preferences_util.h"
15 #include "chrome/browser/ui/webui/chrome_web_ui_factory.h"
16 #include "chrome/common/bindings_policy.h" 15 #include "chrome/common/bindings_policy.h"
17 #include "chrome/common/render_messages.h" 16 #include "chrome/common/render_messages.h"
18 #include "chrome/common/url_constants.h" 17 #include "chrome/common/url_constants.h"
19 #include "content/browser/renderer_host/render_view_host.h" 18 #include "content/browser/renderer_host/render_view_host.h"
20 #include "content/browser/site_instance.h" 19 #include "content/browser/site_instance.h"
21 #include "content/common/notification_service.h" 20 #include "content/common/notification_service.h"
22 #include "content/common/notification_source.h" 21 #include "content/common/notification_source.h"
23 #include "content/common/notification_type.h" 22 #include "content/common/notification_type.h"
24 #include "content/common/renderer_preferences.h" 23 #include "content/common/renderer_preferences.h"
25 #include "content/common/view_messages.h" 24 #include "content/common/view_messages.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 140
142 // RenderViewHostDelegate::View methods implemented to allow links to 141 // RenderViewHostDelegate::View methods implemented to allow links to
143 // open pages in new tabs. 142 // open pages in new tabs.
144 void BalloonHost::CreateNewWindow( 143 void BalloonHost::CreateNewWindow(
145 int route_id, 144 int route_id,
146 const ViewHostMsg_CreateWindow_Params& params) { 145 const ViewHostMsg_CreateWindow_Params& params) {
147 delegate_view_helper_.CreateNewWindow( 146 delegate_view_helper_.CreateNewWindow(
148 route_id, 147 route_id,
149 balloon_->profile(), 148 balloon_->profile(),
150 site_instance_.get(), 149 site_instance_.get(),
151 ChromeWebUIFactory::GetInstance()->GetWebUIType(balloon_->profile(), 150 WebUIFactory::GetWebUIType(balloon_->profile(),
152 balloon_->notification().content_url()), 151 balloon_->notification().content_url()),
153 this, 152 this,
154 params.window_container_type, 153 params.window_container_type,
155 params.frame_name); 154 params.frame_name);
156 } 155 }
157 156
158 void BalloonHost::ShowCreatedWindow(int route_id, 157 void BalloonHost::ShowCreatedWindow(int route_id,
159 WindowOpenDisposition disposition, 158 WindowOpenDisposition disposition,
160 const gfx::Rect& initial_pos, 159 const gfx::Rect& initial_pos,
161 bool user_gesture) { 160 bool user_gesture) {
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 260
262 void BalloonHost::NotifyDisconnect() { 261 void BalloonHost::NotifyDisconnect() {
263 if (!should_notify_on_disconnect_) 262 if (!should_notify_on_disconnect_)
264 return; 263 return;
265 264
266 should_notify_on_disconnect_ = false; 265 should_notify_on_disconnect_ = false;
267 NotificationService::current()->Notify( 266 NotificationService::current()->Notify(
268 NotificationType::NOTIFY_BALLOON_DISCONNECTED, 267 NotificationType::NOTIFY_BALLOON_DISCONNECTED,
269 Source<BalloonHost>(this), NotificationService::NoDetails()); 268 Source<BalloonHost>(this), NotificationService::NoDetails());
270 } 269 }
OLDNEW
« no previous file with comments | « chrome/browser/notifications/balloon_host.h ('k') | chrome/browser/prerender/prerender_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698