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

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

Issue 12313142: Revert 184837 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 10 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/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
« no previous file with comments | « chrome/renderer/extensions/file_browser_private_custom_bindings.h ('k') | chrome/renderer/extensions/file_system_natives.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698