| OLD | NEW |
| 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/capturer/win/desktop.h" | 5 #include "media/video/capture/screen/win/desktop.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 | 10 |
| 11 namespace remoting { | 11 namespace media { |
| 12 | 12 |
| 13 Desktop::Desktop(HDESK desktop, bool own) : desktop_(desktop), own_(own) { | 13 Desktop::Desktop(HDESK desktop, bool own) : desktop_(desktop), own_(own) { |
| 14 } | 14 } |
| 15 | 15 |
| 16 Desktop::~Desktop() { | 16 Desktop::~Desktop() { |
| 17 if (own_ && desktop_ != NULL) { | 17 if (own_ && desktop_ != NULL) { |
| 18 if (!::CloseDesktop(desktop_)) { | 18 if (!::CloseDesktop(desktop_)) { |
| 19 LOG_GETLASTERROR(ERROR) | 19 LOG_GETLASTERROR(ERROR) |
| 20 << "Failed to close the owned desktop handle"; | 20 << "Failed to close the owned desktop handle"; |
| 21 } | 21 } |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 if (desktop == NULL) { | 94 if (desktop == NULL) { |
| 95 LOG_GETLASTERROR(ERROR) | 95 LOG_GETLASTERROR(ERROR) |
| 96 << "Failed to retrieve the handle of the desktop assigned to " | 96 << "Failed to retrieve the handle of the desktop assigned to " |
| 97 "the current thread"; | 97 "the current thread"; |
| 98 return scoped_ptr<Desktop>(); | 98 return scoped_ptr<Desktop>(); |
| 99 } | 99 } |
| 100 | 100 |
| 101 return scoped_ptr<Desktop>(new Desktop(desktop, false)); | 101 return scoped_ptr<Desktop>(new Desktop(desktop, false)); |
| 102 } | 102 } |
| 103 | 103 |
| 104 } // namespace remoting | 104 } // namespace media |
| OLD | NEW |