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 <windows.h> | 5 #include <windows.h> |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/process/memory.h" | 9 #include "base/process/memory.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 case WM_NCHITTEST: | 205 case WM_NCHITTEST: |
206 SetWindowLongPtr(hwnd, DWLP_MSGRESULT, HTCAPTION); | 206 SetWindowLongPtr(hwnd, DWLP_MSGRESULT, HTCAPTION); |
207 return TRUE; | 207 return TRUE; |
208 | 208 |
209 case WM_PAINT: { | 209 case WM_PAINT: { |
210 PAINTSTRUCT ps; | 210 PAINTSTRUCT ps; |
211 HDC hdc = BeginPaint(hwnd_, &ps); | 211 HDC hdc = BeginPaint(hwnd_, &ps); |
212 RECT rect; | 212 RECT rect; |
213 GetClientRect(hwnd_, &rect); | 213 GetClientRect(hwnd_, &rect); |
214 { | 214 { |
215 base::win::ScopedSelectObject border(hdc, border_pen_); | 215 base::win::ScopedSelectObject border(hdc, border_pen_.get()); |
216 base::win::ScopedSelectObject brush(hdc, GetStockObject(NULL_BRUSH)); | 216 base::win::ScopedSelectObject brush(hdc, GetStockObject(NULL_BRUSH)); |
217 RoundRect(hdc, rect.left, rect.top, rect.right - 1, rect.bottom - 1, | 217 RoundRect(hdc, rect.left, rect.top, rect.right - 1, rect.bottom - 1, |
218 kWindowBorderRadius, kWindowBorderRadius); | 218 kWindowBorderRadius, kWindowBorderRadius); |
219 } | 219 } |
220 EndPaint(hwnd_, &ps); | 220 EndPaint(hwnd_, &ps); |
221 return TRUE; | 221 return TRUE; |
222 } | 222 } |
223 } | 223 } |
224 return FALSE; | 224 return FALSE; |
225 } | 225 } |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 } | 391 } |
392 | 392 |
393 } // namespace | 393 } // namespace |
394 | 394 |
395 // static | 395 // static |
396 scoped_ptr<HostWindow> HostWindow::CreateDisconnectWindow() { | 396 scoped_ptr<HostWindow> HostWindow::CreateDisconnectWindow() { |
397 return make_scoped_ptr(new DisconnectWindowWin()); | 397 return make_scoped_ptr(new DisconnectWindowWin()); |
398 } | 398 } |
399 | 399 |
400 } // namespace remoting | 400 } // namespace remoting |
OLD | NEW |