Commit 6bdec590 authored by thestig@chromium.org's avatar thestig@chromium.org

Cleanup: Move MediaGalleriesCustomBindings::GetMediaFileSystemObject() into an anonymous namespace.

Review URL: https://codereview.chromium.org/129573002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243723 0039d316-1c4b-4281-b951-d872f2087c98
parent 1768b143
...@@ -6,8 +6,6 @@ ...@@ -6,8 +6,6 @@
#include <string> #include <string>
#include "base/files/file_path.h"
#include "base/strings/stringprintf.h"
#include "chrome/common/extensions/extension_constants.h" #include "chrome/common/extensions/extension_constants.h"
#include "third_party/WebKit/public/web/WebDocument.h" #include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebFrame.h" #include "third_party/WebKit/public/web/WebFrame.h"
...@@ -16,17 +14,11 @@ ...@@ -16,17 +14,11 @@
namespace extensions { namespace extensions {
MediaGalleriesCustomBindings::MediaGalleriesCustomBindings( namespace {
Dispatcher* dispatcher, ChromeV8Context* context)
: ChromeV8Extension(dispatcher, context) {
RouteFunction(
"GetMediaFileSystemObject",
base::Bind(&MediaGalleriesCustomBindings::GetMediaFileSystemObject,
base::Unretained(this)));
}
void MediaGalleriesCustomBindings::GetMediaFileSystemObject( // FileSystemObject GetMediaFileSystem(string file_system_url): construct
const v8::FunctionCallbackInfo<v8::Value>& args) { // a file system object from a file system url.
void GetMediaFileSystemObject(const v8::FunctionCallbackInfo<v8::Value>& args) {
if (args.Length() != 1) { if (args.Length() != 1) {
NOTREACHED(); NOTREACHED();
return; return;
...@@ -54,4 +46,13 @@ void MediaGalleriesCustomBindings::GetMediaFileSystemObject( ...@@ -54,4 +46,13 @@ void MediaGalleriesCustomBindings::GetMediaFileSystemObject(
blink::WebString::fromUTF8(root_url))); blink::WebString::fromUTF8(root_url)));
} }
} // namespace
MediaGalleriesCustomBindings::MediaGalleriesCustomBindings(
Dispatcher* dispatcher, ChromeV8Context* context)
: ChromeV8Extension(dispatcher, context) {
RouteFunction("GetMediaFileSystemObject",
base::Bind(&GetMediaFileSystemObject));
}
} // namespace extensions } // namespace extensions
...@@ -16,11 +16,6 @@ class MediaGalleriesCustomBindings : public ChromeV8Extension { ...@@ -16,11 +16,6 @@ class MediaGalleriesCustomBindings : public ChromeV8Extension {
ChromeV8Context* context); ChromeV8Context* context);
private: private:
// FileSystemObject GetMediaFileSystem(string file_system_url): construct
// a file system object from a file system url.
void GetMediaFileSystemObject(
const v8::FunctionCallbackInfo<v8::Value>& args);
DISALLOW_COPY_AND_ASSIGN(MediaGalleriesCustomBindings); DISALLOW_COPY_AND_ASSIGN(MediaGalleriesCustomBindings);
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment