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

Side by Side Diff: ui/views/view.cc

Issue 1894383002: MacViews: Implement Full Keyboard Access. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@SetFocusBehavior
Patch Set: Rebased Created 4 years, 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #define _USE_MATH_DEFINES // For VC++ to get M_PI. This has to be first. 5 #define _USE_MATH_DEFINES // For VC++ to get M_PI. This has to be first.
6 6
7 #include "ui/views/view.h" 7 #include "ui/views/view.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <cmath> 10 #include <cmath>
(...skipping 1208 matching lines...) Expand 10 before | Expand all | Expand 10 after
1219 return widget ? widget->GetFocusManager() : NULL; 1219 return widget ? widget->GetFocusManager() : NULL;
1220 } 1220 }
1221 1221
1222 const FocusManager* View::GetFocusManager() const { 1222 const FocusManager* View::GetFocusManager() const {
1223 const Widget* widget = GetWidget(); 1223 const Widget* widget = GetWidget();
1224 return widget ? widget->GetFocusManager() : NULL; 1224 return widget ? widget->GetFocusManager() : NULL;
1225 } 1225 }
1226 1226
1227 void View::RequestFocus() { 1227 void View::RequestFocus() {
1228 FocusManager* focus_manager = GetFocusManager(); 1228 FocusManager* focus_manager = GetFocusManager();
1229 if (focus_manager && IsFocusable()) 1229 if (focus_manager && IsAccessibilityFocusable())
1230 focus_manager->SetFocusedView(this); 1230 focus_manager->SetFocusedView(this);
1231 } 1231 }
1232 1232
1233 bool View::SkipDefaultKeyEventProcessing(const ui::KeyEvent& event) { 1233 bool View::SkipDefaultKeyEventProcessing(const ui::KeyEvent& event) {
1234 return false; 1234 return false;
1235 } 1235 }
1236 1236
1237 FocusTraversable* View::GetFocusTraversable() { 1237 FocusTraversable* View::GetFocusTraversable() {
1238 return NULL; 1238 return NULL;
1239 } 1239 }
(...skipping 1175 matching lines...) Expand 10 before | Expand all | Expand 10 after
2415 // Message the RootView to do the drag and drop. That way if we're removed 2415 // Message the RootView to do the drag and drop. That way if we're removed
2416 // the RootView can detect it and avoid calling us back. 2416 // the RootView can detect it and avoid calling us back.
2417 gfx::Point widget_location(event.location()); 2417 gfx::Point widget_location(event.location());
2418 ConvertPointToWidget(this, &widget_location); 2418 ConvertPointToWidget(this, &widget_location);
2419 widget->RunShellDrag(this, data, widget_location, drag_operations, source); 2419 widget->RunShellDrag(this, data, widget_location, drag_operations, source);
2420 // WARNING: we may have been deleted. 2420 // WARNING: we may have been deleted.
2421 return true; 2421 return true;
2422 } 2422 }
2423 2423
2424 } // namespace views 2424 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698