| 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_TOOLBAR_TOOLBAR_ACTION_VIEW_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTION_VIEW_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTION_VIEW_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTION_VIEW_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
| 9 #include "ui/gfx/image/image.h" | 9 #include "ui/gfx/image/image.h" |
| 10 | 10 |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 | 83 |
| 84 // Executes the default action (which is typically showing the popup). If | 84 // Executes the default action (which is typically showing the popup). If |
| 85 // |by_user| is true, then this was through a direct user action (as oppposed | 85 // |by_user| is true, then this was through a direct user action (as oppposed |
| 86 // to, e.g., an API call). | 86 // to, e.g., an API call). |
| 87 // Returns true if a popup is shown. | 87 // Returns true if a popup is shown. |
| 88 virtual bool ExecuteAction(bool by_user) = 0; | 88 virtual bool ExecuteAction(bool by_user) = 0; |
| 89 | 89 |
| 90 // Updates the current state of the action. | 90 // Updates the current state of the action. |
| 91 virtual void UpdateState() = 0; | 91 virtual void UpdateState() = 0; |
| 92 | 92 |
| 93 // Returns true if clicking on an otherwise-disabled action should open the |
| 94 // context menu. |
| 95 virtual bool DisabledClickOpensMenu() const = 0; |
| 96 |
| 93 // Registers an accelerator. Called when the view is added to the hierarchy. | 97 // Registers an accelerator. Called when the view is added to the hierarchy. |
| 94 // Unregistering any commands is the responsibility of the controller. | 98 // Unregistering any commands is the responsibility of the controller. |
| 95 virtual void RegisterCommand() { | 99 virtual void RegisterCommand() { |
| 96 } | 100 } |
| 97 }; | 101 }; |
| 98 | 102 |
| 99 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTION_VIEW_CONTROLLER_H_ | 103 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTION_VIEW_CONTROLLER_H_ |
| OLD | NEW |