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

Unified Diff: remoting/host/resizing_host_observer.h

Issue 12386035: Moving host status events monitoring to a separate interface (HostStatusMonitor). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 10 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 1c23b7557eb20b6b499ea6b8516d1f3a341cda0c..85c23f1971d90ec278f52679faa1afb2ba08d47c 100644
--- a/remoting/host/resizing_host_observer.h
+++ b/remoting/host/resizing_host_observer.h
@@ -7,23 +7,24 @@
#include <string>
-#include "remoting/host/host_status_observer.h"
-#include "remoting/host/chromoting_host.h"
-
#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "base/memory/weak_ptr.h"
+#include "remoting/host/host_status_observer.h"
#include "third_party/skia/include/core/SkSize.h"
namespace remoting {
class DesktopResizer;
+class HostStatusMonitor;
// 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 {
public:
- ResizingHostObserver(DesktopResizer* desktop_resizer, ChromotingHost* host);
+ ResizingHostObserver(DesktopResizer* desktop_resizer,
+ base::WeakPtr<HostStatusMonitor> monitor);
virtual ~ResizingHostObserver();
// HostStatusObserver interface
@@ -35,7 +36,7 @@ class ResizingHostObserver : public HostStatusObserver {
private:
DesktopResizer* const desktop_resizer_;
- scoped_refptr<ChromotingHost> host_;
+ base::WeakPtr<HostStatusMonitor> monitor_;
SkISize original_size_;
std::string client_jid_;
« 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