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 20 matching lines...) Expand all Loading... |
31 #include "chrome/browser/chromeos/extensions/file_browser_handler_api.h" | 31 #include "chrome/browser/chromeos/extensions/file_browser_handler_api.h" |
32 | 32 |
33 #include "base/bind.h" | 33 #include "base/bind.h" |
34 #include "base/file_util.h" | 34 #include "base/file_util.h" |
35 #include "base/files/file_path.h" | 35 #include "base/files/file_path.h" |
36 #include "base/memory/scoped_ptr.h" | 36 #include "base/memory/scoped_ptr.h" |
37 #include "base/message_loop_proxy.h" | 37 #include "base/message_loop_proxy.h" |
38 #include "base/platform_file.h" | 38 #include "base/platform_file.h" |
39 #include "base/values.h" | 39 #include "base/values.h" |
40 #include "chrome/browser/chromeos/extensions/file_handler_util.h" | 40 #include "chrome/browser/chromeos/extensions/file_handler_util.h" |
41 #include "chrome/browser/chromeos/extensions/file_manager_util.h" | 41 #include "chrome/browser/chromeos/extensions/file_manager/file_manager_util.h" |
42 #include "chrome/browser/profiles/profile.h" | 42 #include "chrome/browser/profiles/profile.h" |
43 #include "chrome/browser/ui/browser.h" | 43 #include "chrome/browser/ui/browser.h" |
44 #include "chrome/browser/ui/browser_window.h" | 44 #include "chrome/browser/ui/browser_window.h" |
45 #include "chrome/browser/ui/chrome_select_file_policy.h" | 45 #include "chrome/browser/ui/chrome_select_file_policy.h" |
46 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 46 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
47 #include "chrome/common/extensions/api/file_browser_handler_internal.h" | 47 #include "chrome/common/extensions/api/file_browser_handler_internal.h" |
48 #include "content/public/browser/browser_thread.h" | 48 #include "content/public/browser/browser_thread.h" |
49 #include "content/public/browser/child_process_security_policy.h" | 49 #include "content/public/browser/child_process_security_policy.h" |
50 #include "content/public/browser/render_process_host.h" | 50 #include "content/public/browser/render_process_host.h" |
51 #include "content/public/browser/render_view_host.h" | 51 #include "content/public/browser/render_view_host.h" |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 result->entry.reset(new FileEntryInfo()); | 401 result->entry.reset(new FileEntryInfo()); |
402 result->entry->file_system_name = file_system_name_; | 402 result->entry->file_system_name = file_system_name_; |
403 result->entry->file_system_root = file_system_root_.spec(); | 403 result->entry->file_system_root = file_system_root_.spec(); |
404 result->entry->file_full_path = "/" + virtual_path_.value(); | 404 result->entry->file_full_path = "/" + virtual_path_.value(); |
405 result->entry->file_is_directory = false; | 405 result->entry->file_is_directory = false; |
406 } | 406 } |
407 | 407 |
408 results_ = SelectFile::Results::Create(*result); | 408 results_ = SelectFile::Results::Create(*result); |
409 SendResponse(true); | 409 SendResponse(true); |
410 } | 410 } |
OLD | NEW |