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

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

Issue 11571014: Lazy load chrome.* APIs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: android compilation Created 7 years, 9 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/i18n_custom_bindings.cc
diff --git a/chrome/renderer/extensions/i18n_custom_bindings.cc b/chrome/renderer/extensions/i18n_custom_bindings.cc
index 7dfcb0fc34fb0741cb76945d77d0b9503bdee4ee..44ee27b36f656b9fd47bee512104e5ca7a3ec783 100644
--- a/chrome/renderer/extensions/i18n_custom_bindings.cc
+++ b/chrome/renderer/extensions/i18n_custom_bindings.cc
@@ -12,14 +12,17 @@
namespace extensions {
-I18NCustomBindings::I18NCustomBindings()
- : ChromeV8Extension(NULL) {
+I18NCustomBindings::I18NCustomBindings(Dispatcher* dispatcher,
+ v8::Handle<v8::Context> context)
+ : ChromeV8Extension(dispatcher, context) {
RouteStaticFunction("GetL10nMessage", &GetL10nMessage);
}
// static
v8::Handle<v8::Value> I18NCustomBindings::GetL10nMessage(
const v8::Arguments& args) {
+ I18NCustomBindings* self = GetFromArguments<I18NCustomBindings>(args);
+
if (args.Length() != 3 || !args[0]->IsString()) {
NOTREACHED() << "Bad arguments";
return v8::Undefined();
@@ -38,7 +41,7 @@ v8::Handle<v8::Value> I18NCustomBindings::GetL10nMessage(
if (!l10n_messages) {
// Get the current RenderView so that we can send a routed IPC message
// from the correct source.
- content::RenderView* renderview = GetCurrentRenderView();
+ content::RenderView* renderview = self->GetRenderView();
if (!renderview)
return v8::Undefined();
« no previous file with comments | « chrome/renderer/extensions/i18n_custom_bindings.h ('k') | chrome/renderer/extensions/json_schema_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698