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" |
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/common/bindings_policy.h" | 15 #include "chrome/common/bindings_policy.h" |
16 #include "chrome/common/render_messages.h" | 16 #include "chrome/common/render_messages.h" |
17 #include "chrome/common/render_messages_params.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" |
| 24 #include "content/common/view_messages.h" |
25 #include "webkit/glue/webpreferences.h" | 25 #include "webkit/glue/webpreferences.h" |
26 | 26 |
27 BalloonHost::BalloonHost(Balloon* balloon) | 27 BalloonHost::BalloonHost(Balloon* balloon) |
28 : render_view_host_(NULL), | 28 : render_view_host_(NULL), |
29 balloon_(balloon), | 29 balloon_(balloon), |
30 initialized_(false), | 30 initialized_(false), |
31 should_notify_on_disconnect_(false), | 31 should_notify_on_disconnect_(false), |
32 enable_web_ui_(false) { | 32 enable_web_ui_(false) { |
33 DCHECK(balloon_); | 33 DCHECK(balloon_); |
34 | 34 |
(...skipping 225 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 |