| 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" |
| 11 | 11 |
| 12 #if defined(OS_CHROMEOS) | 12 #if defined(OS_CHROMEOS) |
| 13 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" | 13 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" |
| 14 #endif | 14 #endif |
| 15 | 15 |
| 16 class RenderViewContextMenuBase; | 16 class RenderViewContextMenuBase; |
| 17 | 17 |
| 18 namespace ui { | 18 namespace ui { |
| 19 class SimpleMenuModel; | 19 class SimpleMenuModel; |
| 20 } // namespace ui | 20 } // namespace ui |
| 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 void ClearCache(base::Time remove_since, |
| 31 const base::Closure& done_callback) override; |
| 30 bool HandleContextMenu(const content::ContextMenuParams& params) override; | 32 bool HandleContextMenu(const content::ContextMenuParams& params) override; |
| 31 void OnAttachWebViewHelpers(content::WebContents* contents) override; | 33 void OnAttachWebViewHelpers(content::WebContents* contents) override; |
| 32 void OnDidCommitProvisionalLoadForFrame(bool is_main_frame) override; | 34 void OnDidCommitProvisionalLoadForFrame(bool is_main_frame) override; |
| 33 void OnDidInitialize() override; | 35 void OnDidInitialize() override; |
| 34 void OnDocumentLoadedInFrame( | 36 void OnDocumentLoadedInFrame( |
| 35 content::RenderFrameHost* render_frame_host) override; | 37 content::RenderFrameHost* render_frame_host) override; |
| 36 void OnGuestDestroyed() override; | 38 void OnGuestDestroyed() override; |
| 37 void OnShowContextMenu(int request_id, const MenuItemVector* items) override; | 39 void OnShowContextMenu(int request_id, const MenuItemVector* items) override; |
| 38 | 40 |
| 39 WebViewGuest* web_view_guest() const { return web_view_guest_; } | 41 WebViewGuest* web_view_guest() const { return web_view_guest_; } |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 // destroyed. | 80 // destroyed. |
| 79 base::WeakPtrFactory<ChromeWebViewGuestDelegate> weak_ptr_factory_; | 81 base::WeakPtrFactory<ChromeWebViewGuestDelegate> weak_ptr_factory_; |
| 80 | 82 |
| 81 DISALLOW_COPY_AND_ASSIGN(ChromeWebViewGuestDelegate); | 83 DISALLOW_COPY_AND_ASSIGN(ChromeWebViewGuestDelegate); |
| 82 }; | 84 }; |
| 83 | 85 |
| 84 } // namespace extensions | 86 } // namespace extensions |
| 85 | 87 |
| 86 #endif // CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_CHROME_WEB_VIEW_GUEST_DELEGATE_H_ | 88 #endif // CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_CHROME_WEB_VIEW_GUEST_DELEGATE_H_ |
| 87 | 89 |
| OLD | NEW |