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

Side by Side Diff: remoting/client/plugin/chromoting_instance.h

Issue 10382184: [Chromoting] Initial plumbing for cursor shape. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove unused vars. Fix Mac Capturer Unittest. Created 8 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « remoting/client/chromoting_view.h ('k') | remoting/client/plugin/chromoting_instance.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 // 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
(...skipping 14 matching lines...) Expand all
25 #endif 25 #endif
26 26
27 #include "ppapi/cpp/instance.h" 27 #include "ppapi/cpp/instance.h"
28 #include "remoting/base/scoped_thread_proxy.h" 28 #include "remoting/base/scoped_thread_proxy.h"
29 #include "remoting/client/client_context.h" 29 #include "remoting/client/client_context.h"
30 #include "remoting/client/key_event_mapper.h" 30 #include "remoting/client/key_event_mapper.h"
31 #include "remoting/client/plugin/mac_key_event_processor.h" 31 #include "remoting/client/plugin/mac_key_event_processor.h"
32 #include "remoting/client/plugin/pepper_plugin_thread_delegate.h" 32 #include "remoting/client/plugin/pepper_plugin_thread_delegate.h"
33 #include "remoting/proto/event.pb.h" 33 #include "remoting/proto/event.pb.h"
34 #include "remoting/protocol/clipboard_stub.h" 34 #include "remoting/protocol/clipboard_stub.h"
35 #include "remoting/protocol/cursor_shape_stub.h"
35 #include "remoting/protocol/connection_to_host.h" 36 #include "remoting/protocol/connection_to_host.h"
36 37
37 namespace base { 38 namespace base {
38 class DictionaryValue; 39 class DictionaryValue;
39 } // namespace base 40 } // namespace base
40 41
41 namespace pp { 42 namespace pp {
42 class InputEvent; 43 class InputEvent;
43 class Module; 44 class Module;
44 } // namespace pp 45 } // namespace pp
(...skipping 12 matching lines...) Expand all
57 class FrameConsumerProxy; 58 class FrameConsumerProxy;
58 class PepperInputHandler; 59 class PepperInputHandler;
59 class PepperView; 60 class PepperView;
60 class PepperXmppProxy; 61 class PepperXmppProxy;
61 class RectangleUpdateDecoder; 62 class RectangleUpdateDecoder;
62 63
63 struct ClientConfig; 64 struct ClientConfig;
64 65
65 class ChromotingInstance : 66 class ChromotingInstance :
66 public protocol::ClipboardStub, 67 public protocol::ClipboardStub,
68 public protocol::CursorShapeStub,
67 public pp::Instance, 69 public pp::Instance,
68 public base::SupportsWeakPtr<ChromotingInstance> { 70 public base::SupportsWeakPtr<ChromotingInstance> {
69 public: 71 public:
70 // These state values are duplicated in the JS code. Remember to 72 // These state values are duplicated in the JS code. Remember to
71 // update both copies when making changes. 73 // update both copies when making changes.
72 enum ConnectionState { 74 enum ConnectionState {
73 STATE_CONNECTING = 1, 75 STATE_CONNECTING = 1,
74 STATE_INITIALIZING, 76 STATE_INITIALIZING,
75 STATE_CONNECTED, 77 STATE_CONNECTED,
76 STATE_CLOSED, 78 STATE_CLOSED,
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 const pp::Rect& clip) OVERRIDE; 120 const pp::Rect& clip) OVERRIDE;
119 virtual bool Init(uint32_t argc, const char* argn[], 121 virtual bool Init(uint32_t argc, const char* argn[],
120 const char* argv[]) OVERRIDE; 122 const char* argv[]) OVERRIDE;
121 virtual void HandleMessage(const pp::Var& message) OVERRIDE; 123 virtual void HandleMessage(const pp::Var& message) OVERRIDE;
122 virtual bool HandleInputEvent(const pp::InputEvent& event) OVERRIDE; 124 virtual bool HandleInputEvent(const pp::InputEvent& event) OVERRIDE;
123 125
124 // ClipboardStub implementation. 126 // ClipboardStub implementation.
125 virtual void InjectClipboardEvent(const protocol::ClipboardEvent& event) 127 virtual void InjectClipboardEvent(const protocol::ClipboardEvent& event)
126 OVERRIDE; 128 OVERRIDE;
127 129
130 // CursorShapeStub implementation.
131 virtual void SetCursorShape(const protocol::CursorShapeInfo& cursor_shape)
132 OVERRIDE;
133
128 // Called by PepperView. 134 // Called by PepperView.
129 void SetDesktopSize(int width, int height); 135 void SetDesktopSize(int width, int height);
130 void SetConnectionState(ConnectionState state, ConnectionError error); 136 void SetConnectionState(ConnectionState state, ConnectionError error);
131 void OnFirstFrameReceived(); 137 void OnFirstFrameReceived();
132 138
133 // Message handlers for messages that come from JavaScript. Called 139 // Message handlers for messages that come from JavaScript. Called
134 // from HandleMessage(). 140 // from HandleMessage().
135 void Connect(const ClientConfig& config); 141 void Connect(const ClientConfig& config);
136 void Disconnect(); 142 void Disconnect();
137 void OnIncomingIq(const std::string& iq); 143 void OnIncomingIq(const std::string& iq);
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 scoped_refptr<PepperXmppProxy> xmpp_proxy_; 221 scoped_refptr<PepperXmppProxy> xmpp_proxy_;
216 222
217 scoped_ptr<ScopedThreadProxy> thread_proxy_; 223 scoped_ptr<ScopedThreadProxy> thread_proxy_;
218 224
219 DISALLOW_COPY_AND_ASSIGN(ChromotingInstance); 225 DISALLOW_COPY_AND_ASSIGN(ChromotingInstance);
220 }; 226 };
221 227
222 } // namespace remoting 228 } // namespace remoting
223 229
224 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ 230 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_
OLDNEW
« no previous file with comments | « remoting/client/chromoting_view.h ('k') | remoting/client/plugin/chromoting_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698