OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTION_VIEW_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTION_VIEW_DELEGATE_H_ |
| 7 |
| 8 class ToolbarActionViewController; |
| 9 |
| 10 namespace content { |
| 11 class WebContents; |
| 12 } |
| 13 |
| 14 // The view that surrounds a ToolbarAction and typically owns the |
| 15 // ToolbarActionViewController. |
| 16 class ToolbarActionViewDelegate { |
| 17 public: |
| 18 // In some cases (such as when an action is shown in a menu), a substitute |
| 19 // ToolbarActionViewController should be used for showing popups. This |
| 20 // returns the preferred controller. |
| 21 virtual ToolbarActionViewController* GetPreferredPopupViewController() = 0; |
| 22 |
| 23 // Returns the current web contents. |
| 24 virtual content::WebContents* GetCurrentWebContents() const = 0; |
| 25 |
| 26 // Updates the view to reflect current state. |
| 27 virtual void UpdateState() = 0; |
| 28 |
| 29 protected: |
| 30 virtual ~ToolbarActionViewDelegate() {} |
| 31 }; |
| 32 |
| 33 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTION_VIEW_DELEGATE_H_ |
OLD | NEW |