Add new certificateProvider extension API.
[chromium-blink-merge.git] / chrome / browser / ui / toolbar / toolbar_action_view_delegate.h
blob74b99f5997e8095ff3abfa5629ae310791844490
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_TOOLBAR_TOOLBAR_ACTION_VIEW_DELEGATE_H_
6 #define CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTION_VIEW_DELEGATE_H_
8 class ToolbarActionViewController;
10 namespace content {
11 class WebContents;
14 // The view for a ToolbarAction, which is controlled by a
15 // ToolbarActionViewController.
16 class ToolbarActionViewDelegate {
17 public:
18 // Returns the current web contents.
19 virtual content::WebContents* GetCurrentWebContents() const = 0;
21 // Updates the view to reflect current state.
22 virtual void UpdateState() = 0;
24 // Returns true if a context menu is running.
25 virtual bool IsMenuRunning() const = 0;
27 // Called when a popup is shown. If |by_user| is true, then this was through
28 // a direct user action (as oppposed to, e.g., an API call).
29 virtual void OnPopupShown(bool by_user) {}
31 // Called when a popup is closed.
32 virtual void OnPopupClosed() {}
34 protected:
35 virtual ~ToolbarActionViewDelegate() {}
38 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTION_VIEW_DELEGATE_H_