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_VIEWS_TOOLBAR_TOOLBAR_ACTION_VIEW_DELEGATE_VIEWS_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_ACTION_VIEW_DELEGATE_VIEWS_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_ACTION_VIEW_DELEGATE_VIEWS_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_ACTION_VIEW_DELEGATE_VIEWS_H_ |
7 | 7 |
8 #include "chrome/browser/ui/toolbar/toolbar_action_view_delegate.h" | 8 #include "chrome/browser/ui/toolbar/toolbar_action_view_delegate.h" |
9 | 9 |
10 namespace views { | 10 namespace views { |
(...skipping 19 matching lines...) Expand all Loading... |
30 // Returns the parent for the associated context menu. | 30 // Returns the parent for the associated context menu. |
31 virtual views::Widget* GetParentForContextMenu() = 0; | 31 virtual views::Widget* GetParentForContextMenu() = 0; |
32 | 32 |
33 // Returns the reference view for the extension action's popup. | 33 // Returns the reference view for the extension action's popup. |
34 virtual views::View* GetReferenceViewForPopup() = 0; | 34 virtual views::View* GetReferenceViewForPopup() = 0; |
35 | 35 |
36 // Returns the MenuButton (if any) to use in showing the context menu (this | 36 // Returns the MenuButton (if any) to use in showing the context menu (this |
37 // allows views code to update the pressed state of the button). | 37 // allows views code to update the pressed state of the button). |
38 virtual views::MenuButton* GetContextMenuButton() = 0; | 38 virtual views::MenuButton* GetContextMenuButton() = 0; |
39 | 39 |
40 // Hides whatever popup is active (even if it's not this one). | |
41 virtual void HideActivePopup() = 0; | |
42 | |
43 // Called when a popup is shown. See ExecuteAction() for the definition of | |
44 // |grant_tab_permissions|. | |
45 virtual void OnPopupShown(bool grant_tab_permissions) {} | |
46 | |
47 // Does any additional cleanup after the popup is closed. | |
48 virtual void CleanupPopup() {} | |
49 | |
50 protected: | 40 protected: |
51 ~ToolbarActionViewDelegateViews() override {} | 41 ~ToolbarActionViewDelegateViews() override {} |
52 }; | 42 }; |
53 | 43 |
54 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_ACTION_VIEW_DELEGATE_VIEWS_H_ | 44 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_ACTION_VIEW_DELEGATE_VIEWS_H_ |
OLD | NEW |