| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/widget/widget_win.h" | 5 #include "views/widget/widget_win.h" |
| 6 | 6 |
| 7 #include "app/gfx/canvas.h" | 7 #include "app/gfx/canvas.h" |
| 8 #include "app/win_util.h" | 8 #include "app/win_util.h" |
| 9 #include "base/gfx/native_theme.h" | 9 #include "base/gfx/native_theme.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 | 196 |
| 197 // Sets the RootView as a property, so the automation can introspect windows. | 197 // Sets the RootView as a property, so the automation can introspect windows. |
| 198 SetRootViewForHWND(hwnd_, root_view_.get()); | 198 SetRootViewForHWND(hwnd_, root_view_.get()); |
| 199 | 199 |
| 200 MessageLoopForUI::current()->AddObserver(this); | 200 MessageLoopForUI::current()->AddObserver(this); |
| 201 | 201 |
| 202 // Windows special DWM window frame requires a special tooltip manager so | 202 // Windows special DWM window frame requires a special tooltip manager so |
| 203 // that window controls in Chrome windows don't flicker when you move your | 203 // that window controls in Chrome windows don't flicker when you move your |
| 204 // mouse over them. See comment in aero_tooltip_manager.h. | 204 // mouse over them. See comment in aero_tooltip_manager.h. |
| 205 if (win_util::ShouldUseVistaFrame()) { | 205 if (win_util::ShouldUseVistaFrame()) { |
| 206 tooltip_manager_.reset(new AeroTooltipManager(this, GetNativeView())); | 206 tooltip_manager_.reset(new AeroTooltipManager(this)); |
| 207 } else { | 207 } else { |
| 208 tooltip_manager_.reset(new TooltipManager(this, GetNativeView())); | 208 tooltip_manager_.reset(new TooltipManagerWin(this)); |
| 209 } | 209 } |
| 210 | 210 |
| 211 // This message initializes the window so that focus border are shown for | 211 // This message initializes the window so that focus border are shown for |
| 212 // windows. | 212 // windows. |
| 213 ::SendMessage(GetNativeView(), | 213 ::SendMessage(GetNativeView(), |
| 214 WM_CHANGEUISTATE, | 214 WM_CHANGEUISTATE, |
| 215 MAKELPARAM(UIS_CLEAR, UISF_HIDEFOCUS), | 215 MAKELPARAM(UIS_CLEAR, UISF_HIDEFOCUS), |
| 216 0); | 216 0); |
| 217 | 217 |
| 218 // Bug 964884: detach the IME attached to this window. | 218 // Bug 964884: detach the IME attached to this window. |
| (...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1032 if (!widget->ProcessWindowMessage(window, message, w_param, l_param, result)) | 1032 if (!widget->ProcessWindowMessage(window, message, w_param, l_param, result)) |
| 1033 result = DefWindowProc(window, message, w_param, l_param); | 1033 result = DefWindowProc(window, message, w_param, l_param); |
| 1034 if (message == WM_NCDESTROY) { | 1034 if (message == WM_NCDESTROY) { |
| 1035 widget->hwnd_ = NULL; | 1035 widget->hwnd_ = NULL; |
| 1036 widget->OnFinalMessage(window); | 1036 widget->OnFinalMessage(window); |
| 1037 } | 1037 } |
| 1038 return result; | 1038 return result; |
| 1039 } | 1039 } |
| 1040 | 1040 |
| 1041 } // namespace views | 1041 } // namespace views |
| OLD | NEW |