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

Side by Side Diff: trunk/src/chrome/renderer/extensions/extension_helper.cc

Issue 16336011: Revert 203489 "Replace JSON (de)serialization of extension messa..." (Closed) Base URL: svn://svn.chromium.org/chrome/
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/extension_helper.h" 5 #include "chrome/renderer/extensions/extension_helper.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/json/json_string_value_serializer.h" 10 #include "base/json/json_string_value_serializer.h"
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 const std::string& channel_name, 267 const std::string& channel_name,
268 const base::DictionaryValue& source_tab, 268 const base::DictionaryValue& source_tab,
269 const ExtensionMsg_ExternalConnectionInfo& info) { 269 const ExtensionMsg_ExternalConnectionInfo& info) {
270 MiscellaneousBindings::DispatchOnConnect( 270 MiscellaneousBindings::DispatchOnConnect(
271 dispatcher_->v8_context_set().GetAll(), 271 dispatcher_->v8_context_set().GetAll(),
272 target_port_id, channel_name, source_tab, 272 target_port_id, channel_name, source_tab,
273 info.source_id, info.target_id, info.source_url, 273 info.source_id, info.target_id, info.source_url,
274 render_view()); 274 render_view());
275 } 275 }
276 276
277 void ExtensionHelper::OnExtensionDeliverMessage( 277 void ExtensionHelper::OnExtensionDeliverMessage(int target_id,
278 int target_id, 278 const std::string& message) {
279 const base::ListValue& message) {
280 MiscellaneousBindings::DeliverMessage(dispatcher_->v8_context_set().GetAll(), 279 MiscellaneousBindings::DeliverMessage(dispatcher_->v8_context_set().GetAll(),
281 target_id, 280 target_id,
282 message, 281 message,
283 render_view()); 282 render_view());
284 } 283 }
285 284
286 void ExtensionHelper::OnExtensionDispatchOnDisconnect( 285 void ExtensionHelper::OnExtensionDispatchOnDisconnect(
287 int port_id, 286 int port_id,
288 const std::string& error_message) { 287 const std::string& error_message) {
289 MiscellaneousBindings::DispatchOnDisconnect( 288 MiscellaneousBindings::DispatchOnDisconnect(
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 v8::Handle<v8::Context> script_context = 360 v8::Handle<v8::Context> script_context =
362 render_view()->GetWebView()->mainFrame()->mainWorldScriptContext(); 361 render_view()->GetWebView()->mainFrame()->mainWorldScriptContext();
363 ChromeV8Context* chrome_v8_context = 362 ChromeV8Context* chrome_v8_context =
364 dispatcher_->v8_context_set().GetByV8Context(script_context); 363 dispatcher_->v8_context_set().GetByV8Context(script_context);
365 if (!chrome_v8_context) 364 if (!chrome_v8_context)
366 return; 365 return;
367 chrome_v8_context->CallChromeHiddenMethod("OnAppWindowClosed", 0, NULL, NULL); 366 chrome_v8_context->CallChromeHiddenMethod("OnAppWindowClosed", 0, NULL, NULL);
368 } 367 }
369 368
370 } // namespace extensions 369 } // namespace extensions
OLDNEW
« no previous file with comments | « trunk/src/chrome/renderer/extensions/extension_helper.h ('k') | trunk/src/chrome/renderer/extensions/miscellaneous_bindings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698