OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/html_viewer/html_frame.h" | 5 #include "components/html_viewer/html_frame.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <limits> | 9 #include <limits> |
10 #include <utility> | 10 #include <utility> |
(...skipping 914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
925 } | 925 } |
926 | 926 |
927 void HTMLFrame::Find(int32_t request_id, | 927 void HTMLFrame::Find(int32_t request_id, |
928 const mojo::String& search_text, | 928 const mojo::String& search_text, |
929 web_view::mojom::FindOptionsPtr options, | 929 web_view::mojom::FindOptionsPtr options, |
930 bool wrap_within_frame, | 930 bool wrap_within_frame, |
931 const FindCallback& callback) { | 931 const FindCallback& callback) { |
932 blink::WebRect selection_rect; | 932 blink::WebRect selection_rect; |
933 bool result = web_frame_->toWebLocalFrame()->find( | 933 bool result = web_frame_->toWebLocalFrame()->find( |
934 request_id, search_text.To<blink::WebString>(), | 934 request_id, search_text.To<blink::WebString>(), |
935 options.To<blink::WebFindOptions>(), wrap_within_frame, &selection_rect); | 935 options.To<blink::WebFindOptions>(), wrap_within_frame, &selection_rect, |
| 936 nullptr); |
936 | 937 |
937 if (!result) { | 938 if (!result) { |
938 // don't leave text selected as you move to the next frame. | 939 // don't leave text selected as you move to the next frame. |
939 web_frame_->executeCommand(blink::WebString::fromUTF8("Unselect"), | 940 web_frame_->executeCommand(blink::WebString::fromUTF8("Unselect"), |
940 GetFocusedElement()); | 941 GetFocusedElement()); |
941 } | 942 } |
942 | 943 |
943 callback.Run(result); | 944 callback.Run(result); |
944 } | 945 } |
945 | 946 |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1041 | 1042 |
1042 if (!surface_layer_) | 1043 if (!surface_layer_) |
1043 return; | 1044 return; |
1044 | 1045 |
1045 surface_layer_->SetSurfaceId(cc::SurfaceId(owned_window_->window()->id()), | 1046 surface_layer_->SetSurfaceId(cc::SurfaceId(owned_window_->window()->id()), |
1046 global_state()->device_pixel_ratio(), | 1047 global_state()->device_pixel_ratio(), |
1047 owned_window_->window()->bounds().size()); | 1048 owned_window_->window()->bounds().size()); |
1048 } | 1049 } |
1049 | 1050 |
1050 } // namespace mojo | 1051 } // namespace mojo |
OLD | NEW |