| 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 // Implements the Chrome Extensions Media Galleries API. | 5 // Implements the Chrome Extensions Media Galleries API. |
| 6 | 6 |
| 7 #include "chrome/browser/extensions/api/media_galleries/media_galleries_api.h" | 7 #include "chrome/browser/extensions/api/media_galleries/media_galleries_api.h" |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/platform_file.h" | 12 #include "base/platform_file.h" |
| 13 #include "base/values.h" | 13 #include "base/values.h" |
| 14 #include "chrome/browser/extensions/shell_window_registry.h" | 14 #include "chrome/browser/extensions/shell_window_registry.h" |
| 15 #include "chrome/browser/media_gallery/media_file_system_registry.h" | 15 #include "chrome/browser/media_gallery/media_file_system_registry.h" |
| 16 #include "chrome/browser/media_gallery/media_galleries_dialog_controller.h" | 16 #include "chrome/browser/media_gallery/media_galleries_dialog_controller.h" |
| 17 #include "chrome/browser/ui/chrome_select_file_policy.h" | 17 #include "chrome/browser/ui/chrome_select_file_policy.h" |
| 18 #include "chrome/browser/ui/extensions/shell_window.h" | 18 #include "chrome/browser/ui/extensions/shell_window.h" |
| 19 #include "chrome/browser/ui/tab_contents/tab_contents.h" | 19 #include "chrome/browser/ui/tab_contents/tab_contents.h" |
| 20 #include "chrome/common/extensions/api/experimental_media_galleries.h" | 20 #include "chrome/common/extensions/api/experimental_media_galleries.h" |
| 21 #include "chrome/common/extensions/api/media_galleries.h" |
| 21 #include "chrome/common/pref_names.h" | 22 #include "chrome/common/pref_names.h" |
| 22 #include "content/public/browser/child_process_security_policy.h" | 23 #include "content/public/browser/child_process_security_policy.h" |
| 23 #include "content/public/browser/render_process_host.h" | 24 #include "content/public/browser/render_process_host.h" |
| 24 #include "content/public/browser/render_view_host.h" | 25 #include "content/public/browser/render_view_host.h" |
| 25 #include "content/public/browser/web_contents.h" | 26 #include "content/public/browser/web_contents.h" |
| 26 | 27 |
| 27 #if defined(OS_WIN) | 28 #if defined(OS_WIN) |
| 28 #include "base/sys_string_conversions.h" | 29 #include "base/sys_string_conversions.h" |
| 29 #endif | 30 #endif |
| 30 | 31 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 48 } | 49 } |
| 49 | 50 |
| 50 return true; | 51 return true; |
| 51 } | 52 } |
| 52 | 53 |
| 53 } // namespace | 54 } // namespace |
| 54 | 55 |
| 55 using chrome::MediaFileSystemRegistry; | 56 using chrome::MediaFileSystemRegistry; |
| 56 using content::ChildProcessSecurityPolicy; | 57 using content::ChildProcessSecurityPolicy; |
| 57 | 58 |
| 58 namespace MediaGalleries = extensions::api::experimental_media_galleries; | 59 namespace MediaGalleries = extensions::api::media_galleries; |
| 59 namespace GetMediaFileSystems = MediaGalleries::GetMediaFileSystems; | 60 namespace GetMediaFileSystems = MediaGalleries::GetMediaFileSystems; |
| 60 | 61 |
| 61 MediaGalleriesGetMediaFileSystemsFunction:: | 62 MediaGalleriesGetMediaFileSystemsFunction:: |
| 62 ~MediaGalleriesGetMediaFileSystemsFunction() {} | 63 ~MediaGalleriesGetMediaFileSystemsFunction() {} |
| 63 | 64 |
| 64 bool MediaGalleriesGetMediaFileSystemsFunction::RunImpl() { | 65 bool MediaGalleriesGetMediaFileSystemsFunction::RunImpl() { |
| 65 if (!ApiIsAccessible(&error_)) | 66 if (!ApiIsAccessible(&error_)) |
| 66 return false; | 67 return false; |
| 67 | 68 |
| 68 scoped_ptr<GetMediaFileSystems::Params> params( | 69 scoped_ptr<GetMediaFileSystems::Params> params( |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 bool MediaGalleriesAssembleMediaFileFunction::RunImpl() { | 160 bool MediaGalleriesAssembleMediaFileFunction::RunImpl() { |
| 160 if (!ApiIsAccessible(&error_)) | 161 if (!ApiIsAccessible(&error_)) |
| 161 return false; | 162 return false; |
| 162 | 163 |
| 163 // TODO(vandebo) Update the metadata and return the new file. | 164 // TODO(vandebo) Update the metadata and return the new file. |
| 164 SetResult(Value::CreateNullValue()); | 165 SetResult(Value::CreateNullValue()); |
| 165 return true; | 166 return true; |
| 166 } | 167 } |
| 167 | 168 |
| 168 } // namespace extensions | 169 } // namespace extensions |
| OLD | NEW |