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

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

Issue 1406403007: Eliminate HICON leaks caused by creating icons from bitmap image. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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
« no previous file with comments | « remoting/host/desktop_shape_tracker_win.cc ('k') | ui/gfx/icon_util.h » ('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 (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
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
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
OLDNEW
« no previous file with comments | « remoting/host/desktop_shape_tracker_win.cc ('k') | ui/gfx/icon_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698