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

Unified Diff: views/widget/native_widget_win.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/widget/native_widget_win.h ('k') | views/widget/tooltip_manager_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/widget/native_widget_win.cc
===================================================================
--- views/widget/native_widget_win.cc (revision 90643)
+++ views/widget/native_widget_win.cc (working copy)
@@ -669,6 +669,12 @@
} else {
tooltip_manager_.reset(new TooltipManagerWin(GetWidget()));
}
+ if (!tooltip_manager_->Init()) {
+ // There was a problem creating the TooltipManager. Common error is 127.
+ // See 82193 for details.
+ LOG_GETLASTERROR(WARNING) << "tooltip creation failed, disabling tooltips";
+ tooltip_manager_.reset();
+ }
// This message initializes the window so that focus border are shown for
// windows.
@@ -873,7 +879,8 @@
MouseEvent event(msg);
if (!(event.flags() & ui::EF_IS_NON_CLIENT))
- tooltip_manager_->OnMouse(message, w_param, l_param);
+ if (tooltip_manager_.get())
+ tooltip_manager_->OnMouse(message, w_param, l_param);
if (event.type() == ui::ET_MOUSE_MOVED && !HasMouseCapture()) {
// Windows only fires WM_MOUSELEAVE events if the application begins
« no previous file with comments | « views/widget/native_widget_win.h ('k') | views/widget/tooltip_manager_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698