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

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

Issue 2775003: Added plumbing to transport the frame name between RenderViewHost and the Webkit layer. (Closed)
Patch Set: Final version for the record Created 10 years, 6 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/in_process_webkit/webkit_context.h" 8 #include "chrome/browser/in_process_webkit/webkit_context.h"
9 #include "chrome/browser/extensions/extension_process_manager.h" 9 #include "chrome/browser/extensions/extension_process_manager.h"
10 #include "chrome/browser/notifications/balloon.h" 10 #include "chrome/browser/notifications/balloon.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 if (extension_function_dispatcher_.get()) { 81 if (extension_function_dispatcher_.get()) {
82 extension_function_dispatcher_->HandleRequest( 82 extension_function_dispatcher_->HandleRequest(
83 message, content, source_url, request_id, has_callback); 83 message, content, source_url, request_id, has_callback);
84 } 84 }
85 } 85 }
86 86
87 // RenderViewHostDelegate::View methods implemented to allow links to 87 // RenderViewHostDelegate::View methods implemented to allow links to
88 // open pages in new tabs. 88 // open pages in new tabs.
89 void BalloonHost::CreateNewWindow( 89 void BalloonHost::CreateNewWindow(
90 int route_id, 90 int route_id,
91 WindowContainerType window_container_type) { 91 WindowContainerType window_container_type,
92 const string16& frame_name) {
92 delegate_view_helper_.CreateNewWindow( 93 delegate_view_helper_.CreateNewWindow(
93 route_id, 94 route_id,
94 balloon_->profile(), 95 balloon_->profile(),
95 site_instance_.get(), 96 site_instance_.get(),
96 DOMUIFactory::GetDOMUIType(balloon_->notification().content_url()), 97 DOMUIFactory::GetDOMUIType(balloon_->notification().content_url()),
97 this, 98 this,
98 window_container_type); 99 window_container_type,
100 frame_name);
99 } 101 }
100 102
101 void BalloonHost::ShowCreatedWindow(int route_id, 103 void BalloonHost::ShowCreatedWindow(int route_id,
102 WindowOpenDisposition disposition, 104 WindowOpenDisposition disposition,
103 const gfx::Rect& initial_pos, 105 const gfx::Rect& initial_pos,
104 bool user_gesture) { 106 bool user_gesture) {
105 // Don't allow pop-ups from notifications. 107 // Don't allow pop-ups from notifications.
106 if (disposition == NEW_POPUP) 108 if (disposition == NEW_POPUP)
107 return; 109 return;
108 110
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 rvh->AllowBindings(BindingsPolicy::EXTENSION); 144 rvh->AllowBindings(BindingsPolicy::EXTENSION);
143 rvh->set_is_extension_process(true); 145 rvh->set_is_extension_process(true);
144 } 146 }
145 147
146 // Do platform-specific initialization. 148 // Do platform-specific initialization.
147 render_view_host_ = rvh; 149 render_view_host_ = rvh;
148 InitRenderWidgetHostView(); 150 InitRenderWidgetHostView();
149 DCHECK(render_widget_host_view()); 151 DCHECK(render_widget_host_view());
150 152
151 rvh->set_view(render_widget_host_view()); 153 rvh->set_view(render_widget_host_view());
152 rvh->CreateRenderView(GetProfile()->GetRequestContext()); 154 rvh->CreateRenderView(GetProfile()->GetRequestContext(), string16());
153 rvh->NavigateToURL(balloon_->notification().content_url()); 155 rvh->NavigateToURL(balloon_->notification().content_url());
154 156
155 initialized_ = true; 157 initialized_ = true;
156 } 158 }
157 159
158 void BalloonHost::NotifyDisconnect() { 160 void BalloonHost::NotifyDisconnect() {
159 if (!should_notify_on_disconnect_) 161 if (!should_notify_on_disconnect_)
160 return; 162 return;
161 163
162 should_notify_on_disconnect_ = false; 164 should_notify_on_disconnect_ = false;
163 NotificationService::current()->Notify( 165 NotificationService::current()->Notify(
164 NotificationType::NOTIFY_BALLOON_DISCONNECTED, 166 NotificationType::NOTIFY_BALLOON_DISCONNECTED,
165 Source<BalloonHost>(this), NotificationService::NoDetails()); 167 Source<BalloonHost>(this), NotificationService::NoDetails());
166 } 168 }
OLDNEW
« no previous file with comments | « chrome/browser/notifications/balloon_host.h ('k') | chrome/browser/renderer_host/render_view_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698