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 "extensions/browser/guest_view/guest_view_base.h" | 8 #include "extensions/browser/guest_view/guest_view_base.h" |
9 | 9 |
10 namespace content { | 10 namespace content { |
11 class RenderViewHost; | 11 class RenderViewHost; |
12 class WebContents; | 12 class WebContents; |
13 } | 13 } // namespace content |
14 | 14 |
15 namespace extensions { | 15 namespace extensions { |
16 | 16 |
17 namespace api { | 17 namespace api { |
18 namespace web_view_internal{ | 18 namespace web_view_internal { |
19 | 19 |
20 struct ContextMenuItem; | 20 struct ContextMenuItem; |
21 | 21 |
22 } // namespace web_view_internal | 22 } // namespace web_view_internal |
23 } // namespace api | 23 } // namespace api |
24 | 24 |
25 // A delegate class of WebViewGuest that are not a part of chrome. | 25 // A delegate class of WebViewGuest that are not a part of chrome. |
26 class WebViewGuestDelegate { | 26 class WebViewGuestDelegate { |
27 public : | 27 public : |
28 WebViewGuestDelegate(); | 28 WebViewGuestDelegate(); |
29 virtual ~WebViewGuestDelegate(); | 29 virtual ~WebViewGuestDelegate(); |
30 | 30 |
31 typedef std::vector<linked_ptr<api::web_view_internal::ContextMenuItem> > | 31 typedef std::vector<linked_ptr<api::web_view_internal::ContextMenuItem> > |
32 MenuItemVector; | 32 MenuItemVector; |
33 | 33 |
| 34 // Returns the task prefix for <webview>. |
| 35 virtual int GetTaskPrefix() const = 0; |
| 36 |
34 // Returns the current zoom factor. | 37 // Returns the current zoom factor. |
35 virtual double GetZoom() = 0; | 38 virtual double GetZoom() = 0; |
36 | 39 |
37 // Called when context menu operation was handled. | 40 // Called when context menu operation was handled. |
38 virtual bool HandleContextMenu(const content::ContextMenuParams& params) = 0; | 41 virtual bool HandleContextMenu(const content::ContextMenuParams& params) = 0; |
39 | 42 |
40 // Called to attach helpers just after additional initialization is performed. | 43 // Called to attach helpers just after additional initialization is performed. |
41 virtual void OnAttachWebViewHelpers(content::WebContents* contents) = 0; | 44 virtual void OnAttachWebViewHelpers(content::WebContents* contents) = 0; |
42 | 45 |
43 // Called when the guest WebContents commits a provisional load in any frame. | 46 // Called when the guest WebContents commits a provisional load in any frame. |
(...skipping 19 matching lines...) Expand all Loading... |
63 int request_id, | 66 int request_id, |
64 const MenuItemVector* items) = 0; | 67 const MenuItemVector* items) = 0; |
65 | 68 |
66 private: | 69 private: |
67 DISALLOW_COPY_AND_ASSIGN(WebViewGuestDelegate); | 70 DISALLOW_COPY_AND_ASSIGN(WebViewGuestDelegate); |
68 }; | 71 }; |
69 | 72 |
70 } // namespace extensions | 73 } // namespace extensions |
71 | 74 |
72 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_DELEGATE_H_ | 75 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_DELEGATE_H_ |
OLD | NEW |