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

Side by Side Diff: views/view.cc

Issue 6995157: Disables tooltips if we can't create the tooltip window. I still don't (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to trunk and update comments 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
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 1223 matching lines...) Expand 10 before | Expand all | Expand 10 after
1234 1234
1235 void View::Blur() { 1235 void View::Blur() {
1236 SchedulePaint(); 1236 SchedulePaint();
1237 OnBlur(); 1237 OnBlur();
1238 } 1238 }
1239 1239
1240 // Tooltips -------------------------------------------------------------------- 1240 // Tooltips --------------------------------------------------------------------
1241 1241
1242 void View::TooltipTextChanged() { 1242 void View::TooltipTextChanged() {
1243 Widget* widget = GetWidget(); 1243 Widget* widget = GetWidget();
1244 if (widget) 1244 if (widget && widget->native_widget()->GetTooltipManager())
Ben Goodger (Google) 2011/06/13 17:26:17 Again note the mystery, otherwise you might find t
1245 widget->native_widget()->GetTooltipManager()->TooltipTextChanged(this); 1245 widget->native_widget()->GetTooltipManager()->TooltipTextChanged(this);
1246 } 1246 }
1247 1247
1248 // Context menus --------------------------------------------------------------- 1248 // Context menus ---------------------------------------------------------------
1249 1249
1250 gfx::Point View::GetKeyboardContextMenuLocation() { 1250 gfx::Point View::GetKeyboardContextMenuLocation() {
1251 gfx::Rect vis_bounds = GetVisibleBounds(); 1251 gfx::Rect vis_bounds = GetVisibleBounds();
1252 gfx::Point screen_point(vis_bounds.x() + vis_bounds.width() / 2, 1252 gfx::Point screen_point(vis_bounds.x() + vis_bounds.width() / 2,
1253 vis_bounds.y() + vis_bounds.height() / 2); 1253 vis_bounds.y() + vis_bounds.height() / 2);
1254 ConvertPointToScreen(this, &screen_point); 1254 ConvertPointToScreen(this, &screen_point);
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
1834 result.append(GetChildViewAt(i)->PrintViewGraph(false)); 1834 result.append(GetChildViewAt(i)->PrintViewGraph(false));
1835 1835
1836 if (first) 1836 if (first)
1837 result.append("}\n"); 1837 result.append("}\n");
1838 1838
1839 return result; 1839 return result;
1840 } 1840 }
1841 #endif 1841 #endif
1842 1842
1843 } // namespace views 1843 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698