Chromium Code Reviews| Index: chrome/browser/ui/toolbar/component_action_delegate.h |
| diff --git a/chrome/browser/ui/toolbar/component_action_delegate.h b/chrome/browser/ui/toolbar/component_action_delegate.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..0b2e00e747ae3bf98b2b6d542f29819565902732 |
| --- /dev/null |
| +++ b/chrome/browser/ui/toolbar/component_action_delegate.h |
| @@ -0,0 +1,22 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_UI_TOOLBAR_COMPONENT_ACTION_DELEGATE_H_ |
| +#define CHROME_BROWSER_UI_TOOLBAR_COMPONENT_ACTION_DELEGATE_H_ |
| + |
| +#include <string> |
| + |
| +// Object that knows how to manage component actions in the toolbar model. |
|
imcheng
2017/02/08 22:59:29
s/Object that knows how to manage/Manages
takumif
2017/02/09 00:05:56
Done.
|
| +class ComponentActionDelegate { |
| + public: |
| + // Adds or removes the component action labeled by |action_id| from the |
|
imcheng
2017/02/08 22:59:29
This needs a virtual destructor.
takumif
2017/02/09 00:05:56
Done.
|
| + // toolbar model. The caller will not add the same action twice. |
|
imcheng
2017/02/08 22:59:29
s/will/must
takumif
2017/02/09 00:05:56
Done.
|
| + virtual void AddComponentAction(const std::string& action_id) = 0; |
| + virtual void RemoveComponentAction(const std::string& action_id) = 0; |
| + |
| + // Returns |true| if the toolbar model has an action for |action_id|. |
| + virtual bool HasComponentAction(const std::string& action_id) const = 0; |
| +}; |
| + |
| +#endif // CHROME_BROWSER_UI_TOOLBAR_COMPONENT_ACTION_DELEGATE_H_ |