| 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_PLATFORM_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_ACTION_PLATFORM_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_ACTION_PLATFORM_DELEGATE_H_ | 6 #define CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_ACTION_PLATFORM_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/ui/extensions/extension_action_view_controller.h" | 8 #include "chrome/browser/ui/extensions/extension_action_view_controller.h" |
| 9 | 9 |
| 10 class GURL; | 10 class GURL; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 ExtensionActionViewController* controller); | 23 ExtensionActionViewController* controller); |
| 24 | 24 |
| 25 // The following are forwarded from ToolbarActionViewController. See that | 25 // The following are forwarded from ToolbarActionViewController. See that |
| 26 // class for the definitions. | 26 // class for the definitions. |
| 27 virtual bool IsMenuRunning() const = 0; | 27 virtual bool IsMenuRunning() const = 0; |
| 28 virtual void RegisterCommand() = 0; | 28 virtual void RegisterCommand() = 0; |
| 29 | 29 |
| 30 // Called once the delegate is set, in order to do any extra initialization. | 30 // Called once the delegate is set, in order to do any extra initialization. |
| 31 virtual void OnDelegateSet() = 0; | 31 virtual void OnDelegateSet() = 0; |
| 32 | 32 |
| 33 // Shows the popup for the extension action, given the associated |popup_url|. | 33 // Shows the given |host|. |grant_tab_permissions| is true if active tab |
| 34 // |grant_tab_permissions| is true if active tab permissions should be given | 34 // permissions should be given to the extension; this is only true if the |
| 35 // to the extension; this is only true if the popup is opened through a user | 35 // popup is opened through a user action. |
| 36 // action. | 36 virtual void ShowPopup( |
| 37 // Returns the ExtensionViewHost of the created popup, if a popup is | 37 scoped_ptr<extensions::ExtensionViewHost> host, |
| 38 // successfully shown. | 38 bool grant_tab_permissions, |
| 39 virtual extensions::ExtensionViewHost* ShowPopupWithUrl( | 39 ExtensionActionViewController::PopupShowAction show_action) = 0; |
| 40 ExtensionActionViewController::PopupShowAction show_action, | 40 |
| 41 const GURL& popup_url, | 41 // Closes the overflow menu, if it was open. |
| 42 bool grant_tab_permissions) = 0; | 42 virtual void CloseOverflowMenu() = 0; |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 #endif // CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_ACTION_PLATFORM_DELEGATE_H_ | 45 #endif // CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_ACTION_PLATFORM_DELEGATE_H_ |
| OLD | NEW |