| 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/web_contents/web_contents_android.h" | 5 #include "content/browser/web_contents/web_contents_android.h" |
| 6 | 6 |
| 7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
| 8 #include "base/android/jni_array.h" | 8 #include "base/android/jni_array.h" |
| 9 #include "base/android/jni_string.h" | 9 #include "base/android/jni_string.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 | 237 |
| 238 bool WebContentsAndroid::IsLoadingToDifferentDocument(JNIEnv* env, | 238 bool WebContentsAndroid::IsLoadingToDifferentDocument(JNIEnv* env, |
| 239 jobject obj) const { | 239 jobject obj) const { |
| 240 return web_contents_->IsLoadingToDifferentDocument(); | 240 return web_contents_->IsLoadingToDifferentDocument(); |
| 241 } | 241 } |
| 242 | 242 |
| 243 void WebContentsAndroid::Stop(JNIEnv* env, jobject obj) { | 243 void WebContentsAndroid::Stop(JNIEnv* env, jobject obj) { |
| 244 web_contents_->Stop(); | 244 web_contents_->Stop(); |
| 245 } | 245 } |
| 246 | 246 |
| 247 void WebContentsAndroid::Cut(JNIEnv* env, jobject obj) { |
| 248 web_contents_->Cut(); |
| 249 } |
| 250 |
| 251 void WebContentsAndroid::Copy(JNIEnv* env, jobject obj) { |
| 252 web_contents_->Copy(); |
| 253 } |
| 254 |
| 255 void WebContentsAndroid::Paste(JNIEnv* env, jobject obj) { |
| 256 web_contents_->Paste(); |
| 257 } |
| 258 |
| 259 void WebContentsAndroid::SelectAll(JNIEnv* env, jobject obj) { |
| 260 web_contents_->SelectAll(); |
| 261 } |
| 262 |
| 263 void WebContentsAndroid::Unselect(JNIEnv* env, jobject obj) { |
| 264 web_contents_->Unselect(); |
| 265 } |
| 266 |
| 247 void WebContentsAndroid::InsertCSS( | 267 void WebContentsAndroid::InsertCSS( |
| 248 JNIEnv* env, jobject jobj, jstring jcss) { | 268 JNIEnv* env, jobject jobj, jstring jcss) { |
| 249 web_contents_->InsertCSS(base::android::ConvertJavaStringToUTF8(env, jcss)); | 269 web_contents_->InsertCSS(base::android::ConvertJavaStringToUTF8(env, jcss)); |
| 250 } | 270 } |
| 251 | 271 |
| 252 RenderWidgetHostViewAndroid* | 272 RenderWidgetHostViewAndroid* |
| 253 WebContentsAndroid::GetRenderWidgetHostViewAndroid() { | 273 WebContentsAndroid::GetRenderWidgetHostViewAndroid() { |
| 254 RenderWidgetHostView* rwhv = NULL; | 274 RenderWidgetHostView* rwhv = NULL; |
| 255 rwhv = web_contents_->GetRenderWidgetHostView(); | 275 rwhv = web_contents_->GetRenderWidgetHostView(); |
| 256 if (web_contents_->ShowingInterstitialPage()) { | 276 if (web_contents_->ShowingInterstitialPage()) { |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 ContentViewCoreImpl* contentViewCore = | 462 ContentViewCoreImpl* contentViewCore = |
| 443 ContentViewCoreImpl::FromWebContents(web_contents_); | 463 ContentViewCoreImpl::FromWebContents(web_contents_); |
| 444 WebContentsImpl::AXTreeSnapshotCallback snapshot_callback = | 464 WebContentsImpl::AXTreeSnapshotCallback snapshot_callback = |
| 445 base::Bind(&AXTreeSnapshotCallback, j_callback, | 465 base::Bind(&AXTreeSnapshotCallback, j_callback, |
| 446 contentViewCore->GetScaleFactor()); | 466 contentViewCore->GetScaleFactor()); |
| 447 static_cast<WebContentsImpl*>(web_contents_)->RequestAXTreeSnapshot( | 467 static_cast<WebContentsImpl*>(web_contents_)->RequestAXTreeSnapshot( |
| 448 snapshot_callback); | 468 snapshot_callback); |
| 449 } | 469 } |
| 450 | 470 |
| 451 } // namespace content | 471 } // namespace content |
| OLD | NEW |