| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 }; |
| OLD | NEW |