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

Unified Diff: remoting/host/desktop_resizer.h

Issue 10918224: Cross-platform plumbing for resize-to-client (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698