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

Side by Side Diff: views/controls/native_control.cc

Issue 3038031: Set the initial focus when the task manager first activates and shows. Also,... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 4 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 | « chrome/browser/views/task_manager_view.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/controls/native_control.h" 5 #include "views/controls/native_control.h"
6 6
7 #include <atlbase.h> 7 #include <atlbase.h>
8 #include <atlapp.h> 8 #include <atlapp.h>
9 #include <atlcrack.h> 9 #include <atlcrack.h>
10 #include <atlframe.h> 10 #include <atlframe.h>
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 if (location.x == -1 && location.y == -1) 263 if (location.x == -1 && location.y == -1)
264 ShowContextMenu(GetKeyboardContextMenuLocation(), false); 264 ShowContextMenu(GetKeyboardContextMenuLocation(), false);
265 else 265 else
266 ShowContextMenu(gfx::Point(location), true); 266 ShowContextMenu(gfx::Point(location), true);
267 } 267 }
268 268
269 void NativeControl::Focus() { 269 void NativeControl::Focus() {
270 if (container_) { 270 if (container_) {
271 DCHECK(container_->GetControl()); 271 DCHECK(container_->GetControl());
272 ::SetFocus(container_->GetControl()); 272 ::SetFocus(container_->GetControl());
273 NotifyAccessibilityEvent(AccessibilityTypes::EVENT_FOCUS);
Chris Guillory 2010/07/28 16:53:29 Curious: Why send focus for our view here? Aren't
273 } 274 }
274 } 275 }
275 276
276 HWND NativeControl::GetNativeControlHWND() { 277 HWND NativeControl::GetNativeControlHWND() {
277 if (container_) 278 if (container_)
278 return container_->GetControl(); 279 return container_->GetControl();
279 else 280 else
280 return NULL; 281 return NULL;
281 } 282 }
282 283
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 reinterpret_cast<WNDPROC>(original_handler)); 374 reinterpret_cast<WNDPROC>(original_handler));
374 RemoveProp(window, kHandlerKey); 375 RemoveProp(window, kHandlerKey);
375 RemoveProp(window, kNativeControlKey); 376 RemoveProp(window, kNativeControlKey);
376 } 377 }
377 378
378 return CallWindowProc(reinterpret_cast<WNDPROC>(original_handler), window, 379 return CallWindowProc(reinterpret_cast<WNDPROC>(original_handler), window,
379 message, w_param, l_param); 380 message, w_param, l_param);
380 } 381 }
381 382
382 } // namespace views 383 } // namespace views
OLDNEW
« no previous file with comments | « chrome/browser/views/task_manager_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698