OLD | NEW |
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/dispatcher.h" | 5 #include "chrome/renderer/extensions/dispatcher.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/string_piece.h" | 10 #include "base/string_piece.h" |
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
602 module_system->RegisterNativeHandler("i18n", | 602 module_system->RegisterNativeHandler("i18n", |
603 scoped_ptr<NativeHandler>(new I18NCustomBindings())); | 603 scoped_ptr<NativeHandler>(new I18NCustomBindings())); |
604 module_system->RegisterNativeHandler("mediaGalleries", | 604 module_system->RegisterNativeHandler("mediaGalleries", |
605 scoped_ptr<NativeHandler>(new MediaGalleriesCustomBindings())); | 605 scoped_ptr<NativeHandler>(new MediaGalleriesCustomBindings())); |
606 module_system->RegisterNativeHandler("page_actions", | 606 module_system->RegisterNativeHandler("page_actions", |
607 scoped_ptr<NativeHandler>( | 607 scoped_ptr<NativeHandler>( |
608 new PageActionsCustomBindings(this))); | 608 new PageActionsCustomBindings(this))); |
609 module_system->RegisterNativeHandler("page_capture", | 609 module_system->RegisterNativeHandler("page_capture", |
610 scoped_ptr<NativeHandler>(new PageCaptureCustomBindings())); | 610 scoped_ptr<NativeHandler>(new PageCaptureCustomBindings())); |
611 module_system->RegisterNativeHandler("runtime", | 611 module_system->RegisterNativeHandler("runtime", |
612 scoped_ptr<NativeHandler>(new RuntimeCustomBindings(context))); | 612 scoped_ptr<NativeHandler>(new RuntimeCustomBindings(this, context))); |
613 module_system->RegisterNativeHandler("tabs", | 613 module_system->RegisterNativeHandler("tabs", |
614 scoped_ptr<NativeHandler>(new TabsCustomBindings())); | 614 scoped_ptr<NativeHandler>(new TabsCustomBindings())); |
615 module_system->RegisterNativeHandler("tts", | 615 module_system->RegisterNativeHandler("tts", |
616 scoped_ptr<NativeHandler>(new TTSCustomBindings())); | 616 scoped_ptr<NativeHandler>(new TTSCustomBindings())); |
617 module_system->RegisterNativeHandler("web_request", | 617 module_system->RegisterNativeHandler("web_request", |
618 scoped_ptr<NativeHandler>(new WebRequestCustomBindings())); | 618 scoped_ptr<NativeHandler>(new WebRequestCustomBindings())); |
619 module_system->RegisterNativeHandler("webstore", | 619 module_system->RegisterNativeHandler("webstore", |
620 scoped_ptr<NativeHandler>(new WebstoreBindings(this, context))); | 620 scoped_ptr<NativeHandler>(new WebstoreBindings(this, context))); |
621 } | 621 } |
622 | 622 |
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1154 std::string error_msg = base::StringPrintf(kMessage, function_name.c_str()); | 1154 std::string error_msg = base::StringPrintf(kMessage, function_name.c_str()); |
1155 v8::ThrowException( | 1155 v8::ThrowException( |
1156 v8::Exception::Error(v8::String::New(error_msg.c_str()))); | 1156 v8::Exception::Error(v8::String::New(error_msg.c_str()))); |
1157 return false; | 1157 return false; |
1158 } | 1158 } |
1159 | 1159 |
1160 return true; | 1160 return true; |
1161 } | 1161 } |
1162 | 1162 |
1163 } // namespace extensions | 1163 } // namespace extensions |
OLD | NEW |