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

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

Issue 15841013: Make miscellaneous_bindings and event_bindings Required as needed. Previously (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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/app_bindings.h" 5 #include "chrome/renderer/extensions/app_bindings.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/string16.h" 8 #include "base/string16.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 OnAppInstallStateResponse) 193 OnAppInstallStateResponse)
194 IPC_MESSAGE_UNHANDLED(CHECK(false) << "Unhandled IPC message") 194 IPC_MESSAGE_UNHANDLED(CHECK(false) << "Unhandled IPC message")
195 IPC_END_MESSAGE_MAP() 195 IPC_END_MESSAGE_MAP()
196 return true; 196 return true;
197 } 197 }
198 198
199 void AppBindings::OnAppInstallStateResponse( 199 void AppBindings::OnAppInstallStateResponse(
200 const std::string& state, int callback_id) { 200 const std::string& state, int callback_id) {
201 v8::HandleScope handle_scope; 201 v8::HandleScope handle_scope;
202 v8::Context::Scope context_scope(context_->v8_context()); 202 v8::Context::Scope context_scope(context_->v8_context());
203 v8::Handle<v8::Value> argv[2]; 203 v8::Handle<v8::Value> argv[] = {
204 argv[0] = v8::String::New(state.c_str()); 204 v8::String::New(state.c_str()),
205 argv[1] = v8::Integer::New(callback_id); 205 v8::Integer::New(callback_id)
206 CHECK(context_->CallChromeHiddenMethod("app.onInstallStateResponse", 206 };
207 arraysize(argv), argv, NULL)); 207 context_->module_system()->CallModuleMethod(
208 "app", "onInstallStateResponse", arraysize(argv), argv);
208 } 209 }
209 210
210 } // namespace extensions 211 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension_messages.h ('k') | chrome/renderer/extensions/chrome_v8_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698