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 "chrome/browser/ui/views/tab_contents/native_tab_contents_container_win
.h" | 5 #include "chrome/browser/ui/views/tab_contents/native_tab_contents_container_win
.h" |
6 | 6 |
| 7 #include "chrome/browser/renderer_host/render_widget_host_view_win.h" |
7 #include "chrome/browser/ui/view_ids.h" | 8 #include "chrome/browser/ui/view_ids.h" |
8 #include "chrome/browser/ui/views/tab_contents/tab_contents_container.h" | 9 #include "chrome/browser/ui/views/tab_contents/tab_contents_container.h" |
9 #include "chrome/browser/ui/views/tab_contents/tab_contents_view_views.h" | 10 #include "chrome/browser/ui/views/tab_contents/tab_contents_view_views.h" |
10 #include "content/browser/renderer_host/render_widget_host_view.h" | 11 #include "content/browser/renderer_host/render_widget_host_view.h" |
11 #include "content/browser/tab_contents/interstitial_page.h" | 12 #include "content/browser/tab_contents/interstitial_page.h" |
12 #include "content/browser/tab_contents/tab_contents.h" | 13 #include "content/browser/tab_contents/tab_contents.h" |
13 #include "ui/base/accessibility/accessible_view_state.h" | 14 #include "ui/base/accessibility/accessible_view_state.h" |
14 #include "views/focus/focus_manager.h" | 15 #include "views/focus/focus_manager.h" |
15 | 16 |
16 //////////////////////////////////////////////////////////////////////////////// | 17 //////////////////////////////////////////////////////////////////////////////// |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 void NativeTabContentsContainerWin::AboutToRequestFocusFromTabTraversal( | 129 void NativeTabContentsContainerWin::AboutToRequestFocusFromTabTraversal( |
129 bool reverse) { | 130 bool reverse) { |
130 container_->tab_contents()->FocusThroughTabTraversal(reverse); | 131 container_->tab_contents()->FocusThroughTabTraversal(reverse); |
131 } | 132 } |
132 | 133 |
133 void NativeTabContentsContainerWin::GetAccessibleState( | 134 void NativeTabContentsContainerWin::GetAccessibleState( |
134 ui::AccessibleViewState* state) { | 135 ui::AccessibleViewState* state) { |
135 state->role = ui::AccessibilityTypes::ROLE_GROUPING; | 136 state->role = ui::AccessibilityTypes::ROLE_GROUPING; |
136 } | 137 } |
137 | 138 |
| 139 gfx::NativeViewAccessible |
| 140 NativeTabContentsContainerWin::GetNativeViewAccessible() { |
| 141 TabContents* tab_contents = container_->tab_contents(); |
| 142 if (tab_contents) { |
| 143 RenderWidgetHostViewWin* host_view_win = |
| 144 static_cast<RenderWidgetHostViewWin*>( |
| 145 tab_contents->GetRenderWidgetHostView()); |
| 146 if (host_view_win) |
| 147 return host_view_win->GetIAccessible(); |
| 148 } |
| 149 |
| 150 return View::GetNativeViewAccessible(); |
| 151 } |
| 152 |
138 //////////////////////////////////////////////////////////////////////////////// | 153 //////////////////////////////////////////////////////////////////////////////// |
139 // NativeTabContentsContainer, public: | 154 // NativeTabContentsContainer, public: |
140 | 155 |
141 // static | 156 // static |
142 NativeTabContentsContainer* NativeTabContentsContainer::CreateNativeContainer( | 157 NativeTabContentsContainer* NativeTabContentsContainer::CreateNativeContainer( |
143 TabContentsContainer* container) { | 158 TabContentsContainer* container) { |
144 return new NativeTabContentsContainerWin(container); | 159 return new NativeTabContentsContainerWin(container); |
145 } | 160 } |
OLD | NEW |