| 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/guest_view/web_view/web_view_internal_api.h" | 5 #include "extensions/browser/api/guest_view/web_view/web_view_internal_api.h" |
| 6 | 6 |
| 7 #include "base/strings/string_number_conversions.h" | 7 #include "base/strings/string_number_conversions.h" |
| 8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "content/public/browser/browser_context.h" | 10 #include "content/public/browser/browser_context.h" |
| (...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 635 | 635 |
| 636 // Set the find options to their default values. | 636 // Set the find options to their default values. |
| 637 blink::WebFindOptions options; | 637 blink::WebFindOptions options; |
| 638 if (params->options) { | 638 if (params->options) { |
| 639 options.forward = | 639 options.forward = |
| 640 params->options->backward ? !*params->options->backward : true; | 640 params->options->backward ? !*params->options->backward : true; |
| 641 options.matchCase = | 641 options.matchCase = |
| 642 params->options->match_case ? *params->options->match_case : false; | 642 params->options->match_case ? *params->options->match_case : false; |
| 643 } | 643 } |
| 644 | 644 |
| 645 guest->StartFindInternal(search_text, options, this); | 645 guest->StartFind(search_text, options, this); |
| 646 return true; | 646 return true; |
| 647 } | 647 } |
| 648 | 648 |
| 649 WebViewInternalStopFindingFunction::WebViewInternalStopFindingFunction() { | 649 WebViewInternalStopFindingFunction::WebViewInternalStopFindingFunction() { |
| 650 } | 650 } |
| 651 | 651 |
| 652 WebViewInternalStopFindingFunction::~WebViewInternalStopFindingFunction() { | 652 WebViewInternalStopFindingFunction::~WebViewInternalStopFindingFunction() { |
| 653 } | 653 } |
| 654 | 654 |
| 655 bool WebViewInternalStopFindingFunction::RunAsyncSafe(WebViewGuest* guest) { | 655 bool WebViewInternalStopFindingFunction::RunAsyncSafe(WebViewGuest* guest) { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 666 case web_view_internal::STOP_FINDING_ACTION_KEEP: | 666 case web_view_internal::STOP_FINDING_ACTION_KEEP: |
| 667 action = content::STOP_FIND_ACTION_KEEP_SELECTION; | 667 action = content::STOP_FIND_ACTION_KEEP_SELECTION; |
| 668 break; | 668 break; |
| 669 case web_view_internal::STOP_FINDING_ACTION_ACTIVATE: | 669 case web_view_internal::STOP_FINDING_ACTION_ACTIVATE: |
| 670 action = content::STOP_FIND_ACTION_ACTIVATE_SELECTION; | 670 action = content::STOP_FIND_ACTION_ACTIVATE_SELECTION; |
| 671 break; | 671 break; |
| 672 default: | 672 default: |
| 673 action = content::STOP_FIND_ACTION_KEEP_SELECTION; | 673 action = content::STOP_FIND_ACTION_KEEP_SELECTION; |
| 674 } | 674 } |
| 675 | 675 |
| 676 guest->StopFindingInternal(action); | 676 guest->StopFinding(action); |
| 677 return true; | 677 return true; |
| 678 } | 678 } |
| 679 | 679 |
| 680 WebViewInternalLoadDataWithBaseUrlFunction:: | 680 WebViewInternalLoadDataWithBaseUrlFunction:: |
| 681 WebViewInternalLoadDataWithBaseUrlFunction() { | 681 WebViewInternalLoadDataWithBaseUrlFunction() { |
| 682 } | 682 } |
| 683 | 683 |
| 684 WebViewInternalLoadDataWithBaseUrlFunction:: | 684 WebViewInternalLoadDataWithBaseUrlFunction:: |
| 685 ~WebViewInternalLoadDataWithBaseUrlFunction() { | 685 ~WebViewInternalLoadDataWithBaseUrlFunction() { |
| 686 } | 686 } |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 892 // Will finish asynchronously. | 892 // Will finish asynchronously. |
| 893 return true; | 893 return true; |
| 894 } | 894 } |
| 895 | 895 |
| 896 void WebViewInternalClearDataFunction::ClearDataDone() { | 896 void WebViewInternalClearDataFunction::ClearDataDone() { |
| 897 Release(); // Balanced in RunAsync(). | 897 Release(); // Balanced in RunAsync(). |
| 898 SendResponse(true); | 898 SendResponse(true); |
| 899 } | 899 } |
| 900 | 900 |
| 901 } // namespace extensions | 901 } // namespace extensions |
| OLD | NEW |