| 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 "android_webview/native/aw_web_contents_delegate.h" | 5 #include "android_webview/native/aw_web_contents_delegate.h" |
| 6 | 6 |
| 7 #include "android_webview/browser/find_helper.h" |
| 8 #include "android_webview/native/aw_contents.h" |
| 9 #include "content/public/browser/web_contents.h" |
| 10 |
| 11 using content::WebContents; |
| 12 |
| 7 namespace android_webview { | 13 namespace android_webview { |
| 8 | 14 |
| 9 AwWebContentsDelegate::AwWebContentsDelegate( | 15 AwWebContentsDelegate::AwWebContentsDelegate( |
| 10 JNIEnv* env, | 16 JNIEnv* env, |
| 11 jobject obj) | 17 jobject obj) |
| 12 : WebContentsDelegateAndroid(env, obj) { | 18 : WebContentsDelegateAndroid(env, obj) { |
| 13 } | 19 } |
| 14 | 20 |
| 15 AwWebContentsDelegate::~AwWebContentsDelegate() { | 21 AwWebContentsDelegate::~AwWebContentsDelegate() { |
| 16 } | 22 } |
| 17 | 23 |
| 24 void AwWebContentsDelegate::FindReply(WebContents* web_contents, |
| 25 int request_id, |
| 26 int number_of_matches, |
| 27 const gfx::Rect& selection_rect, |
| 28 int active_match_ordinal, |
| 29 bool final_update) { |
| 30 AwContents* aw_contents = AwContents::FromWebContents(web_contents); |
| 31 if (!aw_contents) |
| 32 return; |
| 33 |
| 34 aw_contents->GetFindHelper()->HandleFindReply(request_id, |
| 35 number_of_matches, |
| 36 active_match_ordinal, |
| 37 final_update); |
| 38 } |
| 39 |
| 18 } // namespace android_webview | 40 } // namespace android_webview |
| OLD | NEW |