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

Side by Side Diff: remoting/host/chromoting_host.cc

Issue 7669045: Make ChromotingHost::ui_strings() immutable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 4 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/continue_window_linux.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 pause)); 354 pause));
355 return; 355 return;
356 } 356 }
357 ClientList::iterator client; 357 ClientList::iterator client;
358 for (client = clients_.begin(); client != clients_.end(); ++client) { 358 for (client = clients_.begin(); client != clients_.end(); ++client) {
359 client->get()->set_awaiting_continue_approval(pause); 359 client->get()->set_awaiting_continue_approval(pause);
360 } 360 }
361 desktop_environment_->OnPause(!pause); 361 desktop_environment_->OnPause(!pause);
362 } 362 }
363 363
364 void ChromotingHost::SetUiStrings(const UiStrings& ui_strings) {
365 DCHECK_EQ(context_->main_message_loop(), MessageLoop::current());
366 DCHECK_EQ(state_, kInitial);
367
368 ui_strings_ = ui_strings;
369 }
370
364 void ChromotingHost::OnClientDisconnected(ConnectionToClient* connection) { 371 void ChromotingHost::OnClientDisconnected(ConnectionToClient* connection) {
365 DCHECK_EQ(context_->main_message_loop(), MessageLoop::current()); 372 DCHECK_EQ(context_->main_message_loop(), MessageLoop::current());
366 373
367 // Find the client session corresponding to the given connection. 374 // Find the client session corresponding to the given connection.
368 ClientList::iterator client; 375 ClientList::iterator client;
369 for (client = clients_.begin(); client != clients_.end(); ++client) { 376 for (client = clients_.begin(); client != clients_.end(); ++client) {
370 if (client->get()->connection() == connection) 377 if (client->get()->connection() == connection)
371 break; 378 break;
372 } 379 }
373 if (client == clients_.end()) 380 if (client == clients_.end())
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 635
629 for (std::vector<Task*>::iterator it = shutdown_tasks_.begin(); 636 for (std::vector<Task*>::iterator it = shutdown_tasks_.begin();
630 it != shutdown_tasks_.end(); ++it) { 637 it != shutdown_tasks_.end(); ++it) {
631 (*it)->Run(); 638 (*it)->Run();
632 delete *it; 639 delete *it;
633 } 640 }
634 shutdown_tasks_.clear(); 641 shutdown_tasks_.clear();
635 } 642 }
636 643
637 } // namespace remoting 644 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/chromoting_host.h ('k') | remoting/host/continue_window_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698