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

Unified Diff: chrome/browser/resources/options/chromeos/storage_clear_drive_cache_overlay.js

Issue 2070893003: Storage manager: Show Google Drive offline files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Correct string and indentation. Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/options/chromeos/storage_clear_drive_cache_overlay.js
diff --git a/chrome/browser/resources/options/chromeos/storage_clear_drive_cache_overlay.js b/chrome/browser/resources/options/chromeos/storage_clear_drive_cache_overlay.js
new file mode 100644
index 0000000000000000000000000000000000000000..38c3072087c5a9fe2cd079045b61f2654a9d78a5
--- /dev/null
+++ b/chrome/browser/resources/options/chromeos/storage_clear_drive_cache_overlay.js
@@ -0,0 +1,37 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+cr.define('options', function() {
+ var Page = cr.ui.pageManager.Page;
+ var PageManager = cr.ui.pageManager.PageManager;
+
+ function StorageClearDriveCacheOverlay() {
+ Page.call(this, 'storageClearDriveCache',
+ loadTimeData.getString('storageClearDriveCachePageTabTitle'),
+ 'clear-drive-cache-overlay-page');
+ }
+
+ cr.addSingletonGetter(StorageClearDriveCacheOverlay);
+
+ StorageClearDriveCacheOverlay.prototype = {
+ __proto__: Page.prototype,
+
+ /** @override */
+ initializePage: function() {
+ Page.prototype.initializePage.call(this);
+
+ $('clear-drive-cache-overlay-delete-button').onclick = function(e) {
+ chrome.send('clearDriveCache');
+ PageManager.closeOverlay();
+ };
+ $('clear-drive-cache-overlay-cancel-button').onclick = function(e) {
+ PageManager.closeOverlay();
+ };
+ },
+ };
+
+ return {
+ StorageClearDriveCacheOverlay: StorageClearDriveCacheOverlay
+ };
+});

Powered by Google App Engine
This is Rietveld 408576698