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

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

Issue 17511004: Added the desktop shape fields to VideoPacket. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CR feedback. Created 7 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/frame_producer.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
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" 20 #include "third_party/skia/include/core/SkPoint.h"
21 #include "third_party/skia/include/core/SkRegion.h"
21 #include "third_party/skia/include/core/SkSize.h" 22 #include "third_party/skia/include/core/SkSize.h"
22 23
23 // Windows defines 'PostMessage', so we have to undef it before we 24 // Windows defines 'PostMessage', so we have to undef it before we
24 // include instance_private.h 25 // include instance_private.h
25 #if defined(PostMessage) 26 #if defined(PostMessage)
26 #undef PostMessage 27 #undef PostMessage
27 #endif 28 #endif
28 29
29 #include "ppapi/cpp/instance.h" 30 #include "ppapi/cpp/instance.h"
30 #include "remoting/client/client_context.h" 31 #include "remoting/client/client_context.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
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.
133 virtual void SetCursorShape( 134 virtual void SetCursorShape(
134 const protocol::CursorShapeInfo& cursor_shape) OVERRIDE; 135 const protocol::CursorShapeInfo& cursor_shape) OVERRIDE;
135 136
136 // Called by PepperView. 137 // Called by PepperView.
137 void SetDesktopSize(const SkISize& size, const SkIPoint& dpi); 138 void SetDesktopSize(const SkISize& size, const SkIPoint& dpi);
139 void SetDesktopShape(const SkRegion& shape);
138 void OnFirstFrameReceived(); 140 void OnFirstFrameReceived();
139 141
140 // Return statistics record by ChromotingClient. 142 // Return statistics record by ChromotingClient.
141 // If no connection is currently active then NULL will be returned. 143 // If no connection is currently active then NULL will be returned.
142 ChromotingStats* GetStats(); 144 ChromotingStats* GetStats();
143 145
144 // Registers a global log message handler that redirects the log output to 146 // Registers a global log message handler that redirects the log output to
145 // our plugin instance. 147 // our plugin instance.
146 // This is called by the plugin's PPP_InitializeModule. 148 // This is called by the plugin's PPP_InitializeModule.
147 // Note that no logging will be processed unless a ChromotingInstance has been 149 // Note that no logging will be processed unless a ChromotingInstance has been
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 228
227 bool initialized_; 229 bool initialized_;
228 230
229 PepperPluginThreadDelegate plugin_thread_delegate_; 231 PepperPluginThreadDelegate plugin_thread_delegate_;
230 scoped_refptr<PluginThreadTaskRunner> plugin_task_runner_; 232 scoped_refptr<PluginThreadTaskRunner> plugin_task_runner_;
231 ClientContext context_; 233 ClientContext context_;
232 scoped_refptr<RectangleUpdateDecoder> rectangle_decoder_; 234 scoped_refptr<RectangleUpdateDecoder> rectangle_decoder_;
233 scoped_ptr<PepperView> view_; 235 scoped_ptr<PepperView> view_;
234 pp::View plugin_view_; 236 pp::View plugin_view_;
235 237
238 // Contains the most-recently-reported desktop shape, if any.
239 scoped_ptr<SkRegion> desktop_shape_;
240
236 scoped_ptr<PepperSignalStrategy> signal_strategy_; 241 scoped_ptr<PepperSignalStrategy> signal_strategy_;
237 242
238 scoped_ptr<protocol::ConnectionToHost> host_connection_; 243 scoped_ptr<protocol::ConnectionToHost> host_connection_;
239 scoped_ptr<ChromotingClient> client_; 244 scoped_ptr<ChromotingClient> client_;
240 245
241 // Input pipeline components, in reverse order of distance from input source. 246 // Input pipeline components, in reverse order of distance from input source.
242 protocol::MouseInputFilter mouse_input_filter_; 247 protocol::MouseInputFilter mouse_input_filter_;
243 protocol::InputEventTracker input_tracker_; 248 protocol::InputEventTracker input_tracker_;
244 #if defined(OS_MACOSX) 249 #if defined(OS_MACOSX)
245 MacKeyEventProcessor mac_key_event_processor_; 250 MacKeyEventProcessor mac_key_event_processor_;
246 #endif 251 #endif
247 KeyEventMapper key_mapper_; 252 KeyEventMapper key_mapper_;
248 PepperInputHandler input_handler_; 253 PepperInputHandler input_handler_;
249 254
250 // PIN Fetcher. 255 // PIN Fetcher.
251 bool use_async_pin_dialog_; 256 bool use_async_pin_dialog_;
252 protocol::SecretFetchedCallback secret_fetched_callback_; 257 protocol::SecretFetchedCallback secret_fetched_callback_;
253 258
254 base::WeakPtr<PepperTokenFetcher> pepper_token_fetcher_; 259 base::WeakPtr<PepperTokenFetcher> pepper_token_fetcher_;
255 260
256 base::WeakPtrFactory<ChromotingInstance> weak_factory_; 261 base::WeakPtrFactory<ChromotingInstance> weak_factory_;
257 262
258 DISALLOW_COPY_AND_ASSIGN(ChromotingInstance); 263 DISALLOW_COPY_AND_ASSIGN(ChromotingInstance);
259 }; 264 };
260 265
261 } // namespace remoting 266 } // namespace remoting
262 267
263 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ 268 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_
OLDNEW
« no previous file with comments | « remoting/client/frame_producer.h ('k') | remoting/client/plugin/chromoting_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698