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

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

Issue 2080723008: [Chromoting] Use device::PowerSaveBlocker to block screen saver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 (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 #include "remoting/host/basic_desktop_environment.h" 5 #include "remoting/host/basic_desktop_environment.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 } 63 }
64 64
65 void BasicDesktopEnvironment::SetCapabilities(const std::string& capabilities) { 65 void BasicDesktopEnvironment::SetCapabilities(const std::string& capabilities) {
66 } 66 }
67 67
68 std::unique_ptr<webrtc::DesktopCapturer> 68 std::unique_ptr<webrtc::DesktopCapturer>
69 BasicDesktopEnvironment::CreateVideoCapturer() { 69 BasicDesktopEnvironment::CreateVideoCapturer() {
70 DCHECK(caller_task_runner_->BelongsToCurrentThread()); 70 DCHECK(caller_task_runner_->BelongsToCurrentThread());
71 71
72 return base::WrapUnique(new DesktopCapturerProxy(video_capture_task_runner_, 72 return base::WrapUnique(new DesktopCapturerProxy(video_capture_task_runner_,
73 ui_task_runner_,
74 caller_task_runner_,
Hzj_jie 2016/06/22 18:57:59 We have not sent file_task_runner to BasicDesktopE
Sergey Ulanov 2016/06/22 19:05:37 I don't think this is acceptable. We should never
Hzj_jie 2016/06/24 19:14:29 I think all the jobs in network thread are all IO
Sergey Ulanov 2016/06/27 18:20:24 That's right, we only allow non-blocking IO on tha
73 *desktop_capture_options_)); 75 *desktop_capture_options_));
74 } 76 }
75 77
76 BasicDesktopEnvironment::BasicDesktopEnvironment( 78 BasicDesktopEnvironment::BasicDesktopEnvironment(
77 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, 79 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
78 scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner, 80 scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner,
79 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, 81 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
80 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, 82 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
81 bool supports_touch_events) 83 bool supports_touch_events)
82 : caller_task_runner_(caller_task_runner), 84 : caller_task_runner_(caller_task_runner),
(...skipping 22 matching lines...) Expand all
105 107
106 BasicDesktopEnvironmentFactory::~BasicDesktopEnvironmentFactory() {} 108 BasicDesktopEnvironmentFactory::~BasicDesktopEnvironmentFactory() {}
107 109
108 bool BasicDesktopEnvironmentFactory::SupportsAudioCapture() const { 110 bool BasicDesktopEnvironmentFactory::SupportsAudioCapture() const {
109 DCHECK(caller_task_runner_->BelongsToCurrentThread()); 111 DCHECK(caller_task_runner_->BelongsToCurrentThread());
110 112
111 return AudioCapturer::IsSupported(); 113 return AudioCapturer::IsSupported();
112 } 114 }
113 115
114 } // namespace remoting 116 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698