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

Unified Diff: remoting/host/resizing_host_observer.cc

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/resizing_host_observer.h ('k') | remoting/host/resizing_host_observer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/resizing_host_observer.cc
diff --git a/remoting/host/resizing_host_observer.cc b/remoting/host/resizing_host_observer.cc
index 48742ca293b1535a246b0a38adf5f0d3840909bf..e1c96b5470093f6906d64ec075d718e1c10f6d14 100644
--- a/remoting/host/resizing_host_observer.cc
+++ b/remoting/host/resizing_host_observer.cc
@@ -3,28 +3,27 @@
// found in the LICENSE file.
#include "remoting/host/resizing_host_observer.h"
-#include "remoting/host/desktop_resizer.h"
#include <set>
#include "base/logging.h"
+#include "remoting/host/desktop_resizer.h"
+#include "remoting/host/host_status_monitor.h"
namespace remoting {
ResizingHostObserver::ResizingHostObserver(
- DesktopResizer* desktop_resizer, ChromotingHost* host)
+ DesktopResizer* desktop_resizer,
+ base::WeakPtr<HostStatusMonitor> monitor)
: desktop_resizer_(desktop_resizer),
- host_(host),
+ monitor_(monitor),
original_size_(SkISize::Make(0, 0)) {
- if (host_ != NULL) {
- host_->AddStatusObserver(this);
- }
+ monitor_->AddStatusObserver(this);
}
ResizingHostObserver::~ResizingHostObserver() {
- if (host_ != NULL) {
- host_->RemoveStatusObserver(this);
- }
+ if (monitor_)
+ monitor_->RemoveStatusObserver(this);
}
void ResizingHostObserver::OnClientAuthenticated(const std::string& jid) {
« no previous file with comments | « remoting/host/resizing_host_observer.h ('k') | remoting/host/resizing_host_observer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698