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

Side by Side Diff: ui/views/controls/tabbed_pane/tabbed_pane.cc

Issue 1690543004: MacViews: Implement Full Keyboard Access. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 #include "ui/views/controls/tabbed_pane/tabbed_pane.h" 5 #include "ui/views/controls/tabbed_pane/tabbed_pane.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "third_party/skia/include/core/SkPaint.h" 9 #include "third_party/skia/include/core/SkPaint.h"
10 #include "third_party/skia/include/core/SkPath.h" 10 #include "third_party/skia/include/core/SkPath.h"
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 } else { 260 } else {
261 canvas->sk_canvas()->drawLine(0, line_y, line_end, line_y, paint); 261 canvas->sk_canvas()->drawLine(0, line_y, line_end, line_y, paint);
262 } 262 }
263 } 263 }
264 264
265 TabbedPane::TabbedPane() 265 TabbedPane::TabbedPane()
266 : listener_(NULL), 266 : listener_(NULL),
267 tab_strip_(new TabStrip(this)), 267 tab_strip_(new TabStrip(this)),
268 contents_(new View()), 268 contents_(new View()),
269 selected_tab_index_(-1) { 269 selected_tab_index_(-1) {
270 #if !defined(OS_MACOSX)
270 SetFocusable(true); 271 SetFocusable(true);
272 #else
273 SetFocusable(false);
274 SetAccessibilityFocusable(true);
275 #endif
271 AddChildView(tab_strip_); 276 AddChildView(tab_strip_);
272 AddChildView(contents_); 277 AddChildView(contents_);
273 } 278 }
274 279
275 TabbedPane::~TabbedPane() {} 280 TabbedPane::~TabbedPane() {}
276 281
277 int TabbedPane::GetTabCount() { 282 int TabbedPane::GetTabCount() {
278 DCHECK_EQ(tab_strip_->child_count(), contents_->child_count()); 283 DCHECK_EQ(tab_strip_->child_count(), contents_->child_count());
279 return contents_->child_count(); 284 return contents_->child_count();
280 } 285 }
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 selected_tab->NotifyAccessibilityEvent( 396 selected_tab->NotifyAccessibilityEvent(
392 ui::AX_EVENT_FOCUS, true); 397 ui::AX_EVENT_FOCUS, true);
393 } 398 }
394 } 399 }
395 400
396 void TabbedPane::GetAccessibleState(ui::AXViewState* state) { 401 void TabbedPane::GetAccessibleState(ui::AXViewState* state) {
397 state->role = ui::AX_ROLE_TAB_LIST; 402 state->role = ui::AX_ROLE_TAB_LIST;
398 } 403 }
399 404
400 } // namespace views 405 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698