| 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 #ifndef REMOTING_HOST_CLIENT_SESSION_H_ | 5 #ifndef REMOTING_HOST_CLIENT_SESSION_H_ |
| 6 #define REMOTING_HOST_CLIENT_SESSION_H_ | 6 #define REMOTING_HOST_CLIENT_SESSION_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "base/sequenced_task_runner_helpers.h" | 11 #include "base/sequenced_task_runner_helpers.h" |
| 12 #include "base/time.h" | 12 #include "base/time.h" |
| 13 #include "base/timer.h" | 13 #include "base/timer.h" |
| 14 #include "base/threading/non_thread_safe.h" | 14 #include "base/threading/non_thread_safe.h" |
| 15 #include "remoting/host/mouse_clamping_filter.h" | 15 #include "remoting/host/mouse_clamping_filter.h" |
| 16 #include "remoting/host/remote_input_filter.h" | 16 #include "remoting/host/remote_input_filter.h" |
| 17 #include "remoting/protocol/clipboard_echo_filter.h" | 17 #include "remoting/protocol/clipboard_echo_filter.h" |
| 18 #include "remoting/protocol/clipboard_filter.h" | 18 #include "remoting/protocol/clipboard_filter.h" |
| 19 #include "remoting/protocol/clipboard_stub.h" | 19 #include "remoting/protocol/clipboard_stub.h" |
| 20 #include "remoting/protocol/connection_to_client.h" | 20 #include "remoting/protocol/connection_to_client.h" |
| 21 #include "remoting/protocol/host_stub.h" | 21 #include "remoting/protocol/host_stub.h" |
| 22 #include "remoting/protocol/input_event_tracker.h" | 22 #include "remoting/protocol/input_event_tracker.h" |
| 23 #include "remoting/protocol/input_filter.h" | 23 #include "remoting/protocol/input_filter.h" |
| 24 #include "remoting/protocol/input_stub.h" | 24 #include "remoting/protocol/input_stub.h" |
| 25 #include "third_party/skia/include/core/SkPoint.h" | 25 #include "third_party/skia/include/core/SkPoint.h" |
| 26 #include "third_party/skia/include/core/SkSize.h" |
| 26 | 27 |
| 27 namespace base { | 28 namespace base { |
| 28 class SingleThreadTaskRunner; | 29 class SingleThreadTaskRunner; |
| 29 } // namespace base | 30 } // namespace base |
| 30 | 31 |
| 31 namespace remoting { | 32 namespace remoting { |
| 32 | 33 |
| 33 class AudioEncoder; | 34 class AudioEncoder; |
| 34 class AudioScheduler; | 35 class AudioScheduler; |
| 35 struct ClientSessionTraits; | 36 struct ClientSessionTraits; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 virtual void OnSessionSequenceNumber(ClientSession* client, | 69 virtual void OnSessionSequenceNumber(ClientSession* client, |
| 69 int64 sequence_number) = 0; | 70 int64 sequence_number) = 0; |
| 70 | 71 |
| 71 // Called on notification of a route change event, when a channel is | 72 // Called on notification of a route change event, when a channel is |
| 72 // connected. | 73 // connected. |
| 73 virtual void OnSessionRouteChange( | 74 virtual void OnSessionRouteChange( |
| 74 ClientSession* client, | 75 ClientSession* client, |
| 75 const std::string& channel_name, | 76 const std::string& channel_name, |
| 76 const protocol::TransportRoute& route) = 0; | 77 const protocol::TransportRoute& route) = 0; |
| 77 | 78 |
| 79 // Called when the initial client dimensions are received, and when they |
| 80 // change. |
| 81 virtual void OnClientDimensionsChanged(ClientSession* client, |
| 82 const SkISize& size) = 0; |
| 83 |
| 78 protected: | 84 protected: |
| 79 virtual ~EventHandler() {} | 85 virtual ~EventHandler() {} |
| 80 }; | 86 }; |
| 81 | 87 |
| 82 ClientSession(EventHandler* event_handler, | 88 ClientSession(EventHandler* event_handler, |
| 83 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner, | 89 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner, |
| 84 scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner, | 90 scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner, |
| 85 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner, | 91 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner, |
| 86 scoped_ptr<protocol::ConnectionToClient> connection, | 92 scoped_ptr<protocol::ConnectionToClient> connection, |
| 87 scoped_ptr<DesktopEnvironment> desktop_environment, | 93 scoped_ptr<DesktopEnvironment> desktop_environment, |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 }; | 231 }; |
| 226 | 232 |
| 227 // Destroys |ClienSession| instances on the network thread. | 233 // Destroys |ClienSession| instances on the network thread. |
| 228 struct ClientSessionTraits { | 234 struct ClientSessionTraits { |
| 229 static void Destruct(const ClientSession* client); | 235 static void Destruct(const ClientSession* client); |
| 230 }; | 236 }; |
| 231 | 237 |
| 232 } // namespace remoting | 238 } // namespace remoting |
| 233 | 239 |
| 234 #endif // REMOTING_HOST_CLIENT_SESSION_H_ | 240 #endif // REMOTING_HOST_CLIENT_SESSION_H_ |
| OLD | NEW |