OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/tabbed_pane/tabbed_pane.h" | 5 #include "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 // TODO(avi): remove when not needed | 9 // TODO(avi): remove when not needed |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
11 #include "ui/base/keycodes/keyboard_codes.h" | 11 #include "ui/base/keycodes/keyboard_codes.h" |
12 #include "views/controls/native/native_view_host.h" | 12 #include "views/controls/native/native_view_host.h" |
13 #include "views/controls/tabbed_pane/native_tabbed_pane_wrapper.h" | 13 #include "views/controls/tabbed_pane/native_tabbed_pane_wrapper.h" |
14 #include "views/controls/tabbed_pane/tabbed_pane_listener.h" | 14 #include "views/controls/tabbed_pane/tabbed_pane_listener.h" |
15 #include "views/widget/widget.h" | 15 #include "views/widget/widget.h" |
16 | 16 |
17 namespace views { | 17 namespace views { |
18 | 18 |
19 // static | 19 // static |
20 const char TabbedPane::kViewClassName[] = "views/TabbedPane"; | 20 const char TabbedPane::kViewClassName[] = "views/TabbedPane"; |
21 | 21 |
22 TabbedPane::TabbedPane() : native_tabbed_pane_(NULL), listener_(NULL) { | 22 TabbedPane::TabbedPane() : native_tabbed_pane_(NULL), listener_(NULL) { |
23 SetFocusable(true); | 23 set_focusable(true); |
24 } | 24 } |
25 | 25 |
26 TabbedPane::~TabbedPane() { | 26 TabbedPane::~TabbedPane() { |
27 } | 27 } |
28 | 28 |
29 int TabbedPane::GetTabCount() { | 29 int TabbedPane::GetTabCount() { |
30 return native_tabbed_pane_->GetTabCount(); | 30 return native_tabbed_pane_->GetTabCount(); |
31 } | 31 } |
32 | 32 |
33 int TabbedPane::GetSelectedTabIndex() { | 33 int TabbedPane::GetSelectedTabIndex() { |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 if (NativeViewHost::kRenderNativeControlFocus) | 138 if (NativeViewHost::kRenderNativeControlFocus) |
139 View::OnPaintFocusBorder(canvas); | 139 View::OnPaintFocusBorder(canvas); |
140 } | 140 } |
141 | 141 |
142 void TabbedPane::GetAccessibleState(ui::AccessibleViewState* state) { | 142 void TabbedPane::GetAccessibleState(ui::AccessibleViewState* state) { |
143 state->role = ui::AccessibilityTypes::ROLE_PAGETABLIST; | 143 state->role = ui::AccessibilityTypes::ROLE_PAGETABLIST; |
144 state->name = accessible_name_; | 144 state->name = accessible_name_; |
145 } | 145 } |
146 | 146 |
147 } // namespace views | 147 } // namespace views |
OLD | NEW |