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

Side by Side Diff: chrome/browser/resources/file_manager/js/mock_chrome.js

Issue 8461009: Fixing exit on 'X' icon in Photo Editor (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/resources/file_manager/js/file_manager.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 /** 5 /**
6 * Mock out the chrome.fileBrowserPrivate API for use in the harness. 6 * Mock out the chrome.fileBrowserPrivate API for use in the harness.
7 */ 7 */
8 chrome.fileBrowserPrivate = { 8 chrome.fileBrowserPrivate = {
9 9
10 /** 10 /**
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 /** 53 /**
54 * Disk mount/unmount notification. 54 * Disk mount/unmount notification.
55 */ 55 */
56 onMountCompleted: { 56 onMountCompleted: {
57 callbacks: [], 57 callbacks: [],
58 addListener: function(cb) { this.callbacks.push(cb) } 58 addListener: function(cb) { this.callbacks.push(cb) }
59 }, 59 },
60 60
61 /** 61 /**
62 * File system change notification.
63 */
64 onFileChanged: {
65 callbacks: [],
66 addListener: function(cb) { this.callbacks.push(cb) }
67 },
68
69 /**
70 * File watchers.
71 */
72 addFileWatch: function(path, callback) { callback(true) },
73
74 removeFileWatch: function(path, callback) { callback(true) },
75
76 /**
62 * Returns common tasks for a given list of files. 77 * Returns common tasks for a given list of files.
63 */ 78 */
64 getFileTasks: function(urlList, callback) { 79 getFileTasks: function(urlList, callback) {
65 if (urlList.length == 0) 80 if (urlList.length == 0)
66 return callback([]); 81 return callback([]);
67 82
68 // This is how File Manager gets the extension id. 83 // This is how File Manager gets the extension id.
69 var extensionId = chrome.extension.getURL('').split('/')[2]; 84 var extensionId = chrome.extension.getURL('').split('/')[2];
70 85
71 if (!callback) 86 if (!callback)
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 }; 396 };
382 397
383 chrome.experimental = { 398 chrome.experimental = {
384 metrics: { 399 metrics: {
385 recordValue: function() {}, 400 recordValue: function() {},
386 recordMediumCount: function() {}, 401 recordMediumCount: function() {},
387 recordTime: function() {}, 402 recordTime: function() {},
388 recordUserAction: function() {} 403 recordUserAction: function() {}
389 } 404 }
390 }; 405 };
OLDNEW
« no previous file with comments | « chrome/browser/resources/file_manager/js/file_manager.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698