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

Side by Side Diff: content/browser/message_port_service.cc

Issue 831523004: Enable posting a message from JS to Android webview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix component builds Created 5 years, 11 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
OLDNEW
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 "content/browser/message_port_service.h" 5 #include "content/browser/message_port_service.h"
6 6
7 #include "content/browser/message_port_delegate.h"
8 #include "content/common/message_port_messages.h" 7 #include "content/common/message_port_messages.h"
9 #include "content/public/browser/browser_thread.h" 8 #include "content/public/browser/browser_thread.h"
9 #include "content/public/browser/message_port_delegate.h"
10 10
11 namespace content { 11 namespace content {
12 12
13 struct MessagePortService::MessagePort { 13 struct MessagePortService::MessagePort {
14 // |delegate| and |route_id| are what we need to send messages to the port. 14 // |delegate| and |route_id| are what we need to send messages to the port.
15 // |delegate| is just a raw pointer since it notifies us by calling 15 // |delegate| is just a raw pointer since it notifies us by calling
16 // OnMessagePortDelegateClosing before it gets destroyed. 16 // OnMessagePortDelegateClosing before it gets destroyed.
17 MessagePortDelegate* delegate; 17 MessagePortDelegate* delegate;
18 int route_id; 18 int route_id;
19 // A globally unique id for this message port. 19 // A globally unique id for this message port.
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 // Do the disentanglement (and be paranoid about the other side existing 307 // Do the disentanglement (and be paranoid about the other side existing
308 // just in case something unusual happened during entanglement). 308 // just in case something unusual happened during entanglement).
309 if (message_ports_.count(entangled_id)) { 309 if (message_ports_.count(entangled_id)) {
310 message_ports_[entangled_id].entangled_message_port_id = MSG_ROUTING_NONE; 310 message_ports_[entangled_id].entangled_message_port_id = MSG_ROUTING_NONE;
311 } 311 }
312 } 312 }
313 message_ports_.erase(erase_item); 313 message_ports_.erase(erase_item);
314 } 314 }
315 315
316 } // namespace content 316 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698