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

Side by Side Diff: content/child/webmessageportchannel_impl.h

Issue 511183002: Manual fixups in content/child for scoped_refptr operator T* removal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « content/child/thread_safe_sender.cc ('k') | content/child/webmessageportchannel_impl.cc » ('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 (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 #ifndef CONTENT_CHILD_WEBMESSAGEPORTCHANNEL_IMPL_H_ 5 #ifndef CONTENT_CHILD_WEBMESSAGEPORTCHANNEL_IMPL_H_
6 #define CONTENT_CHILD_WEBMESSAGEPORTCHANNEL_IMPL_H_ 6 #define CONTENT_CHILD_WEBMESSAGEPORTCHANNEL_IMPL_H_
7 7
8 #include <queue> 8 #include <queue>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 10 matching lines...) Expand all
21 21
22 namespace content { 22 namespace content {
23 class ChildThread; 23 class ChildThread;
24 24
25 // This is thread safe. 25 // This is thread safe.
26 class WebMessagePortChannelImpl 26 class WebMessagePortChannelImpl
27 : public blink::WebMessagePortChannel, 27 : public blink::WebMessagePortChannel,
28 public IPC::Listener, 28 public IPC::Listener,
29 public base::RefCountedThreadSafe<WebMessagePortChannelImpl> { 29 public base::RefCountedThreadSafe<WebMessagePortChannelImpl> {
30 public: 30 public:
31 explicit WebMessagePortChannelImpl(base::MessageLoopProxy* child_thread_loop); 31 explicit WebMessagePortChannelImpl(
32 WebMessagePortChannelImpl(int route_id, 32 const scoped_refptr<base::MessageLoopProxy>& child_thread_loop);
33 int message_port_id, 33 WebMessagePortChannelImpl(
34 base::MessageLoopProxy* child_thread_loop); 34 int route_id,
35 int message_port_id,
36 const scoped_refptr<base::MessageLoopProxy>& child_thread_loop);
35 37
36 static void CreatePair(base::MessageLoopProxy* child_thread_loop, 38 static void CreatePair(
37 blink::WebMessagePortChannel** channel1, 39 const scoped_refptr<base::MessageLoopProxy>& child_thread_loop,
38 blink::WebMessagePortChannel** channel2); 40 blink::WebMessagePortChannel** channel1,
41 blink::WebMessagePortChannel** channel2);
39 42
40 // Extracts port IDs for passing on to the browser process, and queues any 43 // Extracts port IDs for passing on to the browser process, and queues any
41 // received messages. Takes ownership of the passed array (and deletes it). 44 // received messages. Takes ownership of the passed array (and deletes it).
42 static std::vector<int> ExtractMessagePortIDs( 45 static std::vector<int> ExtractMessagePortIDs(
43 blink::WebMessagePortChannelArray* channels); 46 blink::WebMessagePortChannelArray* channels);
44 47
45 // Queues received and incoming messages until there are no more in-flight 48 // Queues received and incoming messages until there are no more in-flight
46 // messages, then sends all of them to the browser process. 49 // messages, then sends all of them to the browser process.
47 void QueueMessages(); 50 void QueueMessages();
48 int message_port_id() const { return message_port_id_; } 51 int message_port_id() const { return message_port_id_; }
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 int route_id_; // The routing id for this object. 93 int route_id_; // The routing id for this object.
91 int message_port_id_; // A globally unique identifier for this message port. 94 int message_port_id_; // A globally unique identifier for this message port.
92 scoped_refptr<base::MessageLoopProxy> child_thread_loop_; 95 scoped_refptr<base::MessageLoopProxy> child_thread_loop_;
93 96
94 DISALLOW_COPY_AND_ASSIGN(WebMessagePortChannelImpl); 97 DISALLOW_COPY_AND_ASSIGN(WebMessagePortChannelImpl);
95 }; 98 };
96 99
97 } // namespace content 100 } // namespace content
98 101
99 #endif // CONTENT_CHILD_WEBMESSAGEPORTCHANNEL_IMPL_H_ 102 #endif // CONTENT_CHILD_WEBMESSAGEPORTCHANNEL_IMPL_H_
OLDNEW
« no previous file with comments | « content/child/thread_safe_sender.cc ('k') | content/child/webmessageportchannel_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698