OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // Implements the Chrome Extensions Cookies API. |
| 6 |
| 7 #include "chrome/browser/extensions/api/media_gallery/media_gallery_api.h" |
| 8 |
| 9 #include "base/values.h" |
| 10 |
| 11 namespace extensions { |
| 12 |
| 13 GetMediaGalleriesFunction::~GetMediaGalleriesFunction() {} |
| 14 |
| 15 bool GetMediaGalleriesFunction::RunImpl() { |
| 16 // TODO(vandebo) Get the list of galleries. |
| 17 ListValue* result = new ListValue(); |
| 18 |
| 19 DictionaryValue* gallery1 = new DictionaryValue(); |
| 20 gallery1->SetInteger("id", 1); |
| 21 gallery1->SetString("name", "G1 disk"); |
| 22 gallery1->SetInteger("flags", 6); |
| 23 result->Append(gallery1); |
| 24 |
| 25 DictionaryValue* gallery2 = new DictionaryValue(); |
| 26 gallery2->SetInteger("id", 2); |
| 27 gallery2->SetString("name", "G2 usb"); |
| 28 gallery2->SetInteger("flags", 7); |
| 29 result->Append(gallery2); |
| 30 |
| 31 DictionaryValue* gallery42 = new DictionaryValue(); |
| 32 gallery42->SetInteger("id", 42); |
| 33 gallery42->SetString("name", "G42 online"); |
| 34 gallery42->SetInteger("flags", 0); |
| 35 result->Append(gallery42); |
| 36 |
| 37 result_.reset(result); |
| 38 SendResponse(true); |
| 39 return true; |
| 40 } |
| 41 |
| 42 OpenMediaGalleryManagerFunction::~OpenMediaGalleryManagerFunction() {} |
| 43 |
| 44 bool OpenMediaGalleryManagerFunction::RunImpl() { |
| 45 // TODO(vandebo) Open a new tab/ui surface with config UI. |
| 46 return true; |
| 47 } |
| 48 |
| 49 AssembleMediaFileFunction::~AssembleMediaFileFunction() {} |
| 50 |
| 51 bool AssembleMediaFileFunction::RunImpl() { |
| 52 // TODO(vandebo) Update the metadata and return the new file. |
| 53 result_.reset(Value::CreateNullValue()); |
| 54 SendResponse(true); |
| 55 return true; |
| 56 } |
| 57 |
| 58 ParseMediaFileMetadataFunction::~ParseMediaFileMetadataFunction() {} |
| 59 |
| 60 bool ParseMediaFileMetadataFunction::RunImpl() { |
| 61 // TODO(vandebo) Try to parse the file. |
| 62 result_.reset(Value::CreateNullValue()); |
| 63 SendResponse(true); |
| 64 return true; |
| 65 } |
| 66 |
| 67 } // namespace extensions |
OLD | NEW |