OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef REMOTING_HOST_RESIZING_HOST_OBSERVER_H_ | |
6 #define REMOTING_HOST_RESIZING_HOST_OBSERVER_H_ | |
7 | |
8 #include <string> | |
9 | |
10 #include "remoting/host/host_status_observer.h" | |
11 #include "remoting/host/chromoting_host.h" | |
12 | |
13 #include "base/basictypes.h" | |
14 #include "base/compiler_specific.h" | |
15 #include "third_party/skia/include/core/SkSize.h" | |
16 | |
17 namespace remoting { | |
18 | |
19 class DesktopResizer; | |
20 | |
21 // Use the specified DesktopResizer to keep the match host desktop size to the | |
Wez
2012/09/25 20:48:29
typo: Remove "keep the"
Jamie
2012/09/25 23:20:20
Done.
| |
22 // client view size as far as is possible. When the connection closes, restore | |
Wez
2012/09/25 20:48:29
nit: "as far as is" -> "as closely as"
Jamie
2012/09/25 23:20:20
Done.
| |
23 // the original desktop size. | |
24 class ResizingHostObserver : public HostStatusObserver { | |
25 public: | |
26 explicit ResizingHostObserver(DesktopResizer* desktop_resizer, | |
27 ChromotingHost* host); | |
28 virtual ~ResizingHostObserver(); | |
29 | |
30 // HostStatusObserver interface | |
31 virtual void OnClientAuthenticated(const std::string& jid) OVERRIDE; | |
32 virtual void OnClientDisconnected(const std::string& jid) OVERRIDE; | |
33 virtual void OnClientDimensionsChanged(const std::string& jid, | |
34 const SkISize& size) OVERRIDE; | |
35 | |
36 private: | |
37 DesktopResizer* desktop_resizer_; | |
38 scoped_refptr<ChromotingHost> host_; | |
39 SkISize original_size_; | |
40 SkISize previous_size_; | |
41 std::string client_jid_; | |
42 | |
43 DISALLOW_COPY_AND_ASSIGN(ResizingHostObserver); | |
44 }; | |
45 | |
46 } // namespace remoting | |
47 | |
48 #endif // REMOTING_HOST_RESIZING_HOST_OBSERVER_H_ | |
OLD | NEW |