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_EXTENSIONS_API_WEB_VIEW_CHROME_WEB_VIEW_INTERNAL_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_WEB_VIEW_CHROME_WEB_VIEW_INTERNAL_API_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_WEB_VIEW_CHROME_WEB_VIEW_INTERNAL_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_WEB_VIEW_CHROME_WEB_VIEW_INTERNAL_API_H_ |
7 | 7 |
8 #include "extensions/browser/api/web_view/web_view_internal_api.h" | 8 #include "extensions/browser/api/web_view/web_view_internal_api.h" |
9 #include "extensions/browser/extension_function.h" | 9 #include "extensions/browser/extension_function.h" |
10 #include "extensions/browser/guest_view/web_view/web_view_guest.h" | 10 #include "extensions/browser/guest_view/web_view/web_view_guest.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 protected: | 76 protected: |
77 virtual ~ChromeWebViewInternalContextMenusRemoveAllFunction() {} | 77 virtual ~ChromeWebViewInternalContextMenusRemoveAllFunction() {} |
78 | 78 |
79 // ExtensionFunction implementation. | 79 // ExtensionFunction implementation. |
80 virtual bool RunAsync() OVERRIDE; | 80 virtual bool RunAsync() OVERRIDE; |
81 | 81 |
82 private: | 82 private: |
83 DISALLOW_COPY_AND_ASSIGN(ChromeWebViewInternalContextMenusRemoveAllFunction); | 83 DISALLOW_COPY_AND_ASSIGN(ChromeWebViewInternalContextMenusRemoveAllFunction); |
84 }; | 84 }; |
85 | 85 |
86 class ChromeWebViewInternalClearDataFunction | |
87 : public WebViewInternalExtensionFunction { | |
88 public: | |
89 DECLARE_EXTENSION_FUNCTION("chromeWebViewInternal.clearData", | |
90 WEBVIEWINTERNAL_CLEARDATA); | |
91 | |
92 ChromeWebViewInternalClearDataFunction(); | |
93 | |
94 protected: | |
95 virtual ~ChromeWebViewInternalClearDataFunction(); | |
96 | |
97 private: | |
98 // WebViewInternalExtensionFunction implementation. | |
99 virtual bool RunAsyncSafe(WebViewGuest* guest) OVERRIDE; | |
100 | |
101 uint32 GetRemovalMask(); | |
102 void ClearDataDone(); | |
103 | |
104 // Removal start time. | |
105 base::Time remove_since_; | |
106 // Removal mask, corresponds to StoragePartition::RemoveDataMask enum. | |
107 uint32 remove_mask_; | |
108 // Tracks any data related or parse errors. | |
109 bool bad_message_; | |
110 | |
111 DISALLOW_COPY_AND_ASSIGN(ChromeWebViewInternalClearDataFunction); | |
112 }; | |
113 | |
114 class ChromeWebViewInternalShowContextMenuFunction | 86 class ChromeWebViewInternalShowContextMenuFunction |
115 : public WebViewInternalExtensionFunction { | 87 : public WebViewInternalExtensionFunction { |
116 public: | 88 public: |
117 DECLARE_EXTENSION_FUNCTION("chromeWebViewInternal.showContextMenu", | 89 DECLARE_EXTENSION_FUNCTION("chromeWebViewInternal.showContextMenu", |
118 WEBVIEWINTERNAL_SHOWCONTEXTMENU); | 90 WEBVIEWINTERNAL_SHOWCONTEXTMENU); |
119 | 91 |
120 ChromeWebViewInternalShowContextMenuFunction(); | 92 ChromeWebViewInternalShowContextMenuFunction(); |
121 | 93 |
122 protected: | 94 protected: |
123 virtual ~ChromeWebViewInternalShowContextMenuFunction(); | 95 virtual ~ChromeWebViewInternalShowContextMenuFunction(); |
124 | 96 |
125 private: | 97 private: |
126 // WebViewInternalExtensionFunction implementation. | 98 // WebViewInternalExtensionFunction implementation. |
127 virtual bool RunAsyncSafe(WebViewGuest* guest) OVERRIDE; | 99 virtual bool RunAsyncSafe(WebViewGuest* guest) OVERRIDE; |
128 | 100 |
129 DISALLOW_COPY_AND_ASSIGN(ChromeWebViewInternalShowContextMenuFunction); | 101 DISALLOW_COPY_AND_ASSIGN(ChromeWebViewInternalShowContextMenuFunction); |
130 }; | 102 }; |
131 | 103 |
132 } // namespace extensions | 104 } // namespace extensions |
133 | 105 |
134 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_VIEW_CHROME_WEB_VIEW_INTERNAL_API_H
_ | 106 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_VIEW_CHROME_WEB_VIEW_INTERNAL_API_H
_ |
OLD | NEW |