OLD | NEW |
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" |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 | 125 |
126 ViewType::Type BalloonHost::GetRenderViewType() const { | 126 ViewType::Type BalloonHost::GetRenderViewType() const { |
127 return ViewType::NOTIFICATION; | 127 return ViewType::NOTIFICATION; |
128 } | 128 } |
129 | 129 |
130 RenderViewHostDelegate::View* BalloonHost::GetViewDelegate() { | 130 RenderViewHostDelegate::View* BalloonHost::GetViewDelegate() { |
131 return this; | 131 return this; |
132 } | 132 } |
133 | 133 |
134 void BalloonHost::ProcessWebUIMessage( | 134 void BalloonHost::ProcessWebUIMessage( |
135 const ViewHostMsg_DomMessage_Params& params) { | 135 const ExtensionHostMsg_DomMessage_Params& params) { |
136 if (extension_function_dispatcher_.get()) { | 136 if (extension_function_dispatcher_.get()) { |
137 extension_function_dispatcher_->HandleRequest(params); | 137 extension_function_dispatcher_->HandleRequest(params); |
138 } | 138 } |
139 } | 139 } |
140 | 140 |
141 // RenderViewHostDelegate::View methods implemented to allow links to | 141 // RenderViewHostDelegate::View methods implemented to allow links to |
142 // open pages in new tabs. | 142 // open pages in new tabs. |
143 void BalloonHost::CreateNewWindow( | 143 void BalloonHost::CreateNewWindow( |
144 int route_id, | 144 int route_id, |
145 const ViewHostMsg_CreateWindow_Params& params) { | 145 const ViewHostMsg_CreateWindow_Params& params) { |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 | 260 |
261 void BalloonHost::NotifyDisconnect() { | 261 void BalloonHost::NotifyDisconnect() { |
262 if (!should_notify_on_disconnect_) | 262 if (!should_notify_on_disconnect_) |
263 return; | 263 return; |
264 | 264 |
265 should_notify_on_disconnect_ = false; | 265 should_notify_on_disconnect_ = false; |
266 NotificationService::current()->Notify( | 266 NotificationService::current()->Notify( |
267 NotificationType::NOTIFY_BALLOON_DISCONNECTED, | 267 NotificationType::NOTIFY_BALLOON_DISCONNECTED, |
268 Source<BalloonHost>(this), NotificationService::NoDetails()); | 268 Source<BalloonHost>(this), NotificationService::NoDetails()); |
269 } | 269 } |
OLD | NEW |