| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 'use strict'; | 5 'use strict'; |
| 6 | 6 |
| 7 var dialogSettings = {}; | 7 var dialogSettings = {}; |
| 8 | 8 |
| 9 function mountFileSystem(onSuccess, onError) { | 9 function mountFileSystem(onSuccess, onError) { |
| 10 chrome.fileSystemProvider.getAll(function(mounted) { | 10 chrome.fileSystemProvider.getAll(function(mounted) { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 function() { | 42 function() { |
| 43 if (chrome.runtime.lastError) | 43 if (chrome.runtime.lastError) |
| 44 onError(chrome.runtime.lastError.message); | 44 onError(chrome.runtime.lastError.message); |
| 45 else | 45 else |
| 46 onSuccess(); | 46 onSuccess(); |
| 47 }); | 47 }); |
| 48 }); | 48 }); |
| 49 | 49 |
| 50 chrome.fileSystemProvider.onGetActionsRequested.addListener( | 50 chrome.fileSystemProvider.onGetActionsRequested.addListener( |
| 51 function(options, onSuccess, onError) { | 51 function(options, onSuccess, onError) { |
| 52 onSucces([]); | 52 onSuccess([]); |
| 53 }); | 53 }); |
| 54 | 54 |
| 55 // If the manifest for device or file source is used, then mount a fake file | 55 // If the manifest for device or file source is used, then mount a fake file |
| 56 // system on install. | 56 // system on install. |
| 57 if (chrome.runtime.getManifest().name === "Testing Provider Device" || | 57 if (chrome.runtime.getManifest().name === "Testing Provider Device" || |
| 58 chrome.runtime.getManifest().name === "Testing Provider File") { | 58 chrome.runtime.getManifest().name === "Testing Provider File") { |
| 59 chrome.runtime.onInstalled.addListener(mountFileSystem); | 59 chrome.runtime.onInstalled.addListener(mountFileSystem); |
| 60 } | 60 } |
| OLD | NEW |