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

Unified Diff: remoting/host/resizing_host_observer.h

Issue 12545026: ResizingHostObserver is created by the desktop environment together with other stubs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CR feedback & rebased Created 7 years, 9 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
« no previous file with comments | « remoting/host/remoting_me2me_host.cc ('k') | remoting/host/resizing_host_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/resizing_host_observer.h
diff --git a/remoting/host/resizing_host_observer.h b/remoting/host/resizing_host_observer.h
index 85c23f1971d90ec278f52679faa1afb2ba08d47c..ded8fc87749db5603da1a678236f26a9870aa0da 100644
--- a/remoting/host/resizing_host_observer.h
+++ b/remoting/host/resizing_host_observer.h
@@ -5,40 +5,34 @@
#ifndef REMOTING_HOST_RESIZING_HOST_OBSERVER_H_
#define REMOTING_HOST_RESIZING_HOST_OBSERVER_H_
-#include <string>
-
#include "base/basictypes.h"
#include "base/compiler_specific.h"
-#include "base/memory/weak_ptr.h"
-#include "remoting/host/host_status_observer.h"
+#include "base/memory/scoped_ptr.h"
+#include "remoting/host/session_controller.h"
#include "third_party/skia/include/core/SkSize.h"
namespace remoting {
class DesktopResizer;
-class HostStatusMonitor;
+
+// TODO(alexeypa): Rename this class to reflect that it is not
+// HostStatusObserver any more.
// Use the specified DesktopResizer to match host desktop size to the client
// view size as closely as is possible. When the connection closes, restore
// the original desktop size.
-class ResizingHostObserver : public HostStatusObserver {
+class ResizingHostObserver : public SessionController {
public:
- ResizingHostObserver(DesktopResizer* desktop_resizer,
- base::WeakPtr<HostStatusMonitor> monitor);
+ explicit ResizingHostObserver(scoped_ptr<DesktopResizer> desktop_resizer);
virtual ~ResizingHostObserver();
- // HostStatusObserver interface
- virtual void OnClientAuthenticated(const std::string& jid) OVERRIDE;
- virtual void OnClientDisconnected(const std::string& jid) OVERRIDE;
- virtual void OnClientResolutionChanged(const std::string& jid,
- const SkISize& size,
- const SkIPoint& dpi) OVERRIDE;
+ // SessionController interface.
+ virtual void OnClientResolutionChanged(const SkIPoint& client_dpi,
+ const SkISize& client_size) OVERRIDE;
private:
- DesktopResizer* const desktop_resizer_;
- base::WeakPtr<HostStatusMonitor> monitor_;
+ scoped_ptr<DesktopResizer> desktop_resizer_;
SkISize original_size_;
- std::string client_jid_;
DISALLOW_COPY_AND_ASSIGN(ResizingHostObserver);
};
« no previous file with comments | « remoting/host/remoting_me2me_host.cc ('k') | remoting/host/resizing_host_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698