OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 CHROME_COMMON_WEBMESSAGEPORTCHANNEL_IMPL_H_ | 5 #ifndef CHROME_COMMON_WEBMESSAGEPORTCHANNEL_IMPL_H_ |
6 #define CHROME_COMMON_WEBMESSAGEPORTCHANNEL_IMPL_H_ | 6 #define CHROME_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/lock.h" | 12 #include "base/lock.h" |
13 #include "base/string16.h" | 13 #include "base/string16.h" |
14 #include "base/ref_counted.h" | 14 #include "base/ref_counted.h" |
15 #include "ipc/ipc_channel.h" | 15 #include "ipc/ipc_channel.h" |
16 #include "webkit/api/public/WebMessagePortChannel.h" | 16 #include "third_party/WebKit/WebKit/chromium/public/WebMessagePortChannel.h" |
17 | 17 |
18 // This is thread safe. | 18 // This is thread safe. |
19 class WebMessagePortChannelImpl | 19 class WebMessagePortChannelImpl |
20 : public WebKit::WebMessagePortChannel, | 20 : public WebKit::WebMessagePortChannel, |
21 public IPC::Channel::Listener, | 21 public IPC::Channel::Listener, |
22 public base::RefCountedThreadSafe<WebMessagePortChannelImpl> { | 22 public base::RefCountedThreadSafe<WebMessagePortChannelImpl> { |
23 public: | 23 public: |
24 WebMessagePortChannelImpl(); | 24 WebMessagePortChannelImpl(); |
25 WebMessagePortChannelImpl(int route_id, int message_port_id); | 25 WebMessagePortChannelImpl(int route_id, int message_port_id); |
26 | 26 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 WebKit::WebMessagePortChannelClient* client_; | 65 WebKit::WebMessagePortChannelClient* client_; |
66 Lock lock_; // Locks access to above. | 66 Lock lock_; // Locks access to above. |
67 | 67 |
68 int route_id_; // The routing id for this object. | 68 int route_id_; // The routing id for this object. |
69 int message_port_id_; // A globally unique identifier for this message port. | 69 int message_port_id_; // A globally unique identifier for this message port. |
70 | 70 |
71 DISALLOW_COPY_AND_ASSIGN(WebMessagePortChannelImpl); | 71 DISALLOW_COPY_AND_ASSIGN(WebMessagePortChannelImpl); |
72 }; | 72 }; |
73 | 73 |
74 #endif // CHROME_COMMON_WEBMESSAGEPORTCHANNEL_IMPL_H_ | 74 #endif // CHROME_COMMON_WEBMESSAGEPORTCHANNEL_IMPL_H_ |
OLD | NEW |