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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/media_gallery/media_gallery_api.cc
diff --git a/chrome/browser/extensions/api/media_gallery/media_gallery_api.cc b/chrome/browser/extensions/api/media_gallery/media_gallery_api.cc
new file mode 100644
index 0000000000000000000000000000000000000000..570128c9ffda2b50a9d15752cdc99bf2ee8ce346
--- /dev/null
+++ b/chrome/browser/extensions/api/media_gallery/media_gallery_api.cc
@@ -0,0 +1,67 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Implements the Chrome Extensions Cookies API.
+
+#include "chrome/browser/extensions/api/media_gallery/media_gallery_api.h"
+
+#include "base/values.h"
+
+namespace extensions {
+
+GetMediaGalleriesFunction::~GetMediaGalleriesFunction() {}
+
+bool GetMediaGalleriesFunction::RunImpl() {
+ // TODO(vandebo) Get the list of galleries.
+ ListValue* result = new ListValue();
+
+ DictionaryValue* gallery1 = new DictionaryValue();
+ gallery1->SetInteger("id", 1);
+ gallery1->SetString("name", "G1 disk");
+ gallery1->SetInteger("flags", 6);
+ result->Append(gallery1);
+
+ DictionaryValue* gallery2 = new DictionaryValue();
+ gallery2->SetInteger("id", 2);
+ gallery2->SetString("name", "G2 usb");
+ gallery2->SetInteger("flags", 7);
+ result->Append(gallery2);
+
+ DictionaryValue* gallery42 = new DictionaryValue();
+ gallery42->SetInteger("id", 42);
+ gallery42->SetString("name", "G42 online");
+ gallery42->SetInteger("flags", 0);
+ result->Append(gallery42);
+
+ result_.reset(result);
+ SendResponse(true);
+ return true;
+}
+
+OpenMediaGalleryManagerFunction::~OpenMediaGalleryManagerFunction() {}
+
+bool OpenMediaGalleryManagerFunction::RunImpl() {
+ // TODO(vandebo) Open a new tab/ui surface with config UI.
+ return true;
+}
+
+AssembleMediaFileFunction::~AssembleMediaFileFunction() {}
+
+bool AssembleMediaFileFunction::RunImpl() {
+ // TODO(vandebo) Update the metadata and return the new file.
+ result_.reset(Value::CreateNullValue());
+ SendResponse(true);
+ return true;
+}
+
+ParseMediaFileMetadataFunction::~ParseMediaFileMetadataFunction() {}
+
+bool ParseMediaFileMetadataFunction::RunImpl() {
+ // TODO(vandebo) Try to parse the file.
+ result_.reset(Value::CreateNullValue());
+ SendResponse(true);
+ return true;
+}
+
+} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698