| OLD | NEW |
| 1 // Copyright (c) 2011 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/base/keycodes/keyboard_codes.h" | 9 #include "ui/base/keycodes/keyboard_codes.h" |
| 10 #include "ui/views/controls/native/native_view_host.h" | 10 #include "ui/views/controls/native/native_view_host.h" |
| 11 #include "ui/views/controls/tabbed_pane/native_tabbed_pane_wrapper.h" | 11 #include "ui/views/controls/tabbed_pane/native_tabbed_pane_wrapper.h" |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 if (selected_tab) { | 122 if (selected_tab) { |
| 123 selected_tab->GetWidget()->NotifyAccessibilityEvent( | 123 selected_tab->GetWidget()->NotifyAccessibilityEvent( |
| 124 selected_tab, ui::AccessibilityTypes::EVENT_FOCUS, true); | 124 selected_tab, ui::AccessibilityTypes::EVENT_FOCUS, true); |
| 125 } | 125 } |
| 126 } else { | 126 } else { |
| 127 View::OnFocus(); // Will focus the RootView window (so we still get | 127 View::OnFocus(); // Will focus the RootView window (so we still get |
| 128 // keyboard messages). | 128 // keyboard messages). |
| 129 } | 129 } |
| 130 } | 130 } |
| 131 | 131 |
| 132 void TabbedPane::OnPaintFocusBorder(gfx::Canvas* canvas) { | 132 void TabbedPane::OnPaintFocusBorder(gfx::CanvasSkia* canvas) { |
| 133 if (NativeViewHost::kRenderNativeControlFocus) | 133 if (NativeViewHost::kRenderNativeControlFocus) |
| 134 View::OnPaintFocusBorder(canvas); | 134 View::OnPaintFocusBorder(canvas); |
| 135 } | 135 } |
| 136 | 136 |
| 137 void TabbedPane::GetAccessibleState(ui::AccessibleViewState* state) { | 137 void TabbedPane::GetAccessibleState(ui::AccessibleViewState* state) { |
| 138 state->role = ui::AccessibilityTypes::ROLE_PAGETABLIST; | 138 state->role = ui::AccessibilityTypes::ROLE_PAGETABLIST; |
| 139 state->name = accessible_name_; | 139 state->name = accessible_name_; |
| 140 } | 140 } |
| 141 | 141 |
| 142 } // namespace views | 142 } // namespace views |
| OLD | NEW |