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

Unified Diff: remoting/host/host_user_interface.cc

Issue 11886051: Turned UiStrings into a singleton so that the continue window does not depend on ChromotingHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 11 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/host_user_interface.h ('k') | remoting/host/it2me_host_user_interface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/host_user_interface.cc
diff --git a/remoting/host/host_user_interface.cc b/remoting/host/host_user_interface.cc
index 71f6b07e08456f54c90eeb9cb9969b85b30fa098..7a4894a6557fccd1587195efcf75eb5df2af81de 100644
--- a/remoting/host/host_user_interface.cc
+++ b/remoting/host/host_user_interface.cc
@@ -13,11 +13,13 @@ namespace remoting {
HostUserInterface::HostUserInterface(
scoped_refptr<base::SingleThreadTaskRunner> network_task_runner,
- scoped_refptr<base::SingleThreadTaskRunner> ui_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),
is_monitoring_local_inputs_(false),
+ ui_strings_(ui_strings),
ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)),
weak_ptr_(weak_factory_.GetWeakPtr()) {
DCHECK(ui_task_runner_->BelongsToCurrentThread());
@@ -33,7 +35,7 @@ HostUserInterface::~HostUserInterface() {
void HostUserInterface::Init() {
DCHECK(ui_task_runner_->BelongsToCurrentThread());
- disconnect_window_ = DisconnectWindow::Create();
+ disconnect_window_ = DisconnectWindow::Create(&ui_strings());
local_input_monitor_ = LocalInputMonitor::Create();
}
@@ -107,7 +109,6 @@ void HostUserInterface::ProcessOnClientAuthenticated(
DCHECK(ui_task_runner_->BelongsToCurrentThread());
if (!disconnect_window_->Show(
- host_->ui_strings(),
base::Bind(&HostUserInterface::OnDisconnectCallback, weak_ptr_),
username)) {
LOG(ERROR) << "Failed to show the disconnect window.";
« no previous file with comments | « remoting/host/host_user_interface.h ('k') | remoting/host/it2me_host_user_interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698