| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/browser/api/web_view/web_view_internal_api.h" | 5 #include "extensions/browser/api/web_view/web_view_internal_api.h" |
| 6 | 6 |
| 7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "content/public/browser/render_process_host.h" | 9 #include "content/public/browser/render_process_host.h" |
| 10 #include "content/public/browser/render_view_host.h" | 10 #include "content/public/browser/render_view_host.h" |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 | 237 |
| 238 // Set the find options to their default values. | 238 // Set the find options to their default values. |
| 239 blink::WebFindOptions options; | 239 blink::WebFindOptions options; |
| 240 if (params->options) { | 240 if (params->options) { |
| 241 options.forward = | 241 options.forward = |
| 242 params->options->backward ? !*params->options->backward : true; | 242 params->options->backward ? !*params->options->backward : true; |
| 243 options.matchCase = | 243 options.matchCase = |
| 244 params->options->match_case ? *params->options->match_case : false; | 244 params->options->match_case ? *params->options->match_case : false; |
| 245 } | 245 } |
| 246 | 246 |
| 247 guest->StartFinding(search_text, options, this); | 247 guest->StartFindInternal(search_text, options, this); |
| 248 return true; | 248 return true; |
| 249 } | 249 } |
| 250 | 250 |
| 251 WebViewInternalStopFindingFunction::WebViewInternalStopFindingFunction() { | 251 WebViewInternalStopFindingFunction::WebViewInternalStopFindingFunction() { |
| 252 } | 252 } |
| 253 | 253 |
| 254 WebViewInternalStopFindingFunction::~WebViewInternalStopFindingFunction() { | 254 WebViewInternalStopFindingFunction::~WebViewInternalStopFindingFunction() { |
| 255 } | 255 } |
| 256 | 256 |
| 257 bool WebViewInternalStopFindingFunction::RunAsyncSafe(WebViewGuest* guest) { | 257 bool WebViewInternalStopFindingFunction::RunAsyncSafe(WebViewGuest* guest) { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 268 case webview::StopFinding::Params::ACTION_KEEP: | 268 case webview::StopFinding::Params::ACTION_KEEP: |
| 269 action = content::STOP_FIND_ACTION_KEEP_SELECTION; | 269 action = content::STOP_FIND_ACTION_KEEP_SELECTION; |
| 270 break; | 270 break; |
| 271 case webview::StopFinding::Params::ACTION_ACTIVATE: | 271 case webview::StopFinding::Params::ACTION_ACTIVATE: |
| 272 action = content::STOP_FIND_ACTION_ACTIVATE_SELECTION; | 272 action = content::STOP_FIND_ACTION_ACTIVATE_SELECTION; |
| 273 break; | 273 break; |
| 274 default: | 274 default: |
| 275 action = content::STOP_FIND_ACTION_KEEP_SELECTION; | 275 action = content::STOP_FIND_ACTION_KEEP_SELECTION; |
| 276 } | 276 } |
| 277 | 277 |
| 278 guest->StopFinding(action); | 278 guest->StopFindingInternal(action); |
| 279 return true; | 279 return true; |
| 280 } | 280 } |
| 281 | 281 |
| 282 WebViewInternalLoadDataWithBaseUrlFunction:: | 282 WebViewInternalLoadDataWithBaseUrlFunction:: |
| 283 WebViewInternalLoadDataWithBaseUrlFunction() { | 283 WebViewInternalLoadDataWithBaseUrlFunction() { |
| 284 } | 284 } |
| 285 | 285 |
| 286 WebViewInternalLoadDataWithBaseUrlFunction:: | 286 WebViewInternalLoadDataWithBaseUrlFunction:: |
| 287 ~WebViewInternalLoadDataWithBaseUrlFunction() { | 287 ~WebViewInternalLoadDataWithBaseUrlFunction() { |
| 288 } | 288 } |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 // Will finish asynchronously. | 493 // Will finish asynchronously. |
| 494 return true; | 494 return true; |
| 495 } | 495 } |
| 496 | 496 |
| 497 void WebViewInternalClearDataFunction::ClearDataDone() { | 497 void WebViewInternalClearDataFunction::ClearDataDone() { |
| 498 Release(); // Balanced in RunAsync(). | 498 Release(); // Balanced in RunAsync(). |
| 499 SendResponse(true); | 499 SendResponse(true); |
| 500 } | 500 } |
| 501 | 501 |
| 502 } // namespace extensions | 502 } // namespace extensions |
| OLD | NEW |