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/media_gallery/media_file_system_registry.h" | 14 #include "chrome/browser/media_gallery/media_file_system_registry.h" |
15 #include "chrome/common/extensions/api/experimental_media_galleries.h" | 15 #include "chrome/common/extensions/api/experimental_media_galleries.h" |
16 #include "chrome/common/extensions/api/media_galleries.h" | |
17 #include "content/public/browser/child_process_security_policy.h" | 16 #include "content/public/browser/child_process_security_policy.h" |
18 #include "content/public/browser/render_process_host.h" | 17 #include "content/public/browser/render_process_host.h" |
19 #include "content/public/browser/render_view_host.h" | 18 #include "content/public/browser/render_view_host.h" |
20 | 19 |
21 #if defined(OS_WIN) | 20 #if defined(OS_WIN) |
22 #include "base/sys_string_conversions.h" | 21 #include "base/sys_string_conversions.h" |
23 #endif | 22 #endif |
24 | 23 |
25 namespace extensions { | 24 namespace extensions { |
26 | 25 |
27 namespace { | 26 namespace { |
28 | 27 |
29 const char kInvalidInteractive[] = "Unknown value for interactive."; | 28 const char kInvalidInteractive[] = "Unknown value for interactive."; |
30 | 29 |
31 } // namespace | 30 } // namespace |
32 | 31 |
33 using chrome::MediaFileSystemRegistry; | 32 using chrome::MediaFileSystemRegistry; |
34 using content::ChildProcessSecurityPolicy; | 33 using content::ChildProcessSecurityPolicy; |
35 | 34 |
36 namespace MediaGalleries = extensions::api::media_galleries; | 35 namespace MediaGalleries = extensions::api::experimental_media_galleries; |
37 namespace GetMediaFileSystems = MediaGalleries::GetMediaFileSystems; | 36 namespace GetMediaFileSystems = MediaGalleries::GetMediaFileSystems; |
38 | 37 |
39 MediaGalleriesGetMediaFileSystemsFunction:: | 38 MediaGalleriesGetMediaFileSystemsFunction:: |
40 ~MediaGalleriesGetMediaFileSystemsFunction() {} | 39 ~MediaGalleriesGetMediaFileSystemsFunction() {} |
41 | 40 |
42 bool MediaGalleriesGetMediaFileSystemsFunction::RunImpl() { | 41 bool MediaGalleriesGetMediaFileSystemsFunction::RunImpl() { |
43 scoped_ptr<GetMediaFileSystems::Params> params( | 42 scoped_ptr<GetMediaFileSystems::Params> params( |
44 GetMediaFileSystems::Params::Create(*args_)); | 43 GetMediaFileSystems::Params::Create(*args_)); |
45 EXTENSION_FUNCTION_VALIDATE(params.get()); | 44 EXTENSION_FUNCTION_VALIDATE(params.get()); |
46 MediaGalleries::GetMediaFileSystemsInteractivity interactive = "no"; | 45 MediaGalleries::GetMediaFileSystemsInteractivity interactive = "no"; |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 MediaGalleriesAssembleMediaFileFunction:: | 90 MediaGalleriesAssembleMediaFileFunction:: |
92 ~MediaGalleriesAssembleMediaFileFunction() {} | 91 ~MediaGalleriesAssembleMediaFileFunction() {} |
93 | 92 |
94 bool MediaGalleriesAssembleMediaFileFunction::RunImpl() { | 93 bool MediaGalleriesAssembleMediaFileFunction::RunImpl() { |
95 // TODO(vandebo) Update the metadata and return the new file. | 94 // TODO(vandebo) Update the metadata and return the new file. |
96 SetResult(Value::CreateNullValue()); | 95 SetResult(Value::CreateNullValue()); |
97 return true; | 96 return true; |
98 } | 97 } |
99 | 98 |
100 } // namespace extensions | 99 } // namespace extensions |
OLD | NEW |