OLD | NEW |
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 // TODO(ajwong): We need to come up with a better description of the | 5 // TODO(ajwong): We need to come up with a better description of the |
6 // responsibilities for each thread. | 6 // responsibilities for each thread. |
7 | 7 |
8 #ifndef REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ | 8 #ifndef REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ |
9 #define REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ | 9 #define REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ |
10 | 10 |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
16 #include "ppapi/c/pp_instance.h" | 16 #include "ppapi/c/pp_instance.h" |
17 #include "ppapi/c/pp_rect.h" | 17 #include "ppapi/c/pp_rect.h" |
18 #include "ppapi/c/pp_resource.h" | 18 #include "ppapi/c/pp_resource.h" |
19 #include "ppapi/cpp/var.h" | 19 #include "ppapi/cpp/var.h" |
| 20 #include "third_party/skia/include/core/SkPoint.h" |
| 21 #include "third_party/skia/include/core/SkSize.h" |
20 | 22 |
21 // Windows defines 'PostMessage', so we have to undef it before we | 23 // Windows defines 'PostMessage', so we have to undef it before we |
22 // include instance_private.h | 24 // include instance_private.h |
23 #if defined(PostMessage) | 25 #if defined(PostMessage) |
24 #undef PostMessage | 26 #undef PostMessage |
25 #endif | 27 #endif |
26 | 28 |
27 #include "ppapi/cpp/instance.h" | 29 #include "ppapi/cpp/instance.h" |
28 #include "remoting/client/client_context.h" | 30 #include "remoting/client/client_context.h" |
29 #include "remoting/client/key_event_mapper.h" | 31 #include "remoting/client/key_event_mapper.h" |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 | 127 |
126 // ClipboardStub implementation. | 128 // ClipboardStub implementation. |
127 virtual void InjectClipboardEvent(const protocol::ClipboardEvent& event) | 129 virtual void InjectClipboardEvent(const protocol::ClipboardEvent& event) |
128 OVERRIDE; | 130 OVERRIDE; |
129 | 131 |
130 // CursorShapeStub implementation. | 132 // CursorShapeStub implementation. |
131 virtual void SetCursorShape(const protocol::CursorShapeInfo& cursor_shape) | 133 virtual void SetCursorShape(const protocol::CursorShapeInfo& cursor_shape) |
132 OVERRIDE; | 134 OVERRIDE; |
133 | 135 |
134 // Called by PepperView. | 136 // Called by PepperView. |
135 void SetDesktopSize(int width, int height); | 137 void SetDesktopSize(const SkISize& size, const SkIPoint& dpi); |
136 void SetConnectionState(ConnectionState state, ConnectionError error); | 138 void SetConnectionState(ConnectionState state, ConnectionError error); |
137 void OnFirstFrameReceived(); | 139 void OnFirstFrameReceived(); |
138 | 140 |
139 // Message handlers for messages that come from JavaScript. Called | 141 // Message handlers for messages that come from JavaScript. Called |
140 // from HandleMessage(). | 142 // from HandleMessage(). |
141 void Connect(const ClientConfig& config); | 143 void Connect(const ClientConfig& config); |
142 void Disconnect(); | 144 void Disconnect(); |
143 void OnIncomingIq(const std::string& iq); | 145 void OnIncomingIq(const std::string& iq); |
144 void ReleaseAllKeys(); | 146 void ReleaseAllKeys(); |
145 void InjectKeyEvent(const protocol::KeyEvent& event); | 147 void InjectKeyEvent(const protocol::KeyEvent& event); |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 scoped_refptr<PepperXmppProxy> xmpp_proxy_; | 224 scoped_refptr<PepperXmppProxy> xmpp_proxy_; |
223 | 225 |
224 base::WeakPtrFactory<ChromotingInstance> weak_factory_; | 226 base::WeakPtrFactory<ChromotingInstance> weak_factory_; |
225 | 227 |
226 DISALLOW_COPY_AND_ASSIGN(ChromotingInstance); | 228 DISALLOW_COPY_AND_ASSIGN(ChromotingInstance); |
227 }; | 229 }; |
228 | 230 |
229 } // namespace remoting | 231 } // namespace remoting |
230 | 232 |
231 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ | 233 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ |
OLD | NEW |