Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(603)

Side by Side Diff: extensions/browser/api/web_view/web_view_internal_api.h

Issue 567643002: Moving cleardata extension function. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_API_WEB_VIEW_WEB_VIEW_INTERNAL_API_H_ 5 #ifndef EXTENSIONS_BROWSER_API_WEB_VIEW_WEB_VIEW_INTERNAL_API_H_
6 #define EXTENSIONS_BROWSER_API_WEB_VIEW_WEB_VIEW_INTERNAL_API_H_ 6 #define EXTENSIONS_BROWSER_API_WEB_VIEW_WEB_VIEW_INTERNAL_API_H_
7 7
8 #include "extensions/browser/api/capture_web_contents_function.h" 8 #include "extensions/browser/api/capture_web_contents_function.h"
9 #include "extensions/browser/api/execute_code_function.h" 9 #include "extensions/browser/api/execute_code_function.h"
10 #include "extensions/browser/extension_function.h" 10 #include "extensions/browser/extension_function.h"
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 protected: 314 protected:
315 virtual ~WebViewInternalTerminateFunction(); 315 virtual ~WebViewInternalTerminateFunction();
316 316
317 private: 317 private:
318 // WebViewInternalExtensionFunction implementation. 318 // WebViewInternalExtensionFunction implementation.
319 virtual bool RunAsyncSafe(WebViewGuest* guest) OVERRIDE; 319 virtual bool RunAsyncSafe(WebViewGuest* guest) OVERRIDE;
320 320
321 DISALLOW_COPY_AND_ASSIGN(WebViewInternalTerminateFunction); 321 DISALLOW_COPY_AND_ASSIGN(WebViewInternalTerminateFunction);
322 }; 322 };
323 323
324 class WebViewInternalClearDataFunction
325 : public WebViewInternalExtensionFunction {
326 public:
327 DECLARE_EXTENSION_FUNCTION("webViewInternal.clearData",
328 WEBVIEWINTERNAL_CLEARDATA);
329
330 WebViewInternalClearDataFunction();
331
332 protected:
333 virtual ~WebViewInternalClearDataFunction();
334
335 private:
336 // WebViewInternalExtensionFunction implementation.
337 virtual bool RunAsyncSafe(WebViewGuest* guest) OVERRIDE;
338
339 uint32 GetRemovalMask();
340 void ClearDataDone();
341
342 // Removal start time.
343 base::Time remove_since_;
344 // Removal mask, corresponds to StoragePartition::RemoveDataMask enum.
345 uint32 remove_mask_;
346 // Tracks any data related or parse errors.
347 bool bad_message_;
348
349 DISALLOW_COPY_AND_ASSIGN(WebViewInternalClearDataFunction);
350 };
351
324 } // namespace extensions 352 } // namespace extensions
325 353
326 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_VIEW_WEB_VIEW_INTERNAL_API_H_ 354 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_VIEW_WEB_VIEW_INTERNAL_API_H_
OLDNEW
« no previous file with comments | « chrome/renderer/resources/extensions/web_view.js ('k') | extensions/browser/api/web_view/web_view_internal_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698