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 CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_CHROME_WEB_VIEW_GUEST_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_CHROME_WEB_VIEW_GUEST_DELEGATE_H_ |
6 #define CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_CHROME_WEB_VIEW_GUEST_DELEGATE_H_ | 6 #define CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_CHROME_WEB_VIEW_GUEST_DELEGATE_H_ |
7 | 7 |
8 #include "chrome/browser/extensions/api/web_view/chrome_web_view_internal_api.h" | 8 #include "chrome/browser/extensions/api/web_view/chrome_web_view_internal_api.h" |
9 #include "extensions/browser/guest_view/web_view/web_view_guest.h" | 9 #include "extensions/browser/guest_view/web_view/web_view_guest.h" |
10 #include "extensions/browser/guest_view/web_view/web_view_guest_delegate.h" | 10 #include "extensions/browser/guest_view/web_view/web_view_guest_delegate.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 | 21 |
22 namespace extensions { | 22 namespace extensions { |
23 | 23 |
24 class ChromeWebViewGuestDelegate : public WebViewGuestDelegate { | 24 class ChromeWebViewGuestDelegate : public WebViewGuestDelegate { |
25 public : | 25 public : |
26 explicit ChromeWebViewGuestDelegate(WebViewGuest* web_view_guest); | 26 explicit ChromeWebViewGuestDelegate(WebViewGuest* web_view_guest); |
27 ~ChromeWebViewGuestDelegate() override; | 27 ~ChromeWebViewGuestDelegate() override; |
28 | 28 |
29 // WebViewGuestDelegate implementation. | 29 // WebViewGuestDelegate implementation. |
30 bool HandleContextMenu(const content::ContextMenuParams& params) override; | 30 bool HandleContextMenu(const content::ContextMenuParams& params) override; |
31 void OnAttachWebViewHelpers(content::WebContents* contents) override; | |
32 void OnDidInitialize() override; | 31 void OnDidInitialize() override; |
33 void OnGuestDestroyed() override; | 32 void OnGuestDestroyed() override; |
34 void OnShowContextMenu(int request_id, const MenuItemVector* items) override; | 33 void OnShowContextMenu(int request_id, const MenuItemVector* items) override; |
35 | 34 |
36 WebViewGuest* web_view_guest() const { return web_view_guest_; } | 35 WebViewGuest* web_view_guest() const { return web_view_guest_; } |
37 | 36 |
38 private: | 37 private: |
39 content::WebContents* guest_web_contents() const { | 38 content::WebContents* guest_web_contents() const { |
40 return web_view_guest()->web_contents(); | 39 return web_view_guest()->web_contents(); |
41 } | 40 } |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 // destroyed. | 74 // destroyed. |
76 base::WeakPtrFactory<ChromeWebViewGuestDelegate> weak_ptr_factory_; | 75 base::WeakPtrFactory<ChromeWebViewGuestDelegate> weak_ptr_factory_; |
77 | 76 |
78 DISALLOW_COPY_AND_ASSIGN(ChromeWebViewGuestDelegate); | 77 DISALLOW_COPY_AND_ASSIGN(ChromeWebViewGuestDelegate); |
79 }; | 78 }; |
80 | 79 |
81 } // namespace extensions | 80 } // namespace extensions |
82 | 81 |
83 #endif // CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_CHROME_WEB_VIEW_GUEST_DELEGATE_H_ | 82 #endif // CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_CHROME_WEB_VIEW_GUEST_DELEGATE_H_ |
84 | 83 |
OLD | NEW |