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 "extensions/browser/guest_view/guest_view_base.h" | 9 #include "extensions/browser/guest_view/guest_view_base.h" |
10 | 10 |
(...skipping 14 matching lines...) Expand all Loading... |
25 } // namespace api | 25 } // namespace api |
26 | 26 |
27 // A delegate class of WebViewGuest that are not a part of chrome. | 27 // A delegate class of WebViewGuest that are not a part of chrome. |
28 class WebViewGuestDelegate { | 28 class WebViewGuestDelegate { |
29 public : | 29 public : |
30 virtual ~WebViewGuestDelegate() {} | 30 virtual ~WebViewGuestDelegate() {} |
31 | 31 |
32 typedef std::vector<linked_ptr<api::web_view_internal::ContextMenuItem> > | 32 typedef std::vector<linked_ptr<api::web_view_internal::ContextMenuItem> > |
33 MenuItemVector; | 33 MenuItemVector; |
34 | 34 |
35 // Clears http cache for this guest's StoragePartition. | |
36 virtual void ClearCache(base::Time remove_since, | |
37 const base::Closure& callback) = 0; | |
38 | |
39 // Called when context menu operation was handled. | 35 // Called when context menu operation was handled. |
40 virtual bool HandleContextMenu(const content::ContextMenuParams& params) = 0; | 36 virtual bool HandleContextMenu(const content::ContextMenuParams& params) = 0; |
41 | 37 |
42 // Called to attach helpers just after additional initialization is performed. | 38 // Called to attach helpers just after additional initialization is performed. |
43 virtual void OnAttachWebViewHelpers(content::WebContents* contents) = 0; | 39 virtual void OnAttachWebViewHelpers(content::WebContents* contents) = 0; |
44 | 40 |
45 // Called when the guest WebContents commits a provisional load in any frame. | 41 // Called when the guest WebContents commits a provisional load in any frame. |
46 virtual void OnDidCommitProvisionalLoadForFrame(bool is_main_frame) = 0; | 42 virtual void OnDidCommitProvisionalLoadForFrame(bool is_main_frame) = 0; |
47 | 43 |
48 // Called just after additional initialization is performed. | 44 // Called just after additional initialization is performed. |
(...skipping 10 matching lines...) Expand all Loading... |
59 // menu items to contain only the items from |items|. | 55 // menu items to contain only the items from |items|. |
60 // |items| == NULL means no filtering will be applied. | 56 // |items| == NULL means no filtering will be applied. |
61 virtual void OnShowContextMenu( | 57 virtual void OnShowContextMenu( |
62 int request_id, | 58 int request_id, |
63 const MenuItemVector* items) = 0; | 59 const MenuItemVector* items) = 0; |
64 }; | 60 }; |
65 | 61 |
66 } // namespace extensions | 62 } // namespace extensions |
67 | 63 |
68 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_DELEGATE_H_ | 64 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_DELEGATE_H_ |
OLD | NEW |