| 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 #include "chrome/browser/extensions/extension_file_browser_private_api.h" | 5 #include "chrome/browser/extensions/extension_file_browser_private_api.h" |
| 6 | 6 |
| 7 #include "base/base64.h" | 7 #include "base/base64.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 #include "chrome/browser/prefs/pref_service.h" | 25 #include "chrome/browser/prefs/pref_service.h" |
| 26 #include "chrome/browser/prefs/scoped_user_pref_update.h" | 26 #include "chrome/browser/prefs/scoped_user_pref_update.h" |
| 27 #include "chrome/browser/profiles/profile.h" | 27 #include "chrome/browser/profiles/profile.h" |
| 28 #include "chrome/browser/ui/browser.h" | 28 #include "chrome/browser/ui/browser.h" |
| 29 #include "chrome/browser/ui/views/select_file_dialog_extension.h" | 29 #include "chrome/browser/ui/views/select_file_dialog_extension.h" |
| 30 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h" | 30 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h" |
| 31 #include "chrome/common/chrome_switches.h" | 31 #include "chrome/common/chrome_switches.h" |
| 32 #include "chrome/common/extensions/extension.h" | 32 #include "chrome/common/extensions/extension.h" |
| 33 #include "chrome/common/extensions/file_browser_handler.h" | 33 #include "chrome/common/extensions/file_browser_handler.h" |
| 34 #include "chrome/common/pref_names.h" | 34 #include "chrome/common/pref_names.h" |
| 35 #include "content/browser/child_process_security_policy.h" | |
| 36 #include "content/browser/renderer_host/render_view_host.h" | 35 #include "content/browser/renderer_host/render_view_host.h" |
| 37 #include "content/public/browser/browser_thread.h" | 36 #include "content/public/browser/browser_thread.h" |
| 37 #include "content/public/browser/child_process_security_policy.h" |
| 38 #include "content/public/browser/render_process_host.h" | 38 #include "content/public/browser/render_process_host.h" |
| 39 #include "content/public/browser/site_instance.h" | 39 #include "content/public/browser/site_instance.h" |
| 40 #include "content/public/browser/web_contents.h" | 40 #include "content/public/browser/web_contents.h" |
| 41 #include "googleurl/src/gurl.h" | 41 #include "googleurl/src/gurl.h" |
| 42 #include "grit/generated_resources.h" | 42 #include "grit/generated_resources.h" |
| 43 #include "grit/platform_locale_settings.h" | 43 #include "grit/platform_locale_settings.h" |
| 44 #include "ui/base/l10n/l10n_util.h" | 44 #include "ui/base/l10n/l10n_util.h" |
| 45 #include "webkit/fileapi/file_system_context.h" | 45 #include "webkit/fileapi/file_system_context.h" |
| 46 #include "webkit/fileapi/file_system_file_util.h" | 46 #include "webkit/fileapi/file_system_file_util.h" |
| 47 #include "webkit/fileapi/file_system_mount_point_provider.h" | 47 #include "webkit/fileapi/file_system_mount_point_provider.h" |
| 48 #include "webkit/fileapi/file_system_operation_context.h" | 48 #include "webkit/fileapi/file_system_operation_context.h" |
| 49 #include "webkit/fileapi/file_system_types.h" | 49 #include "webkit/fileapi/file_system_types.h" |
| 50 #include "webkit/fileapi/file_system_util.h" | 50 #include "webkit/fileapi/file_system_util.h" |
| 51 | 51 |
| 52 #ifdef OS_CHROMEOS | 52 #ifdef OS_CHROMEOS |
| 53 #include "chrome/browser/chromeos/disks/disk_mount_manager.h" | 53 #include "chrome/browser/chromeos/disks/disk_mount_manager.h" |
| 54 #endif | 54 #endif |
| 55 | 55 |
| 56 using chromeos::disks::DiskMountManager; | 56 using chromeos::disks::DiskMountManager; |
| 57 using content::BrowserThread; | 57 using content::BrowserThread; |
| 58 using content::ChildProcessSecurityPolicy; |
| 58 using content::SiteInstance; | 59 using content::SiteInstance; |
| 59 using content::WebContents; | 60 using content::WebContents; |
| 60 | 61 |
| 61 namespace { | 62 namespace { |
| 62 | 63 |
| 63 // Error messages. | 64 // Error messages. |
| 64 const char kFileError[] = "File error %d"; | 65 const char kFileError[] = "File error %d"; |
| 65 const char kInvalidFileUrl[] = "Invalid file URL"; | 66 const char kInvalidFileUrl[] = "Invalid file URL"; |
| 66 const char kVolumeDevicePathNotFound[] = "Device path not found"; | 67 const char kVolumeDevicePathNotFound[] = "Device path not found"; |
| 67 | 68 |
| (...skipping 1615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1683 SET_STRING(IDS_FILE_BROWSER, ENQUEUE); | 1684 SET_STRING(IDS_FILE_BROWSER, ENQUEUE); |
| 1684 #undef SET_STRING | 1685 #undef SET_STRING |
| 1685 | 1686 |
| 1686 ChromeURLDataManager::DataSource::SetFontAndTextDirection(dict); | 1687 ChromeURLDataManager::DataSource::SetFontAndTextDirection(dict); |
| 1687 | 1688 |
| 1688 dict->SetString("PLAY_MEDIA", | 1689 dict->SetString("PLAY_MEDIA", |
| 1689 l10n_util::GetStringUTF16(IDS_CONTENT_CONTEXT_PLAY)); | 1690 l10n_util::GetStringUTF16(IDS_CONTENT_CONTEXT_PLAY)); |
| 1690 | 1691 |
| 1691 return true; | 1692 return true; |
| 1692 } | 1693 } |
| OLD | NEW |