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

Side by Side Diff: views/widget/widget_win.cc

Issue 122002: Moving the WM_SETFOCUS message processing out of FocusManager (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | « views/focus/focus_manager_unittest.cc ('k') | no next file » | 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) 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/gfx/path.h" 8 #include "app/gfx/path.h"
9 #include "app/win_util.h" 9 #include "app/win_util.h"
10 #include "base/gfx/native_theme.h" 10 #include "base/gfx/native_theme.h"
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 DCHECK(hwnd_); 182 DCHECK(hwnd_);
183 SetWindowSupportsRerouteMouseWheel(hwnd_); 183 SetWindowSupportsRerouteMouseWheel(hwnd_);
184 184
185 // The window procedure should have set the data for us. 185 // The window procedure should have set the data for us.
186 DCHECK(win_util::GetWindowUserData(hwnd_) == this); 186 DCHECK(win_util::GetWindowUserData(hwnd_) == this);
187 187
188 root_view_->OnWidgetCreated(); 188 root_view_->OnWidgetCreated();
189 189
190 if (has_own_focus_manager) { 190 if (has_own_focus_manager) {
191 FocusManager::CreateFocusManager(hwnd_, GetRootView()); 191 FocusManager::CreateFocusManager(hwnd_, GetRootView());
192 } else {
193 // Subclass the window so we get the tab key messages when a view with no
194 // associated native window is focused.
195 FocusManager::InstallFocusSubclass(hwnd_, NULL);
196 } 192 }
197 193
198 // Sets the RootView as a property, so the automation can introspect windows. 194 // Sets the RootView as a property, so the automation can introspect windows.
199 SetRootViewForHWND(hwnd_, root_view_.get()); 195 SetRootViewForHWND(hwnd_, root_view_.get());
200 196
201 MessageLoopForUI::current()->AddObserver(this); 197 MessageLoopForUI::current()->AddObserver(this);
202 198
203 // Windows special DWM window frame requires a special tooltip manager so 199 // Windows special DWM window frame requires a special tooltip manager so
204 // that window controls in Chrome windows don't flicker when you move your 200 // that window controls in Chrome windows don't flicker when you move your
205 // mouse over them. See comment in aero_tooltip_manager.h. 201 // mouse over them. See comment in aero_tooltip_manager.h.
(...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after
1062 } 1058 }
1063 if (WA_INACTIVE == activation_state) { 1059 if (WA_INACTIVE == activation_state) {
1064 focus_manager->StoreFocusedView(); 1060 focus_manager->StoreFocusedView();
1065 } else { 1061 } else {
1066 // We must restore the focus after the message has been DefProc'ed as it 1062 // We must restore the focus after the message has been DefProc'ed as it
1067 // does set the focus to the last focused HWND. 1063 // does set the focus to the last focused HWND.
1068 focus_manager->RestoreFocusedView(); 1064 focus_manager->RestoreFocusedView();
1069 } 1065 }
1070 } 1066 }
1071 } // namespace views 1067 } // namespace views
OLDNEW
« no previous file with comments | « views/focus/focus_manager_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698