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