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

Side by Side Diff: remoting/host/chromoting_host.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, 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/host/chromoting_host.h ('k') | remoting/host/curtaining_host_observer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/host/chromoting_host.h" 5 #include "remoting/host/chromoting_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop_proxy.h" 10 #include "base/message_loop_proxy.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 input_task_runner_(input_task_runner), 71 input_task_runner_(input_task_runner),
72 video_capture_task_runner_(video_capture_task_runner), 72 video_capture_task_runner_(video_capture_task_runner),
73 video_encode_task_runner_(video_encode_task_runner), 73 video_encode_task_runner_(video_encode_task_runner),
74 network_task_runner_(network_task_runner), 74 network_task_runner_(network_task_runner),
75 ui_task_runner_(ui_task_runner), 75 ui_task_runner_(ui_task_runner),
76 signal_strategy_(signal_strategy), 76 signal_strategy_(signal_strategy),
77 state_(kInitial), 77 state_(kInitial),
78 protocol_config_(protocol::CandidateSessionConfig::CreateDefault()), 78 protocol_config_(protocol::CandidateSessionConfig::CreateDefault()),
79 login_backoff_(&kDefaultBackoffPolicy), 79 login_backoff_(&kDefaultBackoffPolicy),
80 authenticating_client_(false), 80 authenticating_client_(false),
81 reject_authenticating_client_(false) { 81 reject_authenticating_client_(false),
82 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
82 DCHECK(signal_strategy); 83 DCHECK(signal_strategy);
83 DCHECK(network_task_runner_->BelongsToCurrentThread()); 84 DCHECK(network_task_runner_->BelongsToCurrentThread());
84 85
85 if (!desktop_environment_factory_->SupportsAudioCapture()) { 86 if (!desktop_environment_factory_->SupportsAudioCapture()) {
86 protocol::CandidateSessionConfig::DisableAudioChannel( 87 protocol::CandidateSessionConfig::DisableAudioChannel(
87 protocol_config_.get()); 88 protocol_config_.get());
88 } 89 }
89 } 90 }
90 91
91 ChromotingHost::~ChromotingHost() { 92 ChromotingHost::~ChromotingHost() {
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 403
403 // Notify observers. 404 // Notify observers.
404 FOR_EACH_OBSERVER(HostStatusObserver, status_observers_, 405 FOR_EACH_OBSERVER(HostStatusObserver, status_observers_,
405 OnShutdown()); 406 OnShutdown());
406 407
407 for (std::vector<base::Closure>::iterator it = shutdown_tasks_.begin(); 408 for (std::vector<base::Closure>::iterator it = shutdown_tasks_.begin();
408 it != shutdown_tasks_.end(); ++it) { 409 it != shutdown_tasks_.end(); ++it) {
409 it->Run(); 410 it->Run();
410 } 411 }
411 shutdown_tasks_.clear(); 412 shutdown_tasks_.clear();
413
414 weak_factory_.InvalidateWeakPtrs();
412 } 415 }
413 416
414 } // namespace remoting 417 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/chromoting_host.h ('k') | remoting/host/curtaining_host_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698