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

Unified Diff: remoting/host/host_user_interface.cc

Issue 13461029: The continue window is owned by the desktop environment now. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
Index: remoting/host/host_user_interface.cc
diff --git a/remoting/host/host_user_interface.cc b/remoting/host/host_user_interface.cc
deleted file mode 100644
index 36b5235e30a755344cb900b122a417f495b4e5af..0000000000000000000000000000000000000000
--- a/remoting/host/host_user_interface.cc
+++ /dev/null
@@ -1,105 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "remoting/host/host_user_interface.h"
-
-#include "base/bind.h"
-#include "remoting/host/chromoting_host.h"
-
-namespace remoting {
-
-HostUserInterface::HostUserInterface(
- scoped_refptr<base::SingleThreadTaskRunner> network_task_runner,
- scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
- const UiStrings& ui_strings)
- : host_(NULL),
- network_task_runner_(network_task_runner),
- ui_task_runner_(ui_task_runner),
- ui_strings_(ui_strings),
- ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)),
- weak_ptr_(weak_factory_.GetWeakPtr()) {
- DCHECK(ui_task_runner_->BelongsToCurrentThread());
-}
-
-HostUserInterface::~HostUserInterface() {
- DCHECK(ui_task_runner_->BelongsToCurrentThread());
-}
-
-void HostUserInterface::Init() {
- DCHECK(ui_task_runner_->BelongsToCurrentThread());
-}
-
-void HostUserInterface::Start(ChromotingHost* host,
- const base::Closure& disconnect_callback) {
- DCHECK(network_task_runner_->BelongsToCurrentThread());
- DCHECK(host_ == NULL);
-
- host_ = host;
- disconnect_callback_ = disconnect_callback;
- host_->AddStatusObserver(this);
-}
-
-void HostUserInterface::OnClientAuthenticated(const std::string& jid) {
- DCHECK(network_task_runner_->BelongsToCurrentThread());
-
- authenticated_jid_ = jid;
-
- std::string username = jid.substr(0, jid.find('/'));
- ui_task_runner_->PostTask(FROM_HERE, base::Bind(
- &HostUserInterface::ProcessOnClientAuthenticated,
- weak_ptr_, username));
-}
-
-void HostUserInterface::OnClientDisconnected(const std::string& jid) {
- DCHECK(network_task_runner_->BelongsToCurrentThread());
-
- if (jid == authenticated_jid_) {
- ui_task_runner_->PostTask(FROM_HERE, base::Bind(
- &HostUserInterface::ProcessOnClientDisconnected,
- weak_ptr_));
- }
-}
-
-void HostUserInterface::OnAccessDenied(const std::string& jid) {
-}
-
-void HostUserInterface::OnShutdown() {
- DCHECK(network_task_runner_->BelongsToCurrentThread());
-
- // Host status observers must be removed on the network thread, so
- // it must happen here instead of in the destructor.
- host_->RemoveStatusObserver(this);
- host_ = NULL;
-}
-
-void HostUserInterface::OnDisconnectCallback() {
- DCHECK(ui_task_runner_->BelongsToCurrentThread());
-
- DisconnectSession();
-}
-
-base::SingleThreadTaskRunner* HostUserInterface::network_task_runner() const {
- return network_task_runner_;
-}
-
-base::SingleThreadTaskRunner* HostUserInterface::ui_task_runner() const {
- return ui_task_runner_;
-}
-
-void HostUserInterface::DisconnectSession() const {
- DCHECK(ui_task_runner_->BelongsToCurrentThread());
-
- disconnect_callback_.Run();
-}
-
-void HostUserInterface::ProcessOnClientAuthenticated(
- const std::string& username) {
- DCHECK(ui_task_runner_->BelongsToCurrentThread());
-}
-
-void HostUserInterface::ProcessOnClientDisconnected() {
- DCHECK(ui_task_runner_->BelongsToCurrentThread());
-}
-
-} // namespace remoting

Powered by Google App Engine
This is Rietveld 408576698