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 "content/browser/renderer_host/render_widget_host_impl.h" | 5 #include "content/browser/renderer_host/render_widget_host_impl.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 #include <set> | 8 #include <set> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 2009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2020 void RenderWidgetHostImpl::ResetAccessibilityMode() { | 2020 void RenderWidgetHostImpl::ResetAccessibilityMode() { |
2021 SetAccessibilityMode( | 2021 SetAccessibilityMode( |
2022 BrowserAccessibilityStateImpl::GetInstance()->accessibility_mode()); | 2022 BrowserAccessibilityStateImpl::GetInstance()->accessibility_mode()); |
2023 } | 2023 } |
2024 | 2024 |
2025 void RenderWidgetHostImpl::SetAccessibilityMode(AccessibilityMode mode) { | 2025 void RenderWidgetHostImpl::SetAccessibilityMode(AccessibilityMode mode) { |
2026 accessibility_mode_ = mode; | 2026 accessibility_mode_ = mode; |
2027 Send(new ViewMsg_SetAccessibilityMode(GetRoutingID(), mode)); | 2027 Send(new ViewMsg_SetAccessibilityMode(GetRoutingID(), mode)); |
2028 } | 2028 } |
2029 | 2029 |
| 2030 void RenderWidgetHostImpl::AccessibilitySetFocus(int object_id) { |
| 2031 Send(new AccessibilityMsg_SetFocus(GetRoutingID(), object_id)); |
| 2032 view_->OnAccessibilitySetFocus(object_id); |
| 2033 } |
| 2034 |
2030 void RenderWidgetHostImpl::AccessibilityDoDefaultAction(int object_id) { | 2035 void RenderWidgetHostImpl::AccessibilityDoDefaultAction(int object_id) { |
2031 Send(new AccessibilityMsg_DoDefaultAction(GetRoutingID(), object_id)); | 2036 Send(new AccessibilityMsg_DoDefaultAction(GetRoutingID(), object_id)); |
2032 } | 2037 } |
2033 | 2038 |
2034 void RenderWidgetHostImpl::AccessibilitySetFocus(int object_id) { | 2039 void RenderWidgetHostImpl::AccessibilityShowMenu(int object_id) { |
2035 Send(new AccessibilityMsg_SetFocus(GetRoutingID(), object_id)); | 2040 view_->AccessibilityShowMenu(object_id); |
2036 } | 2041 } |
2037 | 2042 |
2038 void RenderWidgetHostImpl::AccessibilityScrollToMakeVisible( | 2043 void RenderWidgetHostImpl::AccessibilityScrollToMakeVisible( |
2039 int acc_obj_id, gfx::Rect subfocus) { | 2044 int acc_obj_id, gfx::Rect subfocus) { |
2040 Send(new AccessibilityMsg_ScrollToMakeVisible( | 2045 Send(new AccessibilityMsg_ScrollToMakeVisible( |
2041 GetRoutingID(), acc_obj_id, subfocus)); | 2046 GetRoutingID(), acc_obj_id, subfocus)); |
2042 } | 2047 } |
2043 | 2048 |
2044 void RenderWidgetHostImpl::AccessibilityScrollToPoint( | 2049 void RenderWidgetHostImpl::AccessibilityScrollToPoint( |
2045 int acc_obj_id, gfx::Point point) { | 2050 int acc_obj_id, gfx::Point point) { |
2046 Send(new AccessibilityMsg_ScrollToPoint( | 2051 Send(new AccessibilityMsg_ScrollToPoint( |
2047 GetRoutingID(), acc_obj_id, point)); | 2052 GetRoutingID(), acc_obj_id, point)); |
2048 } | 2053 } |
2049 | 2054 |
2050 void RenderWidgetHostImpl::AccessibilitySetTextSelection( | 2055 void RenderWidgetHostImpl::AccessibilitySetTextSelection( |
2051 int object_id, int start_offset, int end_offset) { | 2056 int object_id, int start_offset, int end_offset) { |
2052 Send(new AccessibilityMsg_SetTextSelection( | 2057 Send(new AccessibilityMsg_SetTextSelection( |
2053 GetRoutingID(), object_id, start_offset, end_offset)); | 2058 GetRoutingID(), object_id, start_offset, end_offset)); |
2054 } | 2059 } |
2055 | 2060 |
2056 void RenderWidgetHostImpl::FatalAccessibilityTreeError() { | 2061 bool RenderWidgetHostImpl::AccessibilityViewHasFocus() const { |
| 2062 return view_->HasFocus(); |
| 2063 } |
| 2064 |
| 2065 gfx::Rect RenderWidgetHostImpl::AccessibilityGetViewBounds() const { |
| 2066 return view_->GetViewBounds(); |
| 2067 } |
| 2068 |
| 2069 gfx::Point RenderWidgetHostImpl::AccessibilityOriginInScreen( |
| 2070 const gfx::Rect& bounds) const { |
| 2071 return view_->AccessibilityOriginInScreen(bounds); |
| 2072 } |
| 2073 |
| 2074 void RenderWidgetHostImpl::AccessibilityFatalError() { |
2057 Send(new AccessibilityMsg_FatalError(GetRoutingID())); | 2075 Send(new AccessibilityMsg_FatalError(GetRoutingID())); |
| 2076 view_->SetBrowserAccessibilityManager(NULL); |
2058 } | 2077 } |
2059 | 2078 |
2060 #if defined(OS_WIN) | 2079 #if defined(OS_WIN) |
2061 void RenderWidgetHostImpl::SetParentNativeViewAccessible( | 2080 void RenderWidgetHostImpl::SetParentNativeViewAccessible( |
2062 gfx::NativeViewAccessible accessible_parent) { | 2081 gfx::NativeViewAccessible accessible_parent) { |
2063 if (view_) | 2082 if (view_) |
2064 view_->SetParentNativeViewAccessible(accessible_parent); | 2083 view_->SetParentNativeViewAccessible(accessible_parent); |
2065 } | 2084 } |
2066 | 2085 |
2067 gfx::NativeViewAccessible | 2086 gfx::NativeViewAccessible |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2350 } | 2369 } |
2351 } | 2370 } |
2352 | 2371 |
2353 SkBitmap::Config RenderWidgetHostImpl::PreferredReadbackFormat() { | 2372 SkBitmap::Config RenderWidgetHostImpl::PreferredReadbackFormat() { |
2354 if (view_) | 2373 if (view_) |
2355 return view_->PreferredReadbackFormat(); | 2374 return view_->PreferredReadbackFormat(); |
2356 return SkBitmap::kARGB_8888_Config; | 2375 return SkBitmap::kARGB_8888_Config; |
2357 } | 2376 } |
2358 | 2377 |
2359 } // namespace content | 2378 } // namespace content |
OLD | NEW |