Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(111)

Side by Side Diff: chrome/browser/extensions/api/media_gallery/media_gallery_api.cc

Issue 9621021: DO NOT COMMIT (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix rebase Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698