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

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

Issue 9386001: Implement a module system for the extension bindings JS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/renderer/extensions/file_browser_private_custom_bindings.h" 5 #include "chrome/renderer/extensions/file_browser_private_custom_bindings.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 22 matching lines...) Expand all
33 std::string path(*v8::String::Utf8Value(args[1])); 33 std::string path(*v8::String::Utf8Value(args[1]));
34 34
35 WebKit::WebFrame* webframe = WebKit::WebFrame::frameForCurrentContext(); 35 WebKit::WebFrame* webframe = WebKit::WebFrame::frameForCurrentContext();
36 DCHECK(webframe); 36 DCHECK(webframe);
37 return webframe->createFileSystem( 37 return webframe->createFileSystem(
38 WebKit::WebFileSystem::TypeExternal, 38 WebKit::WebFileSystem::TypeExternal,
39 WebKit::WebString::fromUTF8(name.c_str()), 39 WebKit::WebString::fromUTF8(name.c_str()),
40 WebKit::WebString::fromUTF8(path.c_str())); 40 WebKit::WebString::fromUTF8(path.c_str()));
41 } 41 }
42 42
43 v8::Handle<v8::FunctionTemplate> 43 void FileBrowserPrivateCustomBindings::SetNativeFunctions(
44 FileBrowserPrivateCustomBindings::GetNativeFunction( 44 v8::Handle<v8::Object> object) {
45 v8::Handle<v8::String> name) { 45 RouteFunctionToStatic("GetLocalFileSystem", GetLocalFileSystem, object);
46 if (name->Equals(v8::String::New("GetLocalFileSystem")))
47 return v8::FunctionTemplate::New(GetLocalFileSystem);
48
49 return ChromeV8Extension::GetNativeFunction(name);
50 } 46 }
51 47
52 } // namespace extensions 48 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698