| Index: chrome/renderer/extensions/file_browser_private_custom_bindings.cc
|
| ===================================================================
|
| --- chrome/renderer/extensions/file_browser_private_custom_bindings.cc (revision 184858)
|
| +++ chrome/renderer/extensions/file_browser_private_custom_bindings.cc (working copy)
|
| @@ -13,18 +13,9 @@
|
| #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h"
|
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
|
|
|
| -namespace extensions {
|
| +namespace {
|
|
|
| -FileBrowserPrivateCustomBindings::FileBrowserPrivateCustomBindings(
|
| - v8::Handle<v8::Context> context)
|
| - : ChromeV8Extension(NULL, context) {
|
| - RouteFunction(
|
| - "GetLocalFileSystem",
|
| - base::Bind(&FileBrowserPrivateCustomBindings::GetLocalFileSystem,
|
| - base::Unretained(this)));
|
| -}
|
| -
|
| -v8::Handle<v8::Value> FileBrowserPrivateCustomBindings::GetLocalFileSystem(
|
| +static v8::Handle<v8::Value> GetLocalFileSystem(
|
| const v8::Arguments& args) {
|
| DCHECK(args.Length() == 2);
|
| DCHECK(args[0]->IsString());
|
| @@ -32,7 +23,7 @@
|
| std::string name(*v8::String::Utf8Value(args[0]));
|
| std::string path(*v8::String::Utf8Value(args[1]));
|
|
|
| - WebKit::WebFrame* webframe = WebKit::WebFrame::frameForContext(v8_context());
|
| + WebKit::WebFrame* webframe = WebKit::WebFrame::frameForCurrentContext();
|
| DCHECK(webframe);
|
| return webframe->createFileSystem(
|
| WebKit::WebFileSystem::TypeExternal,
|
| @@ -40,4 +31,13 @@
|
| WebKit::WebString::fromUTF8(path.c_str()));
|
| }
|
|
|
| +} // namespace
|
| +
|
| +namespace extensions {
|
| +
|
| +FileBrowserPrivateCustomBindings::FileBrowserPrivateCustomBindings()
|
| + : ChromeV8Extension(NULL) {
|
| + RouteStaticFunction("GetLocalFileSystem", &GetLocalFileSystem);
|
| +}
|
| +
|
| } // namespace extensions
|
|
|