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

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

Issue 1460043002: Don't call the Pass methods of rtc::Buffer, rtc::scoped_ptr, and rtc::ScopedVector (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Restore the Pass methods Created 5 years 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
11 #include "webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.h" 11 #include "webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.h"
12 12
13 #include <assert.h> 13 #include <assert.h>
14 14
15 #include <utility>
16
15 #include "webrtc/modules/desktop_capture/desktop_capture_options.h" 17 #include "webrtc/modules/desktop_capture/desktop_capture_options.h"
16 #include "webrtc/modules/desktop_capture/desktop_frame.h" 18 #include "webrtc/modules/desktop_capture/desktop_frame.h"
17 #include "webrtc/modules/desktop_capture/desktop_frame_win.h" 19 #include "webrtc/modules/desktop_capture/desktop_frame_win.h"
18 #include "webrtc/modules/desktop_capture/desktop_region.h" 20 #include "webrtc/modules/desktop_capture/desktop_region.h"
19 #include "webrtc/modules/desktop_capture/differ.h" 21 #include "webrtc/modules/desktop_capture/differ.h"
20 #include "webrtc/modules/desktop_capture/mouse_cursor.h" 22 #include "webrtc/modules/desktop_capture/mouse_cursor.h"
21 #include "webrtc/modules/desktop_capture/win/cursor.h" 23 #include "webrtc/modules/desktop_capture/win/cursor.h"
22 #include "webrtc/modules/desktop_capture/win/desktop.h" 24 #include "webrtc/modules/desktop_capture/win/desktop.h"
23 #include "webrtc/modules/desktop_capture/win/screen_capture_utils.h" 25 #include "webrtc/modules/desktop_capture/win/screen_capture_utils.h"
24 #include "webrtc/system_wrappers/include/logging.h" 26 #include "webrtc/system_wrappers/include/logging.h"
25 #include "webrtc/system_wrappers/include/tick_util.h" 27 #include "webrtc/system_wrappers/include/tick_util.h"
26 28
27 namespace webrtc { 29 namespace webrtc {
28 30
29 // kMagnifierWindowClass has to be "Magnifier" according to the Magnification 31 // kMagnifierWindowClass has to be "Magnifier" according to the Magnification
30 // API. The other strings can be anything. 32 // API. The other strings can be anything.
31 static LPCTSTR kMagnifierHostClass = L"ScreenCapturerWinMagnifierHost"; 33 static LPCTSTR kMagnifierHostClass = L"ScreenCapturerWinMagnifierHost";
32 static LPCTSTR kHostWindowName = L"MagnifierHost"; 34 static LPCTSTR kHostWindowName = L"MagnifierHost";
33 static LPCTSTR kMagnifierWindowClass = L"Magnifier"; 35 static LPCTSTR kMagnifierWindowClass = L"Magnifier";
34 static LPCTSTR kMagnifierWindowName = L"MagnifierWindow"; 36 static LPCTSTR kMagnifierWindowName = L"MagnifierWindow";
35 37
36 Atomic32 ScreenCapturerWinMagnifier::tls_index_(TLS_OUT_OF_INDEXES); 38 Atomic32 ScreenCapturerWinMagnifier::tls_index_(TLS_OUT_OF_INDEXES);
37 39
38 ScreenCapturerWinMagnifier::ScreenCapturerWinMagnifier( 40 ScreenCapturerWinMagnifier::ScreenCapturerWinMagnifier(
39 rtc::scoped_ptr<ScreenCapturer> fallback_capturer) 41 rtc::scoped_ptr<ScreenCapturer> fallback_capturer)
40 : fallback_capturer_(fallback_capturer.Pass()), 42 : fallback_capturer_(std::move(fallback_capturer)),
41 fallback_capturer_started_(false), 43 fallback_capturer_started_(false),
42 callback_(NULL), 44 callback_(NULL),
43 current_screen_id_(kFullDesktopScreenId), 45 current_screen_id_(kFullDesktopScreenId),
44 excluded_window_(NULL), 46 excluded_window_(NULL),
45 set_thread_execution_state_failed_(false), 47 set_thread_execution_state_failed_(false),
46 desktop_dc_(NULL), 48 desktop_dc_(NULL),
47 mag_lib_handle_(NULL), 49 mag_lib_handle_(NULL),
48 mag_initialize_func_(NULL), 50 mag_initialize_func_(NULL),
49 mag_uninitialize_func_(NULL), 51 mag_uninitialize_func_(NULL),
50 set_window_source_func_(NULL), 52 set_window_source_func_(NULL),
51 set_window_filter_list_func_(NULL), 53 set_window_filter_list_func_(NULL),
52 set_image_scaling_callback_func_(NULL), 54 set_image_scaling_callback_func_(NULL),
53 host_window_(NULL), 55 host_window_(NULL),
54 magnifier_window_(NULL), 56 magnifier_window_(NULL),
55 magnifier_initialized_(false), 57 magnifier_initialized_(false),
56 magnifier_capture_succeeded_(true) { 58 magnifier_capture_succeeded_(true) {}
57 }
58 59
59 ScreenCapturerWinMagnifier::~ScreenCapturerWinMagnifier() { 60 ScreenCapturerWinMagnifier::~ScreenCapturerWinMagnifier() {
60 // DestroyWindow must be called before MagUninitialize. magnifier_window_ is 61 // DestroyWindow must be called before MagUninitialize. magnifier_window_ is
61 // destroyed automatically when host_window_ is destroyed. 62 // destroyed automatically when host_window_ is destroyed.
62 if (host_window_) 63 if (host_window_)
63 DestroyWindow(host_window_); 64 DestroyWindow(host_window_);
64 65
65 if (magnifier_initialized_) 66 if (magnifier_initialized_)
66 mag_uninitialize_func_(); 67 mag_uninitialize_func_();
67 68
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 assert(fallback_capturer_); 441 assert(fallback_capturer_);
441 if (!fallback_capturer_started_) { 442 if (!fallback_capturer_started_) {
442 fallback_capturer_started_ = true; 443 fallback_capturer_started_ = true;
443 444
444 fallback_capturer_->Start(callback_); 445 fallback_capturer_->Start(callback_);
445 fallback_capturer_->SelectScreen(current_screen_id_); 446 fallback_capturer_->SelectScreen(current_screen_id_);
446 } 447 }
447 } 448 }
448 449
449 } // namespace webrtc 450 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/desktop_capture/screen_capturer_win.cc ('k') | webrtc/modules/rtp_rtcp/source/rtcp_packet/app_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698