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

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

Issue 1923573006: Implement a dummy host to do capturing and analysis only. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/it2me_desktop_environment.h" 5 #include "remoting/host/it2me_desktop_environment.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h"
9 #include "base/logging.h" 10 #include "base/logging.h"
10 #include "base/memory/ptr_util.h" 11 #include "base/memory/ptr_util.h"
11 #include "base/single_thread_task_runner.h" 12 #include "base/single_thread_task_runner.h"
12 #include "build/build_config.h" 13 #include "build/build_config.h"
13 #include "remoting/host/client_session_control.h" 14 #include "remoting/host/client_session_control.h"
14 #include "remoting/host/host_window.h" 15 #include "remoting/host/host_window.h"
15 #include "remoting/host/host_window_proxy.h" 16 #include "remoting/host/host_window_proxy.h"
16 #include "remoting/host/local_input_monitor.h" 17 #include "remoting/host/local_input_monitor.h"
17 18
18 #if defined(OS_POSIX) 19 #if defined(OS_POSIX)
(...skipping 21 matching lines...) Expand all
40 supports_touch_events) { 41 supports_touch_events) {
41 DCHECK(caller_task_runner->BelongsToCurrentThread()); 42 DCHECK(caller_task_runner->BelongsToCurrentThread());
42 43
43 // Create the local input monitor. 44 // Create the local input monitor.
44 local_input_monitor_ = LocalInputMonitor::Create(caller_task_runner, 45 local_input_monitor_ = LocalInputMonitor::Create(caller_task_runner,
45 input_task_runner, 46 input_task_runner,
46 ui_task_runner, 47 ui_task_runner,
47 client_session_control); 48 client_session_control);
48 49
49 // The host UI should be created on the UI thread. 50 // The host UI should be created on the UI thread.
50 bool want_user_interface = true; 51 bool want_user_interface =
52 !base::CommandLine::ForCurrentProcess()->HasSwitch("disable-it2me-ui");
joedow 2016/04/28 22:53:54 Commented on elsewhere, but it seems odd to use a
Hzj_jie 2016/05/03 19:07:05 Done.
51 #if defined(OS_MACOSX) 53 #if defined(OS_MACOSX)
52 // Don't try to display any UI on top of the system's login screen as this 54 // Don't try to display any UI on top of the system's login screen as this
53 // is rejected by the Window Server on OS X 10.7.4, and prevents the 55 // is rejected by the Window Server on OS X 10.7.4, and prevents the
54 // capturer from working (http://crbug.com/140984). 56 // capturer from working (http://crbug.com/140984).
55 57
56 // TODO(lambroslambrou): Use a better technique of detecting whether we're 58 // TODO(lambroslambrou): Use a better technique of detecting whether we're
57 // running in the LoginWindow context, and refactor this into a separate 59 // running in the LoginWindow context, and refactor this into a separate
58 // function to be used here and in CurtainMode::ActivateCurtain(). 60 // function to be used here and in CurtainMode::ActivateCurtain().
59 want_user_interface = getuid() != 0; 61 want_user_interface = getuid() != 0;
60 #endif // defined(OS_MACOSX) 62 #endif // defined(OS_MACOSX)
(...skipping 27 matching lines...) Expand all
88 std::unique_ptr<DesktopEnvironment> It2MeDesktopEnvironmentFactory::Create( 90 std::unique_ptr<DesktopEnvironment> It2MeDesktopEnvironmentFactory::Create(
89 base::WeakPtr<ClientSessionControl> client_session_control) { 91 base::WeakPtr<ClientSessionControl> client_session_control) {
90 DCHECK(caller_task_runner()->BelongsToCurrentThread()); 92 DCHECK(caller_task_runner()->BelongsToCurrentThread());
91 93
92 return base::WrapUnique(new It2MeDesktopEnvironment( 94 return base::WrapUnique(new It2MeDesktopEnvironment(
93 caller_task_runner(), video_capture_task_runner(), input_task_runner(), 95 caller_task_runner(), video_capture_task_runner(), input_task_runner(),
94 ui_task_runner(), client_session_control, supports_touch_events())); 96 ui_task_runner(), client_session_control, supports_touch_events()));
95 } 97 }
96 98
97 } // namespace remoting 99 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698