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

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

Issue 281223002: Removed LOG_GETLASTERROR and LOG_ERRNO macros. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Wed 05/14/2014 11:20:03.21 Created 6 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 | Annotate | Revision Log
« no previous file with comments | « remoting/host/desktop_session_proxy.cc ('k') | remoting/host/host_event_logger_win.cc » ('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 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/desktop_shape_tracker.h" 5 #include "remoting/host/desktop_shape_tracker.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/win/scoped_gdi_object.h" 10 #include "base/win/scoped_gdi_object.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 : old_desktop_region_(CreateRectRgn(0, 0, 0, 0)) { 50 : old_desktop_region_(CreateRectRgn(0, 0, 0, 0)) {
51 } 51 }
52 52
53 DesktopShapeTrackerWin::~DesktopShapeTrackerWin() { 53 DesktopShapeTrackerWin::~DesktopShapeTrackerWin() {
54 } 54 }
55 55
56 void DesktopShapeTrackerWin::RefreshDesktopShape() { 56 void DesktopShapeTrackerWin::RefreshDesktopShape() {
57 // Accumulate a new desktop shape from current window positions. 57 // Accumulate a new desktop shape from current window positions.
58 scoped_ptr<EnumDesktopShapeData> shape_data(new EnumDesktopShapeData); 58 scoped_ptr<EnumDesktopShapeData> shape_data(new EnumDesktopShapeData);
59 if (!EnumWindows(EnumWindowsCallback, (LPARAM)shape_data.get())) { 59 if (!EnumWindows(EnumWindowsCallback, (LPARAM)shape_data.get())) {
60 LOG_GETLASTERROR(ERROR) << "Failed to enumerate windows"; 60 PLOG(ERROR) << "Failed to enumerate windows";
61 desktop_shape_.Clear(); 61 desktop_shape_.Clear();
62 return; 62 return;
63 } 63 }
64 64
65 // If the shape has changed, refresh |desktop_shape_|. 65 // If the shape has changed, refresh |desktop_shape_|.
66 if (!EqualRgn(shape_data->desktop_region, old_desktop_region_)) { 66 if (!EqualRgn(shape_data->desktop_region, old_desktop_region_)) {
67 old_desktop_region_.Set(shape_data->desktop_region.release()); 67 old_desktop_region_.Set(shape_data->desktop_region.release());
68 68
69 // Determine the size of output buffer required to receive the region. 69 // Determine the size of output buffer required to receive the region.
70 DWORD bytes_size = GetRegionData(old_desktop_region_, 0, NULL); 70 DWORD bytes_size = GetRegionData(old_desktop_region_, 0, NULL);
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 132
133 } // namespace 133 } // namespace
134 134
135 // static 135 // static
136 scoped_ptr<DesktopShapeTracker> DesktopShapeTracker::Create( 136 scoped_ptr<DesktopShapeTracker> DesktopShapeTracker::Create(
137 webrtc::DesktopCaptureOptions options) { 137 webrtc::DesktopCaptureOptions options) {
138 return scoped_ptr<DesktopShapeTracker>(new DesktopShapeTrackerWin()); 138 return scoped_ptr<DesktopShapeTracker>(new DesktopShapeTrackerWin());
139 } 139 }
140 140
141 } // namespace remoting 141 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/desktop_session_proxy.cc ('k') | remoting/host/host_event_logger_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698