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

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

Issue 22477006: Added JsonMessage to the control channel. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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
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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 virtual void HandleMessage(const pp::Var& message) OVERRIDE; 113 virtual void HandleMessage(const pp::Var& message) OVERRIDE;
114 virtual bool HandleInputEvent(const pp::InputEvent& event) OVERRIDE; 114 virtual bool HandleInputEvent(const pp::InputEvent& event) OVERRIDE;
115 115
116 // ClientUserInterface interface. 116 // ClientUserInterface interface.
117 virtual void OnConnectionState(protocol::ConnectionToHost::State state, 117 virtual void OnConnectionState(protocol::ConnectionToHost::State state,
118 protocol::ErrorCode error) OVERRIDE; 118 protocol::ErrorCode error) OVERRIDE;
119 virtual void OnConnectionReady(bool ready) OVERRIDE; 119 virtual void OnConnectionReady(bool ready) OVERRIDE;
120 virtual void SetCapabilities(const std::string& capabilities) OVERRIDE; 120 virtual void SetCapabilities(const std::string& capabilities) OVERRIDE;
121 virtual void SetPairingResponse( 121 virtual void SetPairingResponse(
122 const protocol::PairingResponse& pairing_response) OVERRIDE; 122 const protocol::PairingResponse& pairing_response) OVERRIDE;
123 virtual void ProcessHostJson(const protocol::JsonMessage& json) OVERRIDE;
123 virtual protocol::ClipboardStub* GetClipboardStub() OVERRIDE; 124 virtual protocol::ClipboardStub* GetClipboardStub() OVERRIDE;
124 virtual protocol::CursorShapeStub* GetCursorShapeStub() OVERRIDE; 125 virtual protocol::CursorShapeStub* GetCursorShapeStub() OVERRIDE;
125 virtual scoped_ptr<protocol::ThirdPartyClientAuthenticator::TokenFetcher> 126 virtual scoped_ptr<protocol::ThirdPartyClientAuthenticator::TokenFetcher>
126 GetTokenFetcher(const std::string& host_public_key) OVERRIDE; 127 GetTokenFetcher(const std::string& host_public_key) OVERRIDE;
127 128
128 // protocol::ClipboardStub interface. 129 // protocol::ClipboardStub interface.
129 virtual void InjectClipboardEvent( 130 virtual void InjectClipboardEvent(
130 const protocol::ClipboardEvent& event) OVERRIDE; 131 const protocol::ClipboardEvent& event) OVERRIDE;
131 132
132 // protocol::CursorShapeStub interface. 133 // protocol::CursorShapeStub interface.
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 void RemapKey(uint32 in_usb_keycode, uint32 out_usb_keycode); 192 void RemapKey(uint32 in_usb_keycode, uint32 out_usb_keycode);
192 void TrapKey(uint32 usb_keycode, bool trap); 193 void TrapKey(uint32 usb_keycode, bool trap);
193 void SendClipboardItem(const std::string& mime_type, const std::string& item); 194 void SendClipboardItem(const std::string& mime_type, const std::string& item);
194 void NotifyClientResolution(int width, int height, int x_dpi, int y_dpi); 195 void NotifyClientResolution(int width, int height, int x_dpi, int y_dpi);
195 void PauseVideo(bool pause); 196 void PauseVideo(bool pause);
196 void PauseAudio(bool pause); 197 void PauseAudio(bool pause);
197 void OnPinFetched(const std::string& pin); 198 void OnPinFetched(const std::string& pin);
198 void OnThirdPartyTokenFetched(const std::string& token, 199 void OnThirdPartyTokenFetched(const std::string& token,
199 const std::string& shared_secret); 200 const std::string& shared_secret);
200 void RequestPairing(const std::string& client_name); 201 void RequestPairing(const std::string& client_name);
202 void SendClientJson(const std::string& type, const std::string& json);
201 203
202 // Helper method to post messages to the webapp. 204 // Helper method to post messages to the webapp.
203 void PostChromotingMessage(const std::string& method, 205 void PostChromotingMessage(const std::string& method,
204 scoped_ptr<base::DictionaryValue> data); 206 scoped_ptr<base::DictionaryValue> data);
205 207
206 // Posts trapped keys to the web-app to handle. 208 // Posts trapped keys to the web-app to handle.
207 void SendTrappedKey(uint32 usb_keycode, bool pressed); 209 void SendTrappedKey(uint32 usb_keycode, bool pressed);
208 210
209 // Callback for PepperSignalStrategy. 211 // Callback for PepperSignalStrategy.
210 void SendOutgoingIq(const std::string& iq); 212 void SendOutgoingIq(const std::string& iq);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 261
260 // Weak reference to this instance, used for global logging and task posting. 262 // Weak reference to this instance, used for global logging and task posting.
261 base::WeakPtrFactory<ChromotingInstance> weak_factory_; 263 base::WeakPtrFactory<ChromotingInstance> weak_factory_;
262 264
263 DISALLOW_COPY_AND_ASSIGN(ChromotingInstance); 265 DISALLOW_COPY_AND_ASSIGN(ChromotingInstance);
264 }; 266 };
265 267
266 } // namespace remoting 268 } // namespace remoting
267 269
268 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ 270 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698