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

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

Issue 11227033: Move a bunch of code in content\common (as well as a few left in renderer) to the content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix cros Created 8 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 | Annotate | Revision Log
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_COMMON_WEBMESSAGEPORTCHANNEL_IMPL_H_ 5 #ifndef CONTENT_COMMON_WEBMESSAGEPORTCHANNEL_IMPL_H_
6 #define CONTENT_COMMON_WEBMESSAGEPORTCHANNEL_IMPL_H_ 6 #define CONTENT_COMMON_WEBMESSAGEPORTCHANNEL_IMPL_H_
7 7
8 #include <queue> 8 #include <queue>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/string16.h" 13 #include "base/string16.h"
14 #include "base/synchronization/lock.h" 14 #include "base/synchronization/lock.h"
15 #include "ipc/ipc_listener.h" 15 #include "ipc/ipc_listener.h"
16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMessagePortChannel .h" 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMessagePortChannel .h"
17 17
18 namespace content {
19
18 // This is thread safe. 20 // This is thread safe.
19 class WebMessagePortChannelImpl 21 class WebMessagePortChannelImpl
20 : public WebKit::WebMessagePortChannel, 22 : public WebKit::WebMessagePortChannel,
21 public IPC::Listener, 23 public IPC::Listener,
22 public base::RefCountedThreadSafe<WebMessagePortChannelImpl> { 24 public base::RefCountedThreadSafe<WebMessagePortChannelImpl> {
23 public: 25 public:
24 WebMessagePortChannelImpl(); 26 WebMessagePortChannelImpl();
25 WebMessagePortChannelImpl(int route_id, int message_port_id); 27 WebMessagePortChannelImpl(int route_id, int message_port_id);
26 28
27 // Queues received and incoming messages until there are no more in-flight 29 // Queues received and incoming messages until there are no more in-flight
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 69
68 WebKit::WebMessagePortChannelClient* client_; 70 WebKit::WebMessagePortChannelClient* client_;
69 base::Lock lock_; // Locks access to above. 71 base::Lock lock_; // Locks access to above.
70 72
71 int route_id_; // The routing id for this object. 73 int route_id_; // The routing id for this object.
72 int message_port_id_; // A globally unique identifier for this message port. 74 int message_port_id_; // A globally unique identifier for this message port.
73 75
74 DISALLOW_COPY_AND_ASSIGN(WebMessagePortChannelImpl); 76 DISALLOW_COPY_AND_ASSIGN(WebMessagePortChannelImpl);
75 }; 77 };
76 78
79 } // namespace content
80
77 #endif // CONTENT_COMMON_WEBMESSAGEPORTCHANNEL_IMPL_H_ 81 #endif // CONTENT_COMMON_WEBMESSAGEPORTCHANNEL_IMPL_H_
OLDNEW
« no previous file with comments | « content/common/webkitplatformsupport_impl.h ('k') | content/common/webmessageportchannel_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698