Allow only one bookmark to be added for multiple fast starring
[chromium-blink-merge.git] / extensions / browser / guest_view / extension_options / extension_options_guest_delegate.h
blob4052c8b7012841c4d3aff05f06d6e36a7148d018
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 EXTENSIONS_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUEST_DELEGATE_H_
6 #define EXTENSIONS_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUEST_DELEGATE_H_
8 #include "base/macros.h"
10 namespace content {
11 struct ContextMenuParams;
12 struct OpenURLParams;
13 class WebContents;
16 namespace extensions {
18 class ExtensionOptionsGuest;
20 // Interface to handle communication between ExtensionOptionsGuest (in
21 // extensions) with the browser.
22 class ExtensionOptionsGuestDelegate {
23 public:
24 explicit ExtensionOptionsGuestDelegate(ExtensionOptionsGuest* guest);
25 virtual ~ExtensionOptionsGuestDelegate();
27 // Shows the context menu for the guest.
28 // Returns true if the context menu was handled.
29 virtual bool HandleContextMenu(const content::ContextMenuParams& params) = 0;
31 virtual content::WebContents* OpenURLInNewTab(
32 const content::OpenURLParams& params) = 0;
34 ExtensionOptionsGuest* extension_options_guest() const { return guest_; }
36 private:
37 ExtensionOptionsGuest* const guest_;
39 DISALLOW_COPY_AND_ASSIGN(ExtensionOptionsGuestDelegate);
42 } // namespace extensions
44 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUEST_DELEGATE_H_