Revert of Add button to add new FSP services to Files app. (patchset #8 id:140001...
[chromium-blink-merge.git] / chrome / browser / ui / views / toolbar / toolbar_action_view_delegate_views.h
blob3c3000fe05606073378ea8b6e57a5eff529f59ef
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.
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_
8 #include "chrome/browser/ui/toolbar/toolbar_action_view_delegate.h"
10 namespace views {
11 class FocusManager;
12 class MenuButton;
13 class View;
14 class Widget;
17 // The views-specific methods necessary for a ToolbarActionViewDelegate.
18 class ToolbarActionViewDelegateViews : public ToolbarActionViewDelegate {
19 public:
20 // Returns |this| as a view. We need this because our subclasses implement
21 // different kinds of views, and inheriting View here is a really bad idea.
22 virtual views::View* GetAsView() = 0;
24 // Returns true if this view is being shown inside a menu.
25 virtual bool IsShownInMenu() = 0;
27 // Returns the FocusManager to use when registering accelerators.
28 virtual views::FocusManager* GetFocusManagerForAccelerator() = 0;
30 // Returns the parent for the associated context menu.
31 virtual views::Widget* GetParentForContextMenu() = 0;
33 // Returns the reference view for the extension action's popup.
34 virtual views::View* GetReferenceViewForPopup() = 0;
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).
38 virtual views::MenuButton* GetContextMenuButton() = 0;
40 protected:
41 ~ToolbarActionViewDelegateViews() override {}
44 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_ACTION_VIEW_DELEGATE_VIEWS_H_