Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_android.cc

Issue 246773008: RWHI should implement BrowserAccessibilityDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Mac tests Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/android/sys_utils.h" 9 #include "base/android/sys_utils.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after
1181 void RenderWidgetHostViewAndroid::CreateBrowserAccessibilityManagerIfNeeded() { 1181 void RenderWidgetHostViewAndroid::CreateBrowserAccessibilityManagerIfNeeded() {
1182 if (!host_ || host_->accessibility_mode() != AccessibilityModeComplete) 1182 if (!host_ || host_->accessibility_mode() != AccessibilityModeComplete)
1183 return; 1183 return;
1184 1184
1185 if (!GetBrowserAccessibilityManager()) { 1185 if (!GetBrowserAccessibilityManager()) {
1186 base::android::ScopedJavaLocalRef<jobject> obj; 1186 base::android::ScopedJavaLocalRef<jobject> obj;
1187 if (content_view_core_) 1187 if (content_view_core_)
1188 obj = content_view_core_->GetJavaObject(); 1188 obj = content_view_core_->GetJavaObject();
1189 SetBrowserAccessibilityManager( 1189 SetBrowserAccessibilityManager(
1190 new BrowserAccessibilityManagerAndroid( 1190 new BrowserAccessibilityManagerAndroid(
1191 obj, BrowserAccessibilityManagerAndroid::GetEmptyDocument(), this)); 1191 obj,
1192 BrowserAccessibilityManagerAndroid::GetEmptyDocument(),
1193 host_));
1192 } 1194 }
1193 } 1195 }
1194 1196
1195 void RenderWidgetHostViewAndroid::SetAccessibilityFocus(int acc_obj_id) {
1196 if (!host_)
1197 return;
1198
1199 host_->AccessibilitySetFocus(acc_obj_id);
1200 }
1201
1202 void RenderWidgetHostViewAndroid::AccessibilityDoDefaultAction(int acc_obj_id) {
1203 if (!host_)
1204 return;
1205
1206 host_->AccessibilityDoDefaultAction(acc_obj_id);
1207 }
1208
1209 void RenderWidgetHostViewAndroid::AccessibilityScrollToMakeVisible(
1210 int acc_obj_id, gfx::Rect subfocus) {
1211 if (!host_)
1212 return;
1213
1214 host_->AccessibilityScrollToMakeVisible(acc_obj_id, subfocus);
1215 }
1216
1217 void RenderWidgetHostViewAndroid::AccessibilityScrollToPoint(
1218 int acc_obj_id, gfx::Point point) {
1219 if (!host_)
1220 return;
1221
1222 host_->AccessibilityScrollToPoint(acc_obj_id, point);
1223 }
1224
1225 void RenderWidgetHostViewAndroid::AccessibilitySetTextSelection(
1226 int acc_obj_id, int start_offset, int end_offset) {
1227 if (!host_)
1228 return;
1229
1230 host_->AccessibilitySetTextSelection(
1231 acc_obj_id, start_offset, end_offset);
1232 }
1233
1234 gfx::Point RenderWidgetHostViewAndroid::GetLastTouchEventLocation() const {
1235 NOTIMPLEMENTED();
1236 // Only used on Win8
1237 return gfx::Point();
1238 }
1239
1240 void RenderWidgetHostViewAndroid::FatalAccessibilityTreeError() {
1241 if (!host_)
1242 return;
1243
1244 host_->FatalAccessibilityTreeError();
1245 SetBrowserAccessibilityManager(NULL);
1246 }
1247
1248 bool RenderWidgetHostViewAndroid::LockMouse() { 1197 bool RenderWidgetHostViewAndroid::LockMouse() {
1249 NOTIMPLEMENTED(); 1198 NOTIMPLEMENTED();
1250 return false; 1199 return false;
1251 } 1200 }
1252 1201
1253 void RenderWidgetHostViewAndroid::UnlockMouse() { 1202 void RenderWidgetHostViewAndroid::UnlockMouse() {
1254 NOTIMPLEMENTED(); 1203 NOTIMPLEMENTED();
1255 } 1204 }
1256 1205
1257 // Methods called from the host to the render 1206 // Methods called from the host to the render
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
1496 // RenderWidgetHostView, public: 1445 // RenderWidgetHostView, public:
1497 1446
1498 // static 1447 // static
1499 RenderWidgetHostView* 1448 RenderWidgetHostView*
1500 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { 1449 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) {
1501 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); 1450 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget);
1502 return new RenderWidgetHostViewAndroid(rwhi, NULL); 1451 return new RenderWidgetHostViewAndroid(rwhi, NULL);
1503 } 1452 }
1504 1453
1505 } // namespace content 1454 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698