Chromium Code Reviews| 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_DESKTOP_RESIZER_H_ | |
| 6 #define REMOTING_HOST_DESKTOP_RESIZER_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "remoting/host/host_status_observer.h" | |
| 11 | |
| 12 #include "base/memory/scoped_ptr.h" | |
| 13 | |
| 14 namespace remoting { | |
| 15 | |
| 16 class DesktopResizer { | |
|
Wez
2012/09/15 22:39:08
Add a comment explaining how to use this interface
Jamie
2012/09/19 22:35:07
Done.
| |
| 17 public: | |
| 18 virtual ~DesktopResizer(); | |
| 19 | |
| 20 static scoped_ptr<DesktopResizer> Create(); | |
| 21 | |
| 22 virtual SkISize GetSize() = 0; | |
| 23 virtual void SetSize(const SkISize& size) = 0; | |
|
Wez
2012/09/15 22:39:08
As discussed, swap this for a GetSizes(preferred_s
Jamie
2012/09/19 22:35:07
Done.
| |
| 24 | |
| 25 class HostStatusObserver : public remoting::HostStatusObserver { | |
|
Wez
2012/09/15 22:39:08
I think it would make sense to keep the cross-plat
Jamie
2012/09/19 22:35:07
Done.
| |
| 26 public: | |
| 27 explicit HostStatusObserver(DesktopResizer* desktop_resizer); | |
| 28 virtual ~HostStatusObserver(); | |
| 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 SkISize& size) OVERRIDE; | |
| 34 | |
| 35 private: | |
| 36 DesktopResizer* desktop_resizer_; | |
| 37 SkISize original_size_; | |
| 38 }; | |
| 39 }; | |
| 40 | |
| 41 } // namespace remoting | |
| 42 | |
| 43 #endif // REMOTING_HOST_DESKTOP_RESIZER_H_ | |
| OLD | NEW |