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

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

Issue 21059003: Localized Chromoting Host on Mac and Linux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 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
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 // This file implements a standalone host process for Me2Me. 5 // This file implements a standalone host process for Me2Me.
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 #include "remoting/host/json_host_config.h" 57 #include "remoting/host/json_host_config.h"
58 #include "remoting/host/log_to_server.h" 58 #include "remoting/host/log_to_server.h"
59 #include "remoting/host/logging.h" 59 #include "remoting/host/logging.h"
60 #include "remoting/host/me2me_desktop_environment.h" 60 #include "remoting/host/me2me_desktop_environment.h"
61 #include "remoting/host/pairing_registry_delegate.h" 61 #include "remoting/host/pairing_registry_delegate.h"
62 #include "remoting/host/policy_hack/policy_watcher.h" 62 #include "remoting/host/policy_hack/policy_watcher.h"
63 #include "remoting/host/service_urls.h" 63 #include "remoting/host/service_urls.h"
64 #include "remoting/host/session_manager_factory.h" 64 #include "remoting/host/session_manager_factory.h"
65 #include "remoting/host/signaling_connector.h" 65 #include "remoting/host/signaling_connector.h"
66 #include "remoting/host/token_validator_factory_impl.h" 66 #include "remoting/host/token_validator_factory_impl.h"
67 #include "remoting/host/ui_strings.h"
68 #include "remoting/host/usage_stats_consent.h" 67 #include "remoting/host/usage_stats_consent.h"
69 #include "remoting/jingle_glue/network_settings.h" 68 #include "remoting/jingle_glue/network_settings.h"
70 #include "remoting/jingle_glue/xmpp_signal_strategy.h" 69 #include "remoting/jingle_glue/xmpp_signal_strategy.h"
71 #include "remoting/protocol/me2me_host_authenticator_factory.h" 70 #include "remoting/protocol/me2me_host_authenticator_factory.h"
72 #include "remoting/protocol/pairing_registry.h" 71 #include "remoting/protocol/pairing_registry.h"
73 72
74 #if defined(OS_POSIX) 73 #if defined(OS_POSIX)
75 #include <signal.h> 74 #include <signal.h>
76 #include <sys/types.h> 75 #include <sys/types.h>
77 #include <unistd.h> 76 #include <unistd.h>
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 // If an audio pipe is specific on the command-line then initialize 575 // If an audio pipe is specific on the command-line then initialize
577 // AudioCapturerLinux to capture from it. 576 // AudioCapturerLinux to capture from it.
578 base::FilePath audio_pipe_name = CommandLine::ForCurrentProcess()-> 577 base::FilePath audio_pipe_name = CommandLine::ForCurrentProcess()->
579 GetSwitchValuePath(kAudioPipeSwitchName); 578 GetSwitchValuePath(kAudioPipeSwitchName);
580 if (!audio_pipe_name.empty()) { 579 if (!audio_pipe_name.empty()) {
581 remoting::AudioCapturerLinux::InitializePipeReader( 580 remoting::AudioCapturerLinux::InitializePipeReader(
582 context_->audio_task_runner(), audio_pipe_name); 581 context_->audio_task_runner(), audio_pipe_name);
583 } 582 }
584 #endif // defined(OS_LINUX) 583 #endif // defined(OS_LINUX)
585 584
586 // TODO(alexeypa): Localize the UI strings. See http://crbug.com/155204.
587 UiStrings ui_strings;
588
589 // Create a desktop environment factory appropriate to the build type & 585 // Create a desktop environment factory appropriate to the build type &
590 // platform. 586 // platform.
591 #if defined(OS_WIN) 587 #if defined(OS_WIN)
592 IpcDesktopEnvironmentFactory* desktop_environment_factory = 588 IpcDesktopEnvironmentFactory* desktop_environment_factory =
593 new IpcDesktopEnvironmentFactory( 589 new IpcDesktopEnvironmentFactory(
594 context_->audio_task_runner(), 590 context_->audio_task_runner(),
595 context_->network_task_runner(), 591 context_->network_task_runner(),
596 context_->video_capture_task_runner(), 592 context_->video_capture_task_runner(),
597 context_->network_task_runner(), 593 context_->network_task_runner(),
598 daemon_channel_.get()); 594 daemon_channel_.get());
599 desktop_session_connector_ = desktop_environment_factory; 595 desktop_session_connector_ = desktop_environment_factory;
600 #else // !defined(OS_WIN) 596 #else // !defined(OS_WIN)
601 DesktopEnvironmentFactory* desktop_environment_factory = 597 DesktopEnvironmentFactory* desktop_environment_factory =
602 new Me2MeDesktopEnvironmentFactory( 598 new Me2MeDesktopEnvironmentFactory(
603 context_->network_task_runner(), 599 context_->network_task_runner(),
604 context_->input_task_runner(), 600 context_->input_task_runner(),
605 context_->ui_task_runner(), 601 context_->ui_task_runner());
606 ui_strings);
607 #endif // !defined(OS_WIN) 602 #endif // !defined(OS_WIN)
608 603
609 desktop_environment_factory_.reset(desktop_environment_factory); 604 desktop_environment_factory_.reset(desktop_environment_factory);
610 605
611 context_->network_task_runner()->PostTask( 606 context_->network_task_runner()->PostTask(
612 FROM_HERE, 607 FROM_HERE,
613 base::Bind(&HostProcess::StartOnNetworkThread, this)); 608 base::Bind(&HostProcess::StartOnNetworkThread, this));
614 } 609 }
615 610
616 void HostProcess::ShutdownOnUiThread() { 611 void HostProcess::ShutdownOnUiThread() {
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
1125 return exit_code; 1120 return exit_code;
1126 } 1121 }
1127 1122
1128 } // namespace remoting 1123 } // namespace remoting
1129 1124
1130 #if !defined(OS_WIN) 1125 #if !defined(OS_WIN)
1131 int main(int argc, char** argv) { 1126 int main(int argc, char** argv) {
1132 return remoting::HostMain(argc, argv); 1127 return remoting::HostMain(argc, argv);
1133 } 1128 }
1134 #endif // !defined(OS_WIN) 1129 #endif // !defined(OS_WIN)
OLDNEW
« no previous file with comments | « remoting/host/plugin/host_script_object.cc ('k') | remoting/host/remoting_me2me_host-Info.plist » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698