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

Side by Side Diff: remoting/host/client_session.h

Issue 12220092: Rename ClientDimensions to ClientResolution and add pixel-size and DPI fields. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix typos in ChromotingInstance. Created 7 years, 10 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 #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"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 virtual void OnSessionSequenceNumber(ClientSession* client, 71 virtual void OnSessionSequenceNumber(ClientSession* client,
72 int64 sequence_number) = 0; 72 int64 sequence_number) = 0;
73 73
74 // Called on notification of a route change event, when a channel is 74 // Called on notification of a route change event, when a channel is
75 // connected. 75 // connected.
76 virtual void OnSessionRouteChange( 76 virtual void OnSessionRouteChange(
77 ClientSession* client, 77 ClientSession* client,
78 const std::string& channel_name, 78 const std::string& channel_name,
79 const protocol::TransportRoute& route) = 0; 79 const protocol::TransportRoute& route) = 0;
80 80
81 // Called when the initial client dimensions are received, and when they 81 // Called when the initial client resolution is received, and when it
82 // change. 82 // changes.
83 virtual void OnClientDimensionsChanged(ClientSession* client, 83 virtual void OnClientResolutionChanged(ClientSession* client,
84 const SkISize& size) = 0; 84 const SkISize& size,
85 const SkIPoint& dpi) = 0;
85 86
86 protected: 87 protected:
87 virtual ~EventHandler() {} 88 virtual ~EventHandler() {}
88 }; 89 };
89 90
90 // |event_handler| must outlive |this|. |desktop_environment_factory| is only 91 // |event_handler| must outlive |this|. |desktop_environment_factory| is only
91 // used by the constructor to create an instance of DesktopEnvironment. 92 // used by the constructor to create an instance of DesktopEnvironment.
92 ClientSession( 93 ClientSession(
93 EventHandler* event_handler, 94 EventHandler* event_handler,
94 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner, 95 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner,
95 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, 96 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
96 scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner, 97 scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner,
97 scoped_refptr<base::SingleThreadTaskRunner> video_encode_task_runner, 98 scoped_refptr<base::SingleThreadTaskRunner> video_encode_task_runner,
98 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner, 99 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner,
99 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, 100 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
100 scoped_ptr<protocol::ConnectionToClient> connection, 101 scoped_ptr<protocol::ConnectionToClient> connection,
101 DesktopEnvironmentFactory* desktop_environment_factory, 102 DesktopEnvironmentFactory* desktop_environment_factory,
102 const base::TimeDelta& max_duration); 103 const base::TimeDelta& max_duration);
103 104
104 // protocol::HostStub interface. 105 // protocol::HostStub interface.
105 virtual void NotifyClientDimensions( 106 virtual void NotifyClientResolution(
106 const protocol::ClientDimensions& dimensions) OVERRIDE; 107 const protocol::ClientResolution& resolution) OVERRIDE;
107 virtual void ControlVideo( 108 virtual void ControlVideo(
108 const protocol::VideoControl& video_control) OVERRIDE; 109 const protocol::VideoControl& video_control) OVERRIDE;
109 virtual void ControlAudio( 110 virtual void ControlAudio(
110 const protocol::AudioControl& audio_control) OVERRIDE; 111 const protocol::AudioControl& audio_control) OVERRIDE;
111 112
112 // protocol::ConnectionToClient::EventHandler interface. 113 // protocol::ConnectionToClient::EventHandler interface.
113 virtual void OnConnectionAuthenticated( 114 virtual void OnConnectionAuthenticated(
114 protocol::ConnectionToClient* connection) OVERRIDE; 115 protocol::ConnectionToClient* connection) OVERRIDE;
115 virtual void OnConnectionChannelsConnected( 116 virtual void OnConnectionChannelsConnected(
116 protocol::ConnectionToClient* connection) OVERRIDE; 117 protocol::ConnectionToClient* connection) OVERRIDE;
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 }; 234 };
234 235
235 // Destroys |ClienSession| instances on the network thread. 236 // Destroys |ClienSession| instances on the network thread.
236 struct ClientSessionTraits { 237 struct ClientSessionTraits {
237 static void Destruct(const ClientSession* client); 238 static void Destruct(const ClientSession* client);
238 }; 239 };
239 240
240 } // namespace remoting 241 } // namespace remoting
241 242
242 #endif // REMOTING_HOST_CLIENT_SESSION_H_ 243 #endif // REMOTING_HOST_CLIENT_SESSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698