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

Side by Side Diff: chrome/renderer/extensions/file_browser_handler_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_handler_custom_bindings.h" 5 #include "chrome/renderer/extensions/file_browser_handler_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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 WebKit::WebFileSystem::TypeExternal, 47 WebKit::WebFileSystem::TypeExternal,
48 WebKit::WebString::fromUTF8(file_system_name.c_str()), 48 WebKit::WebString::fromUTF8(file_system_name.c_str()),
49 WebKit::WebString::fromUTF8(file_system_path.c_str()), 49 WebKit::WebString::fromUTF8(file_system_path.c_str()),
50 WebKit::WebString::fromUTF8(file_full_path.c_str()), 50 WebKit::WebString::fromUTF8(file_full_path.c_str()),
51 is_directory); 51 is_directory);
52 #else 52 #else
53 return v8::Undefined(); 53 return v8::Undefined();
54 #endif 54 #endif
55 } 55 }
56 56
57 v8::Handle<v8::FunctionTemplate> 57 void FileBrowserHandlerCustomBindings::SetNativeFunctions(
58 FileBrowserHandlerCustomBindings::GetNativeFunction( 58 v8::Handle<v8::Object> object) {
59 v8::Handle<v8::String> name) { 59 RouteFunctionToStatic("GetExternalFileEntry", GetExternalFileEntry, object);
60 if (name->Equals(v8::String::New("GetExternalFileEntry")))
61 return v8::FunctionTemplate::New(GetExternalFileEntry);
62 else
63 return ChromeV8Extension::GetNativeFunction(name);
64 } 60 }
65 61
66 } // namespace extensions 62 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698