OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "extensions/renderer/extension_frame_helper.h" | 5 #include "extensions/renderer/extension_frame_helper.h" |
6 | 6 |
7 #include "base/metrics/histogram_macros.h" | 7 #include "base/metrics/histogram_macros.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "base/timer/elapsed_timer.h" | 9 #include "base/timer/elapsed_timer.h" |
10 #include "content/public/renderer/render_frame.h" | 10 #include "content/public/renderer/render_frame.h" |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 extension_dispatcher_->script_context_set(), | 338 extension_dispatcher_->script_context_set(), |
339 target_port_id, | 339 target_port_id, |
340 channel_name, | 340 channel_name, |
341 source, | 341 source, |
342 info, | 342 info, |
343 tls_channel_id, | 343 tls_channel_id, |
344 render_frame()); | 344 render_frame()); |
345 } | 345 } |
346 | 346 |
347 void ExtensionFrameHelper::OnExtensionDeliverMessage(int target_id, | 347 void ExtensionFrameHelper::OnExtensionDeliverMessage(int target_id, |
348 int source_tab_id, | |
349 const Message& message) { | 348 const Message& message) { |
350 MessagingBindings::DeliverMessage( | 349 MessagingBindings::DeliverMessage( |
351 extension_dispatcher_->script_context_set(), target_id, message, | 350 extension_dispatcher_->script_context_set(), target_id, message, |
352 render_frame()); | 351 render_frame()); |
353 } | 352 } |
354 | 353 |
355 void ExtensionFrameHelper::OnExtensionDispatchOnDisconnect( | 354 void ExtensionFrameHelper::OnExtensionDispatchOnDisconnect( |
356 int port_id, | 355 int port_id, |
357 const std::string& error_message) { | 356 const std::string& error_message) { |
358 MessagingBindings::DispatchOnDisconnect( | 357 MessagingBindings::DispatchOnDisconnect( |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 } | 417 } |
419 request.callback.Run(port_id); | 418 request.callback.Run(port_id); |
420 pending_port_requests_.erase(iter); | 419 pending_port_requests_.erase(iter); |
421 } | 420 } |
422 | 421 |
423 void ExtensionFrameHelper::OnDestruct() { | 422 void ExtensionFrameHelper::OnDestruct() { |
424 delete this; | 423 delete this; |
425 } | 424 } |
426 | 425 |
427 } // namespace extensions | 426 } // namespace extensions |
OLD | NEW |