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 |
11 namespace extensions { | 11 namespace extensions { |
12 | 12 |
13 namespace api { | |
14 namespace web_view_internal { | |
15 | |
16 struct ContextMenuItem; | |
17 } // namespace web_view_internal | |
18 } // namespace api | |
19 | |
20 // A delegate class of WebViewGuest that are not a part of chrome. | 13 // A delegate class of WebViewGuest that are not a part of chrome. |
21 class WebViewGuestDelegate { | 14 class WebViewGuestDelegate { |
22 public : | 15 public : |
23 virtual ~WebViewGuestDelegate() {} | 16 virtual ~WebViewGuestDelegate() {} |
24 | 17 |
25 // Called when context menu operation was handled. | 18 // Called when context menu operation was handled. |
26 virtual bool HandleContextMenu(const content::ContextMenuParams& params) = 0; | 19 virtual bool HandleContextMenu(const content::ContextMenuParams& params) = 0; |
27 | 20 |
28 // Called just after additional initialization is performed. | 21 // Called just after additional initialization is performed. |
29 virtual void OnDidInitialize() = 0; | 22 virtual void OnDidInitialize() = 0; |
30 | 23 |
31 // Shows the context menu for the guest. | 24 // Shows the context menu for the guest. |
32 virtual void OnShowContextMenu(int request_id) = 0; | 25 virtual void OnShowContextMenu(int request_id) = 0; |
33 | 26 |
34 // Returns true if the WebViewGuest should handle find requests for its | 27 // Returns true if the WebViewGuest should handle find requests for its |
35 // embedder. | 28 // embedder. |
36 virtual bool ShouldHandleFindRequestsForEmbedder() const = 0; | 29 virtual bool ShouldHandleFindRequestsForEmbedder() const = 0; |
37 | 30 |
38 virtual void SetContextMenuPosition(const gfx::Point& position) = 0; | 31 virtual void SetContextMenuPosition(const gfx::Point& position) = 0; |
39 }; | 32 }; |
40 | 33 |
41 } // namespace extensions | 34 } // namespace extensions |
42 | 35 |
43 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_DELEGATE_H_ | 36 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_DELEGATE_H_ |
OLD | NEW |