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

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

Issue 12379084: Pass the |curtain_activated| flag to IpcDesktopEnvironmentFactory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CR feedback 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/ipc_desktop_environment.cc ('k') | remoting/remoting.gyp » ('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 // 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 836 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 #endif 847 #endif
848 848
849 if (curtain_required_ != curtain_required) { 849 if (curtain_required_ != curtain_required) {
850 if (curtain_required) 850 if (curtain_required)
851 LOG(ERROR) << "Policy requires curtain-mode."; 851 LOG(ERROR) << "Policy requires curtain-mode.";
852 else 852 else
853 LOG(ERROR) << "Policy does not require curtain-mode."; 853 LOG(ERROR) << "Policy does not require curtain-mode.";
854 curtain_required_ = curtain_required; 854 curtain_required_ = curtain_required;
855 if (curtaining_host_observer_) 855 if (curtaining_host_observer_)
856 curtaining_host_observer_->SetEnableCurtaining(curtain_required_); 856 curtaining_host_observer_->SetEnableCurtaining(curtain_required_);
857
858 // The current curtain mode implementation relies on this code restarting
rmsousa 2013/03/05 00:36:00 nit: current windows/RDP curtain mode implementati
alexeypa (please no reviews) 2013/03/05 00:52:10 Done.
859 // the host when the curtain mode policy changes. For example if the policy
860 // is enabled while someone is already connected to the console that session
861 // should be either curtained or disconnected. This code makes sure that
862 // the session will be disconnected by restarting the host.
857 return true; 863 return true;
858 } 864 }
859 return false; 865 return false;
860 } 866 }
861 867
862 bool HostProcess::OnHostTalkGadgetPrefixPolicyUpdate( 868 bool HostProcess::OnHostTalkGadgetPrefixPolicyUpdate(
863 const std::string& talkgadget_prefix) { 869 const std::string& talkgadget_prefix) {
864 // Returns true if the host has to be restarted after this policy update. 870 // Returns true if the host has to be restarted after this policy update.
865 DCHECK(context_->network_task_runner()->BelongsToCurrentThread()); 871 DCHECK(context_->network_task_runner()->BelongsToCurrentThread());
866 872
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
936 942
937 log_to_server_.reset( 943 log_to_server_.reset(
938 new LogToServer(host_->AsWeakPtr(), ServerLogEntry::ME2ME, 944 new LogToServer(host_->AsWeakPtr(), ServerLogEntry::ME2ME,
939 signal_strategy_.get(), directory_bot_jid_)); 945 signal_strategy_.get(), directory_bot_jid_));
940 host_event_logger_ = 946 host_event_logger_ =
941 HostEventLogger::Create(host_->AsWeakPtr(), kApplicationName); 947 HostEventLogger::Create(host_->AsWeakPtr(), kApplicationName);
942 948
943 resizing_host_observer_.reset( 949 resizing_host_observer_.reset(
944 new ResizingHostObserver(desktop_resizer_.get(), host_->AsWeakPtr())); 950 new ResizingHostObserver(desktop_resizer_.get(), host_->AsWeakPtr()));
945 951
952 #if defined(REMOTING_RDP_SESSION)
953 // TODO(alexeypa): do not create |curtain_| in this case.
954 CurtainMode* curtain = static_cast<IpcDesktopEnvironmentFactory*>(
955 desktop_environment_factory_.get());
956 #else // !defined(REMOTING_RDP_SESSION)
957 CurtainMode* curtain = curtain_.get();
958 #endif // !defined(REMOTING_RDP_SESSION)
959
946 // Create a host observer to enable/disable curtain mode as clients connect 960 // Create a host observer to enable/disable curtain mode as clients connect
947 // and disconnect. 961 // and disconnect.
948 curtaining_host_observer_.reset(new CurtainingHostObserver( 962 curtaining_host_observer_.reset(new CurtainingHostObserver(
949 curtain_.get(), host_->AsWeakPtr())); 963 curtain, host_->AsWeakPtr()));
950 curtaining_host_observer_->SetEnableCurtaining(curtain_required_); 964 curtaining_host_observer_->SetEnableCurtaining(curtain_required_);
951 965
952 if (host_user_interface_.get()) { 966 if (host_user_interface_.get()) {
953 host_user_interface_->Start( 967 host_user_interface_->Start(
954 host_, base::Bind(&HostProcess::OnDisconnectRequested, this)); 968 host_, base::Bind(&HostProcess::OnDisconnectRequested, this));
955 } 969 }
956 970
957 host_->Start(xmpp_login_); 971 host_->Start(xmpp_login_);
958 972
959 CreateAuthenticatorFactory(); 973 CreateAuthenticatorFactory();
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
1101 return exit_code; 1115 return exit_code;
1102 } 1116 }
1103 1117
1104 } // namespace remoting 1118 } // namespace remoting
1105 1119
1106 #if !defined(OS_WIN) 1120 #if !defined(OS_WIN)
1107 int main(int argc, char** argv) { 1121 int main(int argc, char** argv) {
1108 return remoting::HostMain(argc, argv); 1122 return remoting::HostMain(argc, argv);
1109 } 1123 }
1110 #endif // !defined(OS_WIN) 1124 #endif // !defined(OS_WIN)
OLDNEW
« no previous file with comments | « remoting/host/ipc_desktop_environment.cc ('k') | remoting/remoting.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698