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

Side by Side Diff: chrome/renderer/extensions/media_gallery_custom_bindings.cc

Issue 9358076: Initial extension bindings for Media Gallery API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comment 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 #include "chrome/renderer/extensions/media_gallery_custom_bindings.h"
6
7 #include "content/public/renderer/render_view.h"
8 #include "grit/renderer_resources.h"
9 #include "v8/include/v8.h"
10
11 namespace extensions {
12
13 MediaGalleryCustomBindings::MediaGalleryCustomBindings()
14 : ChromeV8Extension(NULL) {
15 RouteStaticFunction("CreateMediaGalleryObject", &CreateMediaGalleryObject);
16 }
17
18 // static
19 v8::Handle<v8::Value> MediaGalleryCustomBindings::CreateMediaGalleryObject(
20 const v8::Arguments& args) {
21 if (args.Length() != 3 || !args[0]->IsUint32() || args[1]->IsNull() ||
22 !args[1]->IsString() || !args[2]->IsUint32()) {
23 NOTREACHED() << "Bad arguments";
24 return v8::Undefined();
25 }
26
27 std::string name;
28 name = *v8::String::Utf8Value(args[1]->ToString());
29 if (name.empty())
30 return v8::Undefined();
31
32 // TODO(vandebo) Create and return a MediaGallery object.
33 // int id = args[0]->Uint32Value();
34 // int flags = args[2]->Uint32Value();
35 return v8::Undefined();
36 }
37
38 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698