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

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: 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
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..16a743599e94af610671a38314625d1bdf203a3d 100644
--- a/remoting/host/resizing_host_observer.cc
+++ b/remoting/host/resizing_host_observer.cc
@@ -3,28 +3,28 @@
// 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);
- }
+ if (monitor_)
+ monitor_->AddStatusObserver(this);
}
ResizingHostObserver::~ResizingHostObserver() {
- if (host_ != NULL) {
- host_->RemoveStatusObserver(this);
- }
+ if (monitor_)
+ monitor_->RemoveStatusObserver(this);
}
void ResizingHostObserver::OnClientAuthenticated(const std::string& jid) {

Powered by Google App Engine
This is Rietveld 408576698