OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_DELEGATE_H_ | 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_ | 6 #define EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_DELEGATE_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "components/guest_view/browser/guest_view_base.h" | 9 #include "components/guest_view/browser/guest_view_base.h" |
10 | 10 |
(...skipping 20 matching lines...) Expand all Loading... |
31 | 31 |
32 typedef std::vector<linked_ptr<api::web_view_internal::ContextMenuItem> > | 32 typedef std::vector<linked_ptr<api::web_view_internal::ContextMenuItem> > |
33 MenuItemVector; | 33 MenuItemVector; |
34 | 34 |
35 // Called when context menu operation was handled. | 35 // Called when context menu operation was handled. |
36 virtual bool HandleContextMenu(const content::ContextMenuParams& params) = 0; | 36 virtual bool HandleContextMenu(const content::ContextMenuParams& params) = 0; |
37 | 37 |
38 // Called to attach helpers just after additional initialization is performed. | 38 // Called to attach helpers just after additional initialization is performed. |
39 virtual void OnAttachWebViewHelpers(content::WebContents* contents) = 0; | 39 virtual void OnAttachWebViewHelpers(content::WebContents* contents) = 0; |
40 | 40 |
41 // Called when the guest WebContents commits a provisional load in any frame. | |
42 virtual void OnDidCommitProvisionalLoadForFrame(bool is_main_frame) = 0; | |
43 | |
44 // Called just after additional initialization is performed. | |
45 virtual void OnDidInitialize() = 0; | |
46 | |
47 virtual void OnDocumentLoadedInFrame( | |
48 content::RenderFrameHost* render_frame_host) = 0; | |
49 | |
50 // Called immediately after the guest WebContents has been destroyed. | 41 // Called immediately after the guest WebContents has been destroyed. |
51 virtual void OnGuestDestroyed() = 0; | 42 virtual void OnGuestDestroyed() = 0; |
52 | 43 |
53 // Shows the context menu for the guest. | 44 // Shows the context menu for the guest. |
54 // |items| acts as a filter. This restricts the current context's default | 45 // |items| acts as a filter. This restricts the current context's default |
55 // menu items to contain only the items from |items|. | 46 // menu items to contain only the items from |items|. |
56 // |items| == NULL means no filtering will be applied. | 47 // |items| == NULL means no filtering will be applied. |
57 virtual void OnShowContextMenu( | 48 virtual void OnShowContextMenu( |
58 int request_id, | 49 int request_id, |
59 const MenuItemVector* items) = 0; | 50 const MenuItemVector* items) = 0; |
60 }; | 51 }; |
61 | 52 |
62 } // namespace extensions | 53 } // namespace extensions |
63 | 54 |
64 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_DELEGATE_H_ | 55 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_DELEGATE_H_ |
OLD | NEW |