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

Side by Side Diff: views/view.cc

Issue 7253016: Merge 88897 - Disables tooltips if we can't create the tooltip window. I still don't (Closed) Base URL: svn://svn.chromium.org/chrome/branches/782/src/
Patch Set: Created 9 years, 6 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/base/win/hwnd_util.cc ('k') | views/widget/aero_tooltip_manager.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 "views/view.h" 5 #include "views/view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 1252 matching lines...) Expand 10 before | Expand all | Expand 10 after
1263 1263
1264 void View::Blur() { 1264 void View::Blur() {
1265 SchedulePaint(); 1265 SchedulePaint();
1266 OnBlur(); 1266 OnBlur();
1267 } 1267 }
1268 1268
1269 // Tooltips -------------------------------------------------------------------- 1269 // Tooltips --------------------------------------------------------------------
1270 1270
1271 void View::TooltipTextChanged() { 1271 void View::TooltipTextChanged() {
1272 Widget* widget = GetWidget(); 1272 Widget* widget = GetWidget();
1273 if (widget) 1273 // TooltipManager may be null if there is a problem creating it.
1274 if (widget && widget->native_widget()->GetTooltipManager())
1274 widget->native_widget()->GetTooltipManager()->TooltipTextChanged(this); 1275 widget->native_widget()->GetTooltipManager()->TooltipTextChanged(this);
1275 } 1276 }
1276 1277
1277 // Context menus --------------------------------------------------------------- 1278 // Context menus ---------------------------------------------------------------
1278 1279
1279 gfx::Point View::GetKeyboardContextMenuLocation() { 1280 gfx::Point View::GetKeyboardContextMenuLocation() {
1280 gfx::Rect vis_bounds = GetVisibleBounds(); 1281 gfx::Rect vis_bounds = GetVisibleBounds();
1281 gfx::Point screen_point(vis_bounds.x() + vis_bounds.width() / 2, 1282 gfx::Point screen_point(vis_bounds.x() + vis_bounds.width() / 2,
1282 vis_bounds.y() + vis_bounds.height() / 2); 1283 vis_bounds.y() + vis_bounds.height() / 2);
1283 ConvertPointToScreen(this, &screen_point); 1284 ConvertPointToScreen(this, &screen_point);
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
1868 result.append(GetChildViewAt(i)->PrintViewGraph(false)); 1869 result.append(GetChildViewAt(i)->PrintViewGraph(false));
1869 1870
1870 if (first) 1871 if (first)
1871 result.append("}\n"); 1872 result.append("}\n");
1872 1873
1873 return result; 1874 return result;
1874 } 1875 }
1875 #endif 1876 #endif
1876 1877
1877 } // namespace views 1878 } // namespace views
OLDNEW
« no previous file with comments | « ui/base/win/hwnd_util.cc ('k') | views/widget/aero_tooltip_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698