OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_EXTENSIONS_EXTENSION_ACTION_VIEW_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_ACTION_VIEW_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_ACTION_VIEW_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_ACTION_VIEW_CONTROLLER_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/scoped_observer.h" | 10 #include "base/scoped_observer.h" |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 PopupShowAction show_action); | 135 PopupShowAction show_action); |
136 | 136 |
137 // Handles cleanup after the popup closes. | 137 // Handles cleanup after the popup closes. |
138 void OnPopupClosed(); | 138 void OnPopupClosed(); |
139 | 139 |
140 // Returns the image source for the icon. | 140 // Returns the image source for the icon. |
141 scoped_ptr<IconWithBadgeImageSource> GetIconImageSource( | 141 scoped_ptr<IconWithBadgeImageSource> GetIconImageSource( |
142 content::WebContents* web_contents, | 142 content::WebContents* web_contents, |
143 const gfx::Size& size); | 143 const gfx::Size& size); |
144 | 144 |
| 145 // Returns true if this extension has a page action and that page action wants |
| 146 // to run on the given |web_contents|. |
| 147 bool PageActionWantsToRun(content::WebContents* web_contents) const; |
| 148 |
| 149 // Returns true if this extension has been blocked on the given |
| 150 // |web_contents|. |
| 151 bool HasBeenBlocked(content::WebContents* web_contents) const; |
| 152 |
145 // The extension associated with the action we're displaying. | 153 // The extension associated with the action we're displaying. |
146 scoped_refptr<const extensions::Extension> extension_; | 154 scoped_refptr<const extensions::Extension> extension_; |
147 | 155 |
148 // The corresponding browser. | 156 // The corresponding browser. |
149 Browser* browser_; | 157 Browser* browser_; |
150 | 158 |
151 // The browser action this view represents. The ExtensionAction is not owned | 159 // The browser action this view represents. The ExtensionAction is not owned |
152 // by this class. | 160 // by this class. |
153 ExtensionAction* extension_action_; | 161 ExtensionAction* extension_action_; |
154 | 162 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 | 194 |
187 ScopedObserver<extensions::ExtensionHost, extensions::ExtensionHostObserver> | 195 ScopedObserver<extensions::ExtensionHost, extensions::ExtensionHostObserver> |
188 popup_host_observer_; | 196 popup_host_observer_; |
189 | 197 |
190 base::WeakPtrFactory<ExtensionActionViewController> weak_factory_; | 198 base::WeakPtrFactory<ExtensionActionViewController> weak_factory_; |
191 | 199 |
192 DISALLOW_COPY_AND_ASSIGN(ExtensionActionViewController); | 200 DISALLOW_COPY_AND_ASSIGN(ExtensionActionViewController); |
193 }; | 201 }; |
194 | 202 |
195 #endif // CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_ACTION_VIEW_CONTROLLER_H_ | 203 #endif // CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_ACTION_VIEW_CONTROLLER_H_ |
OLD | NEW |