OLD | NEW |
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 "content/browser/renderer_host/render_widget_host_view_win.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_win.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 2218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2229 void RenderWidgetHostViewWin::EnsureTooltip() { | 2229 void RenderWidgetHostViewWin::EnsureTooltip() { |
2230 UINT message = TTM_NEWTOOLRECT; | 2230 UINT message = TTM_NEWTOOLRECT; |
2231 | 2231 |
2232 TOOLINFO ti; | 2232 TOOLINFO ti; |
2233 ti.cbSize = sizeof(ti); | 2233 ti.cbSize = sizeof(ti); |
2234 ti.hwnd = m_hWnd; | 2234 ti.hwnd = m_hWnd; |
2235 ti.uId = 0; | 2235 ti.uId = 0; |
2236 if (!::IsWindow(tooltip_hwnd_)) { | 2236 if (!::IsWindow(tooltip_hwnd_)) { |
2237 message = TTM_ADDTOOL; | 2237 message = TTM_ADDTOOL; |
2238 tooltip_hwnd_ = CreateWindowEx( | 2238 tooltip_hwnd_ = CreateWindowEx( |
2239 WS_EX_TRANSPARENT | l10n_util::GetExtendedTooltipStyles(), | 2239 WS_EX_TRANSPARENT | WS_EX_TOPMOST | |
| 2240 l10n_util::GetExtendedTooltipStyles(), |
2240 TOOLTIPS_CLASS, NULL, TTS_NOPREFIX, 0, 0, 0, 0, m_hWnd, NULL, | 2241 TOOLTIPS_CLASS, NULL, TTS_NOPREFIX, 0, 0, 0, 0, m_hWnd, NULL, |
2241 NULL, NULL); | 2242 NULL, NULL); |
2242 if (!tooltip_hwnd_) { | 2243 if (!tooltip_hwnd_) { |
2243 // Tooltip creation can inexplicably fail. See bug 82913 for details. | 2244 // Tooltip creation can inexplicably fail. See bug 82913 for details. |
2244 LOG_GETLASTERROR(WARNING) << | 2245 LOG_GETLASTERROR(WARNING) << |
2245 "Tooltip creation failed, tooltips won't work"; | 2246 "Tooltip creation failed, tooltips won't work"; |
2246 return; | 2247 return; |
2247 } | 2248 } |
2248 ti.uFlags = TTF_TRANSPARENT; | 2249 ti.uFlags = TTF_TRANSPARENT; |
2249 ti.lpszText = LPSTR_TEXTCALLBACK; | 2250 ti.lpszText = LPSTR_TEXTCALLBACK; |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2498 } | 2499 } |
2499 | 2500 |
2500 //////////////////////////////////////////////////////////////////////////////// | 2501 //////////////////////////////////////////////////////////////////////////////// |
2501 // RenderWidgetHostView, public: | 2502 // RenderWidgetHostView, public: |
2502 | 2503 |
2503 // static | 2504 // static |
2504 RenderWidgetHostView* RenderWidgetHostView::CreateViewForWidget( | 2505 RenderWidgetHostView* RenderWidgetHostView::CreateViewForWidget( |
2505 RenderWidgetHost* widget) { | 2506 RenderWidgetHost* widget) { |
2506 return new RenderWidgetHostViewWin(widget); | 2507 return new RenderWidgetHostViewWin(widget); |
2507 } | 2508 } |
OLD | NEW |