Don't show supervised user as "already on this device" while they're being imported.
[chromium-blink-merge.git] / extensions / browser / guest_view / web_view / web_view_guest_delegate.h
blob0ab06150b38b58ed2670247ae4881b09de16907f
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_WEB_VIEW_WEB_VIEW_GUEST_DELEGATE_H_
6 #define EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_DELEGATE_H_
8 #include "base/callback.h"
9 #include "components/guest_view/browser/guest_view_base.h"
11 namespace content {
12 class RenderViewHost;
13 class WebContents;
14 } // namespace content
16 namespace extensions {
18 class WebViewGuest;
20 namespace api {
21 namespace web_view_internal {
23 struct ContextMenuItem;
24 } // namespace web_view_internal
25 } // namespace api
27 // A delegate class of WebViewGuest that are not a part of chrome.
28 class WebViewGuestDelegate {
29 public :
30 virtual ~WebViewGuestDelegate() {}
32 typedef std::vector<linked_ptr<api::web_view_internal::ContextMenuItem> >
33 MenuItemVector;
35 // Called when context menu operation was handled.
36 virtual bool HandleContextMenu(const content::ContextMenuParams& params) = 0;
38 // Called to attach helpers just after additional initialization is performed.
39 virtual void OnAttachWebViewHelpers(content::WebContents* contents) = 0;
41 // Called immediately after the guest WebContents has been destroyed.
42 virtual void OnGuestDestroyed() = 0;
44 // Shows the context menu for the guest.
45 // |items| acts as a filter. This restricts the current context's default
46 // menu items to contain only the items from |items|.
47 // |items| == NULL means no filtering will be applied.
48 virtual void OnShowContextMenu(
49 int request_id,
50 const MenuItemVector* items) = 0;
53 } // namespace extensions
55 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_DELEGATE_H_