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

Side by Side Diff: ui/views/widget/tooltip_manager_win.cc

Issue 9897003: Fix grammatical errors in comments in ui/views (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 | « ui/views/layout/grid_layout.cc ('k') | ui/views/widget/widget.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "ui/views/widget/tooltip_manager_win.h" 5 #include "ui/views/widget/tooltip_manager_win.h"
6 6
7 #include <windowsx.h> 7 #include <windowsx.h>
8 8
9 #include <limits> 9 #include <limits>
10 10
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 if (!monitor_bounds.Contains(gfx::Rect(bounds))) { 236 if (!monitor_bounds.Contains(gfx::Rect(bounds))) {
237 return false; 237 return false;
238 } 238 }
239 239
240 ::SetWindowPos(tooltip_hwnd_, NULL, bounds.left, bounds.top, 0, 0, 240 ::SetWindowPos(tooltip_hwnd_, NULL, bounds.left, bounds.top, 0, 0,
241 SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOSIZE); 241 SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOSIZE);
242 return true; 242 return true;
243 } 243 }
244 244
245 int TooltipManagerWin::CalcTooltipHeight() { 245 int TooltipManagerWin::CalcTooltipHeight() {
246 // Ask the tooltip for it's font. 246 // Ask the tooltip for its font.
247 int height; 247 int height;
248 HFONT hfont = reinterpret_cast<HFONT>( 248 HFONT hfont = reinterpret_cast<HFONT>(
249 SendMessage(tooltip_hwnd_, WM_GETFONT, 0, 0)); 249 SendMessage(tooltip_hwnd_, WM_GETFONT, 0, 0));
250 if (hfont != NULL) { 250 if (hfont != NULL) {
251 HDC dc = GetDC(tooltip_hwnd_); 251 HDC dc = GetDC(tooltip_hwnd_);
252 HFONT previous_font = static_cast<HFONT>(SelectObject(dc, hfont)); 252 HFONT previous_font = static_cast<HFONT>(SelectObject(dc, hfont));
253 int last_map_mode = SetMapMode(dc, MM_TEXT); 253 int last_map_mode = SetMapMode(dc, MM_TEXT);
254 TEXTMETRIC font_metrics; 254 TEXTMETRIC font_metrics;
255 GetTextMetrics(dc, &font_metrics); 255 GetTextMetrics(dc, &font_metrics);
256 height = font_metrics.tmHeight; 256 height = font_metrics.tmHeight;
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 keyboard_tooltip_hwnd_ = NULL; 382 keyboard_tooltip_hwnd_ = NULL;
383 } 383 }
384 } 384 }
385 385
386 void TooltipManagerWin::DestroyKeyboardTooltipWindow(HWND window_to_destroy) { 386 void TooltipManagerWin::DestroyKeyboardTooltipWindow(HWND window_to_destroy) {
387 if (keyboard_tooltip_hwnd_ == window_to_destroy) 387 if (keyboard_tooltip_hwnd_ == window_to_destroy)
388 HideKeyboardTooltip(); 388 HideKeyboardTooltip();
389 } 389 }
390 390
391 } // namespace views 391 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/layout/grid_layout.cc ('k') | ui/views/widget/widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698