| 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_UI_VIEWS_EXTENSIONS_EXTENSION_POPUP_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_POPUP_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_POPUP_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_POPUP_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" | 10 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" |
| 11 #include "chrome/browser/ui/views/extensions/extension_view_views.h" | 11 #include "chrome/browser/ui/views/extensions/extension_view_views.h" |
| 12 #include "content/public/browser/notification_observer.h" | 12 #include "content/public/browser/notification_observer.h" |
| 13 #include "content/public/browser/notification_registrar.h" | 13 #include "content/public/browser/notification_registrar.h" |
| 14 #include "ui/views/bubble/bubble_delegate.h" | 14 #include "ui/views/bubble/bubble_delegate.h" |
| 15 #include "ui/wm/public/activation_change_observer.h" | 15 #include "ui/wm/public/activation_change_observer.h" |
| 16 #include "url/gurl.h" | 16 #include "url/gurl.h" |
| 17 | 17 |
| 18 class Browser; |
| 19 class ExtensionViewViews; |
| 18 | 20 |
| 19 class Browser; | |
| 20 namespace views { | 21 namespace views { |
| 21 class Widget; | 22 class Widget; |
| 22 } | 23 } |
| 23 | 24 |
| 24 namespace content { | 25 namespace content { |
| 25 class DevToolsAgentHost; | 26 class DevToolsAgentHost; |
| 26 } | 27 } |
| 27 | 28 |
| 28 namespace extensions { | 29 namespace extensions { |
| 29 class ExtensionViewHost; | 30 class ExtensionViewHost; |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 private: | 97 private: |
| 97 ExtensionPopup(extensions::ExtensionViewHost* host, | 98 ExtensionPopup(extensions::ExtensionViewHost* host, |
| 98 views::View* anchor_view, | 99 views::View* anchor_view, |
| 99 views::BubbleBorder::Arrow arrow, | 100 views::BubbleBorder::Arrow arrow, |
| 100 ShowAction show_action); | 101 ShowAction show_action); |
| 101 | 102 |
| 102 // Show the bubble, focus on its content, and register listeners. | 103 // Show the bubble, focus on its content, and register listeners. |
| 103 void ShowBubble(); | 104 void ShowBubble(); |
| 104 | 105 |
| 105 void OnDevToolsStateChanged(content::DevToolsAgentHost*, bool attached); | 106 void OnDevToolsStateChanged(content::DevToolsAgentHost*, bool attached); |
| 107 ExtensionViewViews* GetExtensionView(); |
| 106 | 108 |
| 107 // The contained host for the view. | 109 // The contained host for the view. |
| 108 scoped_ptr<extensions::ExtensionViewHost> host_; | 110 scoped_ptr<extensions::ExtensionViewHost> host_; |
| 109 | 111 |
| 110 // Flag used to indicate if the pop-up should open a devtools window once | 112 // Flag used to indicate if the pop-up should open a devtools window once |
| 111 // it is shown inspecting it. | 113 // it is shown inspecting it. |
| 112 bool inspect_with_devtools_; | 114 bool inspect_with_devtools_; |
| 113 | 115 |
| 114 content::NotificationRegistrar registrar_; | 116 content::NotificationRegistrar registrar_; |
| 115 | 117 |
| 116 base::Callback<void(content::DevToolsAgentHost*, bool)> devtools_callback_; | 118 base::Callback<void(content::DevToolsAgentHost*, bool)> devtools_callback_; |
| 117 | 119 |
| 118 bool widget_initialized_; | 120 bool widget_initialized_; |
| 119 | 121 |
| 120 DISALLOW_COPY_AND_ASSIGN(ExtensionPopup); | 122 DISALLOW_COPY_AND_ASSIGN(ExtensionPopup); |
| 121 }; | 123 }; |
| 122 | 124 |
| 123 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_POPUP_H_ | 125 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_POPUP_H_ |
| OLD | NEW |