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..e151b6c4933bf591851b6f45cfb13f6fee32c3bd |
--- /dev/null |
+++ b/remoting/host/desktop_resizer.h |
@@ -0,0 +1,42 @@ |
+// 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 { |
+ public: |
+ virtual ~DesktopResizer(); |
+ |
+ static scoped_ptr<DesktopResizer> Create(); |
+ |
+ virtual SkISize GetSize() = 0; |
+ virtual void SetSize(const SkISize& size) = 0; |
+ |
+ class HostStatusObserver : public remoting::HostStatusObserver { |
+ public: |
+ explicit HostStatusObserver(DesktopResizer* desktop_resizer); |
+ |
+ // HostStatusObserver interface |
+ virtual void OnClientAuthenticated(const std::string& jid); |
+ virtual void OnClientDisconnected(const std::string& jid); |
+ virtual void OnClientDimensionsChanged(const SkISize& size); |
+ |
+ private: |
+ DesktopResizer* desktop_resizer_; |
+ SkISize original_size_; |
+ }; |
+}; |
+ |
+} // namespace remoting |
+ |
+#endif // REMOTING_HOST_DESKTOP_RESIZER_H_ |