OLD | NEW |
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 "ui/base/accessibility/accessible_view_state.h" | 8 #include "ui/base/accessibility/accessible_view_state.h" |
9 #include "ui/events/keycodes/keyboard_codes.h" | 9 #include "ui/events/keycodes/keyboard_codes.h" |
10 #include "ui/gfx/canvas.h" | 10 #include "ui/gfx/canvas.h" |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 } else { | 231 } else { |
232 canvas->sk_canvas()->drawLine(0, line_y, line_end, line_y, paint); | 232 canvas->sk_canvas()->drawLine(0, line_y, line_end, line_y, paint); |
233 } | 233 } |
234 } | 234 } |
235 | 235 |
236 TabbedPane::TabbedPane() | 236 TabbedPane::TabbedPane() |
237 : listener_(NULL), | 237 : listener_(NULL), |
238 tab_strip_(new TabStrip(this)), | 238 tab_strip_(new TabStrip(this)), |
239 contents_(new View()), | 239 contents_(new View()), |
240 selected_tab_index_(-1) { | 240 selected_tab_index_(-1) { |
241 set_focusable(true); | 241 SetFocusable(true); |
242 AddChildView(tab_strip_); | 242 AddChildView(tab_strip_); |
243 AddChildView(contents_); | 243 AddChildView(contents_); |
244 } | 244 } |
245 | 245 |
246 TabbedPane::~TabbedPane() {} | 246 TabbedPane::~TabbedPane() {} |
247 | 247 |
248 int TabbedPane::GetTabCount() { | 248 int TabbedPane::GetTabCount() { |
249 DCHECK_EQ(tab_strip_->child_count(), contents_->child_count()); | 249 DCHECK_EQ(tab_strip_->child_count(), contents_->child_count()); |
250 return contents_->child_count(); | 250 return contents_->child_count(); |
251 } | 251 } |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 selected_tab->NotifyAccessibilityEvent( | 362 selected_tab->NotifyAccessibilityEvent( |
363 ui::AccessibilityTypes::EVENT_FOCUS, true); | 363 ui::AccessibilityTypes::EVENT_FOCUS, true); |
364 } | 364 } |
365 } | 365 } |
366 | 366 |
367 void TabbedPane::GetAccessibleState(ui::AccessibleViewState* state) { | 367 void TabbedPane::GetAccessibleState(ui::AccessibleViewState* state) { |
368 state->role = ui::AccessibilityTypes::ROLE_PAGETABLIST; | 368 state->role = ui::AccessibilityTypes::ROLE_PAGETABLIST; |
369 } | 369 } |
370 | 370 |
371 } // namespace views | 371 } // namespace views |
OLD | NEW |