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

Side by Side Diff: webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.cc

Issue 2479553006: Remove GetWindowList / GetScreenList and SelectWindow / SelectScreen from WebRTC (Closed)
Patch Set: Resolve review comments Created 4 years, 1 month 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 /* 1 /*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 std::unique_ptr<DesktopFrame> frame = queue_.current_frame()->Share(); 119 std::unique_ptr<DesktopFrame> frame = queue_.current_frame()->Share();
120 frame->set_dpi(DesktopVector(GetDeviceCaps(desktop_dc_, LOGPIXELSX), 120 frame->set_dpi(DesktopVector(GetDeviceCaps(desktop_dc_, LOGPIXELSX),
121 GetDeviceCaps(desktop_dc_, LOGPIXELSY))); 121 GetDeviceCaps(desktop_dc_, LOGPIXELSY)));
122 frame->mutable_updated_region()->SetRect( 122 frame->mutable_updated_region()->SetRect(
123 DesktopRect::MakeSize(frame->size())); 123 DesktopRect::MakeSize(frame->size()));
124 frame->set_capture_time_ms((rtc::TimeNanos() - capture_start_time_nanos) / 124 frame->set_capture_time_ms((rtc::TimeNanos() - capture_start_time_nanos) /
125 rtc::kNumNanosecsPerMillisec); 125 rtc::kNumNanosecsPerMillisec);
126 callback_->OnCaptureResult(Result::SUCCESS, std::move(frame)); 126 callback_->OnCaptureResult(Result::SUCCESS, std::move(frame));
127 } 127 }
128 128
129 bool ScreenCapturerWinMagnifier::GetScreenList(ScreenList* screens) { 129 bool ScreenCapturerWinMagnifier::GetSourceList(SourceList* sources) {
130 return webrtc::GetScreenList(screens); 130 return webrtc::GetScreenList(sources);
131 } 131 }
132 132
133 bool ScreenCapturerWinMagnifier::SelectScreen(ScreenId id) { 133 bool ScreenCapturerWinMagnifier::SelectSource(SourceId id) {
134 bool valid = IsScreenValid(id, &current_device_key_); 134 bool valid = IsScreenValid(id, &current_device_key_);
135 135
136 // Set current_screen_id_ even if the fallback capturer is being used, so we 136 // Set current_screen_id_ even if the fallback capturer is being used, so we
137 // can switch back to the magnifier when possible. 137 // can switch back to the magnifier when possible.
138 if (valid) 138 if (valid)
139 current_screen_id_ = id; 139 current_screen_id_ = id;
140 140
141 if (fallback_capturer_started_) 141 if (fallback_capturer_started_)
142 fallback_capturer_->SelectSource(id); 142 fallback_capturer_->SelectSource(id);
143 143
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 RTC_DCHECK(fallback_capturer_); 380 RTC_DCHECK(fallback_capturer_);
381 if (!fallback_capturer_started_) { 381 if (!fallback_capturer_started_) {
382 fallback_capturer_started_ = true; 382 fallback_capturer_started_ = true;
383 383
384 fallback_capturer_->Start(callback_); 384 fallback_capturer_->Start(callback_);
385 fallback_capturer_->SelectSource(current_screen_id_); 385 fallback_capturer_->SelectSource(current_screen_id_);
386 } 386 }
387 } 387 }
388 388
389 } // namespace webrtc 389 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698