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

Unified Diff: chrome/renderer/extensions/media_galleries_custom_bindings.cc

Issue 93643002: Media Galleries: Add chrome.mediaGalleries.addUserSelectedFolder(). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: address most comments Created 7 years 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/renderer/extensions/media_galleries_custom_bindings.cc
===================================================================
--- chrome/renderer/extensions/media_galleries_custom_bindings.cc (revision 237402)
+++ chrome/renderer/extensions/media_galleries_custom_bindings.cc (working copy)
@@ -6,8 +6,6 @@
#include <string>
-#include "base/files/file_path.h"
-#include "base/strings/stringprintf.h"
#include "chrome/common/extensions/extension_constants.h"
#include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebFrame.h"
@@ -16,17 +14,11 @@
namespace extensions {
-MediaGalleriesCustomBindings::MediaGalleriesCustomBindings(
- Dispatcher* dispatcher, ChromeV8Context* context)
- : ChromeV8Extension(dispatcher, context) {
- RouteFunction(
- "GetMediaFileSystemObject",
- base::Bind(&MediaGalleriesCustomBindings::GetMediaFileSystemObject,
- base::Unretained(this)));
-}
+namespace {
-void MediaGalleriesCustomBindings::GetMediaFileSystemObject(
- const v8::FunctionCallbackInfo<v8::Value>& args) {
+// FileSystemObject GetMediaFileSystem(string file_system_url): construct
+// a file system object from a file system url.
+void GetMediaFileSystemObject(const v8::FunctionCallbackInfo<v8::Value>& args) {
if (args.Length() != 1) {
NOTREACHED();
return;
@@ -54,4 +46,13 @@
blink::WebString::fromUTF8(root_url)));
}
+} // namespace
+
+MediaGalleriesCustomBindings::MediaGalleriesCustomBindings(
+ Dispatcher* dispatcher, ChromeV8Context* context)
+ : ChromeV8Extension(dispatcher, context) {
+ RouteFunction("GetMediaFileSystemObject",
+ base::Bind(&GetMediaFileSystemObject));
+}
+
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698