Chromium Code Reviews| Index: remoting/host/desktop_resizer.h |
| diff --git a/remoting/host/desktop_resizer.h b/remoting/host/desktop_resizer.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..10e7bb81cd27e82659a1fb29767062aa600bfaa5 |
| --- /dev/null |
| +++ b/remoting/host/desktop_resizer.h |
| @@ -0,0 +1,43 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef REMOTING_HOST_DESKTOP_RESIZER_H_ |
| +#define REMOTING_HOST_DESKTOP_RESIZER_H_ |
| + |
| +#include <string> |
| + |
| +#include "remoting/host/host_status_observer.h" |
| + |
| +#include "base/memory/scoped_ptr.h" |
| + |
| +namespace remoting { |
| + |
| +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.
|
| + public: |
| + virtual ~DesktopResizer(); |
| + |
| + static scoped_ptr<DesktopResizer> Create(); |
| + |
| + virtual SkISize GetSize() = 0; |
| + 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.
|
| + |
| + 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.
|
| + public: |
| + explicit HostStatusObserver(DesktopResizer* desktop_resizer); |
| + virtual ~HostStatusObserver(); |
| + |
| + // HostStatusObserver interface |
| + virtual void OnClientAuthenticated(const std::string& jid) OVERRIDE; |
| + virtual void OnClientDisconnected(const std::string& jid) OVERRIDE; |
| + virtual void OnClientDimensionsChanged(const SkISize& size) OVERRIDE; |
| + |
| + private: |
| + DesktopResizer* desktop_resizer_; |
| + SkISize original_size_; |
| + }; |
| +}; |
| + |
| +} // namespace remoting |
| + |
| +#endif // REMOTING_HOST_DESKTOP_RESIZER_H_ |