| 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 #import "ios/chrome/browser/ui/contextual_search/contextual_search_controller.h" | 5 #import "ios/chrome/browser/ui/contextual_search/contextual_search_controller.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/ios/ios_util.h" | 10 #include "base/ios/ios_util.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 #import "ios/chrome/browser/ui/show_privacy_settings_util.h" | 43 #import "ios/chrome/browser/ui/show_privacy_settings_util.h" |
| 44 #include "ios/chrome/browser/ui/ui_util.h" | 44 #include "ios/chrome/browser/ui/ui_util.h" |
| 45 #import "ios/chrome/browser/ui/uikit_ui_util.h" | 45 #import "ios/chrome/browser/ui/uikit_ui_util.h" |
| 46 #import "ios/chrome/browser/web/dom_altering_lock.h" | 46 #import "ios/chrome/browser/web/dom_altering_lock.h" |
| 47 #include "ios/chrome/common/string_util.h" | 47 #include "ios/chrome/common/string_util.h" |
| 48 #include "ios/chrome/grit/ios_strings.h" | 48 #include "ios/chrome/grit/ios_strings.h" |
| 49 #import "ios/third_party/material_components_ios/src/components/Snackbar/src/Mat
erialSnackbar.h" | 49 #import "ios/third_party/material_components_ios/src/components/Snackbar/src/Mat
erialSnackbar.h" |
| 50 #include "ios/web/public/browser_state.h" | 50 #include "ios/web/public/browser_state.h" |
| 51 #include "ios/web/public/load_committed_details.h" | 51 #include "ios/web/public/load_committed_details.h" |
| 52 #include "ios/web/public/referrer.h" | 52 #include "ios/web/public/referrer.h" |
| 53 #import "ios/web/public/web_state/crw_web_view_proxy.h" | |
| 54 #import "ios/web/public/web_state/crw_web_view_scroll_view_proxy.h" | |
| 55 #import "ios/web/public/web_state/js/crw_js_injection_receiver.h" | 53 #import "ios/web/public/web_state/js/crw_js_injection_receiver.h" |
| 54 #import "ios/web/public/web_state/ui/crw_web_view_proxy.h" |
| 55 #import "ios/web/public/web_state/ui/crw_web_view_scroll_view_proxy.h" |
| 56 #include "ios/web/public/web_state/web_state.h" | 56 #include "ios/web/public/web_state/web_state.h" |
| 57 #include "ios/web/public/web_state/web_state_observer.h" | 57 #include "ios/web/public/web_state/web_state_observer.h" |
| 58 #include "ui/base/l10n/l10n_util.h" | 58 #include "ui/base/l10n/l10n_util.h" |
| 59 #include "ui/base/l10n/l10n_util_mac.h" | 59 #include "ui/base/l10n/l10n_util_mac.h" |
| 60 | 60 |
| 61 // Returns |value| clamped so that min <= value <= max | 61 // Returns |value| clamped so that min <= value <= max |
| 62 #define CLAMP(min, value, max) MAX(min, MIN(value, max)) | 62 #define CLAMP(min, value, max) MAX(min, MIN(value, max)) |
| 63 | 63 |
| 64 namespace { | 64 namespace { |
| 65 // command prefix for injected JavaScript. | 65 // command prefix for injected JavaScript. |
| (...skipping 1558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1624 | 1624 |
| 1625 - (void)updateHighlight { | 1625 - (void)updateHighlight { |
| 1626 base::WeakNSObject<ContextualSearchController> weakSelf(self); | 1626 base::WeakNSObject<ContextualSearchController> weakSelf(self); |
| 1627 [_contextualSearchJsManager | 1627 [_contextualSearchJsManager |
| 1628 highlightRectsWithCompletionHandler:^void(id result, NSError* error) { | 1628 highlightRectsWithCompletionHandler:^void(id result, NSError* error) { |
| 1629 [weakSelf handleHighlightJSResult:result withError:error]; | 1629 [weakSelf handleHighlightJSResult:result withError:error]; |
| 1630 }]; | 1630 }]; |
| 1631 } | 1631 } |
| 1632 | 1632 |
| 1633 @end | 1633 @end |
| OLD | NEW |