| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // The file contains the implementation of | 5 // The file contains the implementation of |
| 6 // fileBrowserHandlerInternal.selectFile extension function. | 6 // fileBrowserHandlerInternal.selectFile extension function. |
| 7 // When invoked, the function does the following: | 7 // When invoked, the function does the following: |
| 8 // - Verifies that the extension function was invoked as a result of user | 8 // - Verifies that the extension function was invoked as a result of user |
| 9 // gesture. | 9 // gesture. |
| 10 // - Display 'save as' dialog using FileSelectorImpl which waits for the user | 10 // - Display 'save as' dialog using FileSelectorImpl which waits for the user |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 #include "chrome/browser/ui/chrome_select_file_policy.h" | 44 #include "chrome/browser/ui/chrome_select_file_policy.h" |
| 45 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 45 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 46 #include "chrome/common/extensions/api/file_browser_handler_internal.h" | 46 #include "chrome/common/extensions/api/file_browser_handler_internal.h" |
| 47 #include "content/public/browser/browser_thread.h" | 47 #include "content/public/browser/browser_thread.h" |
| 48 #include "content/public/browser/child_process_security_policy.h" | 48 #include "content/public/browser/child_process_security_policy.h" |
| 49 #include "content/public/browser/render_process_host.h" | 49 #include "content/public/browser/render_process_host.h" |
| 50 #include "content/public/browser/render_view_host.h" | 50 #include "content/public/browser/render_view_host.h" |
| 51 #include "content/public/browser/storage_partition.h" | 51 #include "content/public/browser/storage_partition.h" |
| 52 #include "googleurl/src/gurl.h" | 52 #include "googleurl/src/gurl.h" |
| 53 #include "ui/shell_dialogs/select_file_dialog.h" | 53 #include "ui/shell_dialogs/select_file_dialog.h" |
| 54 #include "webkit/browser/fileapi/file_system_mount_point_provider.h" |
| 54 #include "webkit/fileapi/file_system_context.h" | 55 #include "webkit/fileapi/file_system_context.h" |
| 55 #include "webkit/fileapi/file_system_mount_point_provider.h" | |
| 56 | 56 |
| 57 using content::BrowserContext; | 57 using content::BrowserContext; |
| 58 using content::BrowserThread; | 58 using content::BrowserThread; |
| 59 using extensions::api::file_browser_handler_internal::FileEntryInfo; | 59 using extensions::api::file_browser_handler_internal::FileEntryInfo; |
| 60 using file_handler::FileSelector; | 60 using file_handler::FileSelector; |
| 61 using file_handler::FileSelectorFactory; | 61 using file_handler::FileSelectorFactory; |
| 62 | 62 |
| 63 namespace SelectFile = | 63 namespace SelectFile = |
| 64 extensions::api::file_browser_handler_internal::SelectFile; | 64 extensions::api::file_browser_handler_internal::SelectFile; |
| 65 | 65 |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 result->entry.reset(new FileEntryInfo()); | 400 result->entry.reset(new FileEntryInfo()); |
| 401 result->entry->file_system_name = file_system_name_; | 401 result->entry->file_system_name = file_system_name_; |
| 402 result->entry->file_system_root = file_system_root_.spec(); | 402 result->entry->file_system_root = file_system_root_.spec(); |
| 403 result->entry->file_full_path = "/" + virtual_path_.value(); | 403 result->entry->file_full_path = "/" + virtual_path_.value(); |
| 404 result->entry->file_is_directory = false; | 404 result->entry->file_is_directory = false; |
| 405 } | 405 } |
| 406 | 406 |
| 407 results_ = SelectFile::Results::Create(*result); | 407 results_ = SelectFile::Results::Create(*result); |
| 408 SendResponse(true); | 408 SendResponse(true); |
| 409 } | 409 } |
| OLD | NEW |