Chromium Code Reviews| 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/directory changed notification. | |
|
Vladislav Kaznacheev
2011/11/22 13:16:35
I already added those yesterday:)
dgozman
2011/11/22 14:15:14
Done.
| |
| 63 */ | |
| 64 onFileChanged: { | |
| 65 addListener: function(cb) {} | |
| 66 }, | |
| 67 | |
| 68 /** | |
| 69 * Add watch to file to get onFileChanged events. | |
| 70 */ | |
| 71 addFileWatch: function(url, callback) { | |
| 72 }, | |
| 73 | |
| 74 /** | |
| 75 * Remove watch from file. | |
| 76 */ | |
| 77 removeFileWatch: function(url, callback) { | |
| 78 }, | |
| 79 | |
| 80 /** | |
| 62 * Returns common tasks for a given list of files. | 81 * Returns common tasks for a given list of files. |
| 63 */ | 82 */ |
| 64 getFileTasks: function(urlList, callback) { | 83 getFileTasks: function(urlList, callback) { |
| 65 if (urlList.length == 0) | 84 if (urlList.length == 0) |
| 66 return callback([]); | 85 return callback([]); |
| 67 | 86 |
| 68 // This is how File Manager gets the extension id. | 87 // This is how File Manager gets the extension id. |
| 69 var extensionId = chrome.extension.getURL('').split('/')[2]; | 88 var extensionId = chrome.extension.getURL('').split('/')[2]; |
| 70 | 89 |
| 71 if (!callback) | 90 if (!callback) |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 196 callback({ | 215 callback({ |
| 197 // These two are from locale_settings*.grd | 216 // These two are from locale_settings*.grd |
| 198 WEB_FONT_FAMILY: 'Chrome Droid Sans,Droid Sans Fallback,sans-serif', | 217 WEB_FONT_FAMILY: 'Chrome Droid Sans,Droid Sans Fallback,sans-serif', |
| 199 WEB_FONT_SIZE: '84%', | 218 WEB_FONT_SIZE: '84%', |
| 200 | 219 |
| 201 FILE_IS_DIRECTORY: 'Folder', | 220 FILE_IS_DIRECTORY: 'Folder', |
| 202 PARENT_DIRECTORY: 'Parent Directory', | 221 PARENT_DIRECTORY: 'Parent Directory', |
| 203 | 222 |
| 204 ROOT_DIRECTORY_LABEL: 'Files', | 223 ROOT_DIRECTORY_LABEL: 'Files', |
| 205 DOWNLOADS_DIRECTORY_LABEL: 'File Shelf', | 224 DOWNLOADS_DIRECTORY_LABEL: 'File Shelf', |
| 225 CHROMEBOOK_DIRECTORY_LABEL: 'Chromebook', | |
| 206 DOWNLOADS_DIRECTORY_WARNING: "<strong>Caution:</strong> These files are temporary and may be automatically deleted to free up disk space. < ;a href='javascript://'>Learn More</a>", | 226 DOWNLOADS_DIRECTORY_WARNING: "<strong>Caution:</strong> These files are temporary and may be automatically deleted to free up disk space. < ;a href='javascript://'>Learn More</a>", |
| 207 MEDIA_DIRECTORY_LABEL: 'External Storage', | 227 MEDIA_DIRECTORY_LABEL: 'External Storage', |
| 208 NAME_COLUMN_LABEL: 'Name', | 228 NAME_COLUMN_LABEL: 'Name', |
| 209 SIZE_COLUMN_LABEL: 'Size', | 229 SIZE_COLUMN_LABEL: 'Size', |
| 210 TYPE_COLUMN_LABEL: 'Type', | 230 TYPE_COLUMN_LABEL: 'Type', |
| 211 DATE_COLUMN_LABEL: 'Date', | 231 DATE_COLUMN_LABEL: 'Date', |
| 212 PREVIEW_COLUMN_LABEL: 'Preview', | 232 PREVIEW_COLUMN_LABEL: 'Preview', |
| 213 | 233 |
| 214 ERROR_CREATING_FOLDER: 'Unable to create folder "$1": $2', | 234 ERROR_CREATING_FOLDER: 'Unable to create folder "$1": $2', |
| 215 ERROR_INVALID_CHARACTER: 'Invalid character: $1', | 235 ERROR_INVALID_CHARACTER: 'Invalid character: $1', |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 381 }; | 401 }; |
| 382 | 402 |
| 383 chrome.experimental = { | 403 chrome.experimental = { |
| 384 metrics: { | 404 metrics: { |
| 385 recordValue: function() {}, | 405 recordValue: function() {}, |
| 386 recordMediumCount: function() {}, | 406 recordMediumCount: function() {}, |
| 387 recordTime: function() {}, | 407 recordTime: function() {}, |
| 388 recordUserAction: function() {} | 408 recordUserAction: function() {} |
| 389 } | 409 } |
| 390 }; | 410 }; |
| OLD | NEW |