| 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_view_android.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_android.h" |
| 6 | 6 |
| 7 #include <android/bitmap.h> | 7 #include <android/bitmap.h> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 944 if (host_) { | 944 if (host_) { |
| 945 SynchronousCompositorImpl* compositor = | 945 SynchronousCompositorImpl* compositor = |
| 946 SynchronousCompositorImpl::FromID(host_->GetProcess()->GetID(), | 946 SynchronousCompositorImpl::FromID(host_->GetProcess()->GetID(), |
| 947 host_->GetRoutingID()); | 947 host_->GetRoutingID()); |
| 948 if (compositor) | 948 if (compositor) |
| 949 return compositor->HandleInputEvent(input_event); | 949 return compositor->HandleInputEvent(input_event); |
| 950 } | 950 } |
| 951 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED; | 951 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED; |
| 952 } | 952 } |
| 953 | 953 |
| 954 void RenderWidgetHostViewAndroid::OnAccessibilityNotifications( | 954 void RenderWidgetHostViewAndroid::OnAccessibilityEvents( |
| 955 const std::vector<AccessibilityHostMsg_NotificationParams>& params) { | 955 const std::vector<AccessibilityHostMsg_EventParams>& params) { |
| 956 if (!host_ || | 956 if (!host_ || |
| 957 host_->accessibility_mode() != AccessibilityModeComplete || | 957 host_->accessibility_mode() != AccessibilityModeComplete || |
| 958 !content_view_core_) { | 958 !content_view_core_) { |
| 959 return; | 959 return; |
| 960 } | 960 } |
| 961 | 961 |
| 962 if (!GetBrowserAccessibilityManager()) { | 962 if (!GetBrowserAccessibilityManager()) { |
| 963 SetBrowserAccessibilityManager( | 963 SetBrowserAccessibilityManager( |
| 964 new BrowserAccessibilityManagerAndroid( | 964 new BrowserAccessibilityManagerAndroid( |
| 965 content_view_core_->GetJavaObject(), | 965 content_view_core_->GetJavaObject(), |
| 966 BrowserAccessibilityManagerAndroid::GetEmptyDocument(), | 966 BrowserAccessibilityManagerAndroid::GetEmptyDocument(), |
| 967 this)); | 967 this)); |
| 968 } | 968 } |
| 969 GetBrowserAccessibilityManager()->OnAccessibilityNotifications(params); | 969 GetBrowserAccessibilityManager()->OnAccessibilityEvents(params); |
| 970 } | 970 } |
| 971 | 971 |
| 972 void RenderWidgetHostViewAndroid::SetAccessibilityFocus(int acc_obj_id) { | 972 void RenderWidgetHostViewAndroid::SetAccessibilityFocus(int acc_obj_id) { |
| 973 if (!host_) | 973 if (!host_) |
| 974 return; | 974 return; |
| 975 | 975 |
| 976 host_->AccessibilitySetFocus(acc_obj_id); | 976 host_->AccessibilitySetFocus(acc_obj_id); |
| 977 } | 977 } |
| 978 | 978 |
| 979 void RenderWidgetHostViewAndroid::AccessibilityDoDefaultAction(int acc_obj_id) { | 979 void RenderWidgetHostViewAndroid::AccessibilityDoDefaultAction(int acc_obj_id) { |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1288 // RenderWidgetHostView, public: | 1288 // RenderWidgetHostView, public: |
| 1289 | 1289 |
| 1290 // static | 1290 // static |
| 1291 RenderWidgetHostView* | 1291 RenderWidgetHostView* |
| 1292 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { | 1292 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { |
| 1293 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); | 1293 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); |
| 1294 return new RenderWidgetHostViewAndroid(rwhi, NULL); | 1294 return new RenderWidgetHostViewAndroid(rwhi, NULL); |
| 1295 } | 1295 } |
| 1296 | 1296 |
| 1297 } // namespace content | 1297 } // namespace content |
| OLD | NEW |