diff options
author | cpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-14 03:37:14 +0000 |
---|---|---|
committer | cpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-14 03:37:14 +0000 |
commit | 46db9f43fe29b92895d3138a22d3bc042632135a (patch) | |
tree | 00d16d75a583afb05e3df73d76ff04b0b5562bb6 /remoting/host/disconnect_window_win.cc | |
parent | c6aef90f9f927ac75bb99d6d77782fc33c37769d (diff) | |
download | chromium_src-46db9f43fe29b92895d3138a22d3bc042632135a.zip chromium_src-46db9f43fe29b92895d3138a22d3bc042632135a.tar.gz chromium_src-46db9f43fe29b92895d3138a22d3bc042632135a.tar.bz2 |
Make scoped dc objects smarter
So we don't destroy the dc with gdi objects selected.
Also remove implicit conversion to HDC.
BUG=110113,113683
TEST=chrome runs, base unittests green.
Review URL: https://chromiumcodereview.appspot.com/9212020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121840 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/disconnect_window_win.cc')
-rw-r--r-- | remoting/host/disconnect_window_win.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/remoting/host/disconnect_window_win.cc b/remoting/host/disconnect_window_win.cc index a9f7742..63d420f 100644 --- a/remoting/host/disconnect_window_win.cc +++ b/remoting/host/disconnect_window_win.cc @@ -214,8 +214,8 @@ static int GetControlTextWidth(HWND control) { if (result) { base::win::ScopedGetDC dc(control); base::win::ScopedSelectObject font( - dc, (HFONT)SendMessage(control, WM_GETFONT, 0, 0)); - DrawText(dc, text, -1, &rect, DT_CALCRECT|DT_SINGLELINE); + dc.get(), (HFONT)SendMessage(control, WM_GETFONT, 0, 0)); + DrawText(dc.get(), text, -1, &rect, DT_CALCRECT|DT_SINGLELINE); } return rect.right; } |