| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/accessibility/browser_accessibility_manager_android.h" | 5 #include "content/browser/accessibility/browser_accessibility_manager_android.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <cmath> | 9 #include <cmath> |
| 10 | 10 |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 Initialize(initial_tree); | 145 Initialize(initial_tree); |
| 146 SetContentViewCore(content_view_core); | 146 SetContentViewCore(content_view_core); |
| 147 } | 147 } |
| 148 | 148 |
| 149 BrowserAccessibilityManagerAndroid::~BrowserAccessibilityManagerAndroid() { | 149 BrowserAccessibilityManagerAndroid::~BrowserAccessibilityManagerAndroid() { |
| 150 JNIEnv* env = AttachCurrentThread(); | 150 JNIEnv* env = AttachCurrentThread(); |
| 151 ScopedJavaLocalRef<jobject> obj = GetJavaRefFromRootManager(); | 151 ScopedJavaLocalRef<jobject> obj = GetJavaRefFromRootManager(); |
| 152 if (obj.is_null()) | 152 if (obj.is_null()) |
| 153 return; | 153 return; |
| 154 | 154 |
| 155 Java_BrowserAccessibilityManager_onNativeObjectDestroyed(env, obj.obj()); | 155 Java_BrowserAccessibilityManager_onNativeObjectDestroyed( |
| 156 env, obj.obj(),reinterpret_cast<intptr_t>(this)); |
| 156 } | 157 } |
| 157 | 158 |
| 158 // static | 159 // static |
| 159 ui::AXTreeUpdate | 160 ui::AXTreeUpdate |
| 160 BrowserAccessibilityManagerAndroid::GetEmptyDocument() { | 161 BrowserAccessibilityManagerAndroid::GetEmptyDocument() { |
| 161 ui::AXNodeData empty_document; | 162 ui::AXNodeData empty_document; |
| 162 empty_document.id = 0; | 163 empty_document.id = 0; |
| 163 empty_document.role = ui::AX_ROLE_ROOT_WEB_AREA; | 164 empty_document.role = ui::AX_ROLE_ROOT_WEB_AREA; |
| 164 empty_document.state = 1 << ui::AX_STATE_READ_ONLY; | 165 empty_document.state = 1 << ui::AX_STATE_READ_ONLY; |
| 165 | 166 |
| (...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 942 | 943 |
| 943 JNIEnv* env = AttachCurrentThread(); | 944 JNIEnv* env = AttachCurrentThread(); |
| 944 return root_manager->java_ref().get(env); | 945 return root_manager->java_ref().get(env); |
| 945 } | 946 } |
| 946 | 947 |
| 947 bool RegisterBrowserAccessibilityManager(JNIEnv* env) { | 948 bool RegisterBrowserAccessibilityManager(JNIEnv* env) { |
| 948 return RegisterNativesImpl(env); | 949 return RegisterNativesImpl(env); |
| 949 } | 950 } |
| 950 | 951 |
| 951 } // namespace content | 952 } // namespace content |
| OLD | NEW |