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

Side by Side Diff: extensions/renderer/dispatcher.cc

Issue 2517393002: [Extensions] Remove RequestSender::ScopedTabID (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « no previous file | extensions/renderer/request_sender.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/dispatcher.h" 5 #include "extensions/renderer/dispatcher.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after
977 } 977 }
978 978
979 void Dispatcher::OnCancelSuspend(const std::string& extension_id) { 979 void Dispatcher::OnCancelSuspend(const std::string& extension_id) {
980 DispatchEvent(extension_id, kOnSuspendCanceledEvent, base::ListValue(), 980 DispatchEvent(extension_id, kOnSuspendCanceledEvent, base::ListValue(),
981 base::DictionaryValue()); 981 base::DictionaryValue());
982 } 982 }
983 983
984 void Dispatcher::OnDeliverMessage(int target_port_id, 984 void Dispatcher::OnDeliverMessage(int target_port_id,
985 int source_tab_id, 985 int source_tab_id,
986 const Message& message) { 986 const Message& message) {
987 std::unique_ptr<RequestSender::ScopedTabID> scoped_tab_id;
988 if (source_tab_id != -1) {
989 scoped_tab_id.reset(new RequestSender::ScopedTabID(
990 bindings_system_->GetRequestSender(), source_tab_id));
991 }
992
993 MessagingBindings::DeliverMessage(*script_context_set_, target_port_id, 987 MessagingBindings::DeliverMessage(*script_context_set_, target_port_id,
994 message, 988 message,
995 NULL); // All render frames. 989 NULL); // All render frames.
996 } 990 }
997 991
998 void Dispatcher::OnDispatchOnConnect( 992 void Dispatcher::OnDispatchOnConnect(
999 int target_port_id, 993 int target_port_id,
1000 const std::string& channel_name, 994 const std::string& channel_name,
1001 const ExtensionMsg_TabConnectionInfo& source, 995 const ExtensionMsg_TabConnectionInfo& source,
1002 const ExtensionMsg_ExternalConnectionInfo& info, 996 const ExtensionMsg_ExternalConnectionInfo& info,
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
1454 // The "guestViewDeny" module must always be loaded last. It registers 1448 // The "guestViewDeny" module must always be loaded last. It registers
1455 // error-providing custom elements for the GuestView types that are not 1449 // error-providing custom elements for the GuestView types that are not
1456 // available, and thus all of those types must have been checked and loaded 1450 // available, and thus all of those types must have been checked and loaded
1457 // (or not loaded) beforehand. 1451 // (or not loaded) beforehand.
1458 if (context_type == Feature::BLESSED_EXTENSION_CONTEXT) { 1452 if (context_type == Feature::BLESSED_EXTENSION_CONTEXT) {
1459 module_system->Require("guestViewDeny"); 1453 module_system->Require("guestViewDeny");
1460 } 1454 }
1461 } 1455 }
1462 1456
1463 } // namespace extensions 1457 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | extensions/renderer/request_sender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698