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

Side by Side Diff: chrome/browser/extensions/api/messaging/message_service.cc

Issue 2529213002: Delete TODO-comment about guest process/frame IDs in MessageService::OpenChannelImpl (Closed)
Patch Set: Revert all except for comment change Created 4 years 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/browser/extensions/api/messaging/message_service.h" 5 #include "chrome/browser/extensions/api/messaging/message_service.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <limits> 8 #include <limits>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 return; 587 return;
588 } 588 }
589 589
590 std::unique_ptr<MessageChannel> channel_ptr = 590 std::unique_ptr<MessageChannel> channel_ptr =
591 base::MakeUnique<MessageChannel>(); 591 base::MakeUnique<MessageChannel>();
592 MessageChannel* channel = channel_ptr.get(); 592 MessageChannel* channel = channel_ptr.get();
593 channel->opener.reset(opener.release()); 593 channel->opener.reset(opener.release());
594 channel->receiver.reset(params->receiver.release()); 594 channel->receiver.reset(params->receiver.release());
595 AddChannel(std::move(channel_ptr), params->receiver_port_id); 595 AddChannel(std::move(channel_ptr), params->receiver_port_id);
596 596
597 // TODO(robwu): Could |guest_process_id| and |guest_render_frame_routing_id|
598 // be removed? In the past extension message routing was process-based, but
599 // now that extensions are routed from a specific RFH, the special casing for
600 // guest views seems no longer necessary, because the ExtensionMessagePort can
601 // simply obtain the source process & frame ID directly from the RFH.
602 int guest_process_id = content::ChildProcessHost::kInvalidUniqueID; 597 int guest_process_id = content::ChildProcessHost::kInvalidUniqueID;
603 int guest_render_frame_routing_id = MSG_ROUTING_NONE; 598 int guest_render_frame_routing_id = MSG_ROUTING_NONE;
604 if (params->include_guest_process_info) { 599 if (params->include_guest_process_info) {
605 guest_process_id = params->source_process_id; 600 guest_process_id = params->source_process_id;
606 guest_render_frame_routing_id = params->source_routing_id; 601 guest_render_frame_routing_id = params->source_routing_id;
607 602
608 DCHECK(WebViewGuest::FromWebContents( 603 DCHECK(WebViewGuest::FromWebContents(
609 WebContents::FromRenderFrameHost(source))); 604 WebContents::FromRenderFrameHost(source)));
610 } 605 }
611 606
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
1018 MessageChannelMap::iterator channel_iter = channels_.find(channel_id); 1013 MessageChannelMap::iterator channel_iter = channels_.find(channel_id);
1019 if (channel_iter != channels_.end()) { 1014 if (channel_iter != channels_.end()) {
1020 for (const PendingMessage& message : queue) { 1015 for (const PendingMessage& message : queue) {
1021 DispatchMessage(message.first, channel_iter->second.get(), 1016 DispatchMessage(message.first, channel_iter->second.get(),
1022 message.second); 1017 message.second);
1023 } 1018 }
1024 } 1019 }
1025 } 1020 }
1026 1021
1027 } // namespace extensions 1022 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698