| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_NOTIFICATIONS_BALLOON_HOST_H_ | 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_BALLOON_HOST_H_ |
| 6 #define CHROME_BROWSER_NOTIFICATIONS_BALLOON_HOST_H_ | 6 #define CHROME_BROWSER_NOTIFICATIONS_BALLOON_HOST_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "chrome/browser/extensions/extension_function_dispatcher.h" | 14 #include "chrome/browser/extensions/extension_function_dispatcher.h" |
| 15 #include "content/public/browser/notification_registrar.h" | 15 #include "content/public/browser/notification_registrar.h" |
| 16 #include "content/public/browser/render_view_host_delegate.h" | 16 #include "content/public/browser/render_view_host_delegate.h" |
| 17 #include "content/public/browser/web_contents_delegate.h" | 17 #include "content/public/browser/web_contents_delegate.h" |
| 18 #include "content/public/browser/web_contents_observer.h" | 18 #include "content/public/browser/web_contents_observer.h" |
| 19 | 19 |
| 20 class Balloon; | 20 class Balloon; |
| 21 class Browser; | 21 class Browser; |
| 22 |
| 23 namespace content { |
| 22 class SiteInstance; | 24 class SiteInstance; |
| 25 }; |
| 23 | 26 |
| 24 class BalloonHost : public content::WebContentsDelegate, | 27 class BalloonHost : public content::WebContentsDelegate, |
| 25 public content::WebContentsObserver, | 28 public content::WebContentsObserver, |
| 26 public ExtensionFunctionDispatcher::Delegate { | 29 public ExtensionFunctionDispatcher::Delegate { |
| 27 public: | 30 public: |
| 28 explicit BalloonHost(Balloon* balloon); | 31 explicit BalloonHost(Balloon* balloon); |
| 29 | 32 |
| 30 // Initialize the view. | 33 // Initialize the view. |
| 31 void Init(); | 34 void Init(); |
| 32 | 35 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 | 80 |
| 78 // True after Init() has completed. | 81 // True after Init() has completed. |
| 79 bool initialized_; | 82 bool initialized_; |
| 80 | 83 |
| 81 // Indicates whether we should notify about disconnection of this balloon. | 84 // Indicates whether we should notify about disconnection of this balloon. |
| 82 // This is used to ensure disconnection notifications only happen if | 85 // This is used to ensure disconnection notifications only happen if |
| 83 // a connection notification has happened and that they happen only once. | 86 // a connection notification has happened and that they happen only once. |
| 84 bool should_notify_on_disconnect_; | 87 bool should_notify_on_disconnect_; |
| 85 | 88 |
| 86 // Site instance for the balloon/profile, to be used for opening new links. | 89 // Site instance for the balloon/profile, to be used for opening new links. |
| 87 scoped_refptr<SiteInstance> site_instance_; | 90 scoped_refptr<content::SiteInstance> site_instance_; |
| 88 | 91 |
| 89 // A flag to enable Web UI. | 92 // A flag to enable Web UI. |
| 90 bool enable_web_ui_; | 93 bool enable_web_ui_; |
| 91 | 94 |
| 92 ExtensionFunctionDispatcher extension_function_dispatcher_; | 95 ExtensionFunctionDispatcher extension_function_dispatcher_; |
| 93 }; | 96 }; |
| 94 | 97 |
| 95 #endif // CHROME_BROWSER_NOTIFICATIONS_BALLOON_HOST_H_ | 98 #endif // CHROME_BROWSER_NOTIFICATIONS_BALLOON_HOST_H_ |
| OLD | NEW |