Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Side by Side Diff: chrome/browser/ui/find_bar/find_tab_helper.cc

Issue 1600953003: Move find-in-page code from RenderView to RenderFrame. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "chrome/browser/ui/find_bar/find_tab_helper.h" 5 #include "chrome/browser/ui/find_bar/find_tab_helper.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 } 134 }
135 135
136 void FindTabHelper::ActivateFindInPageResultForAccessibility() { 136 void FindTabHelper::ActivateFindInPageResultForAccessibility() {
137 web_contents()->GetMainFrame()->ActivateFindInPageResultForAccessibility( 137 web_contents()->GetMainFrame()->ActivateFindInPageResultForAccessibility(
138 current_find_request_id_); 138 current_find_request_id_);
139 } 139 }
140 140
141 #if defined(OS_ANDROID) 141 #if defined(OS_ANDROID)
142 void FindTabHelper::ActivateNearestFindResult(float x, float y) { 142 void FindTabHelper::ActivateNearestFindResult(float x, float y) {
143 if (!find_op_aborted_ && !find_text_.empty()) { 143 if (!find_op_aborted_ && !find_text_.empty()) {
144 web_contents()->GetRenderViewHost()->ActivateNearestFindResult( 144 web_contents()->GetMainFrame()->ActivateNearestFindResult(
145 current_find_request_id_, x, y); 145 current_find_request_id_, x, y);
146 } 146 }
147 } 147 }
148 148
149 void FindTabHelper::RequestFindMatchRects(int current_version) { 149 void FindTabHelper::RequestFindMatchRects(int current_version) {
150 if (!find_op_aborted_ && !find_text_.empty()) 150 if (!find_op_aborted_ && !find_text_.empty())
151 web_contents()->GetRenderViewHost()->RequestFindMatchRects(current_version); 151 web_contents()->GetMainFrame()->RequestFindMatchRects(current_version);
152 } 152 }
153 #endif 153 #endif
154 154
155 void FindTabHelper::HandleFindReply(int request_id, 155 void FindTabHelper::HandleFindReply(int request_id,
156 int number_of_matches, 156 int number_of_matches,
157 const gfx::Rect& selection_rect, 157 const gfx::Rect& selection_rect,
158 int active_match_ordinal, 158 int active_match_ordinal,
159 bool final_update) { 159 bool final_update) {
160 // Ignore responses for requests that have been aborted. 160 // Ignore responses for requests that have been aborted.
161 // Ignore responses for requests other than the one we have most recently 161 // Ignore responses for requests other than the one we have most recently
(...skipping 15 matching lines...) Expand all
177 // found. 177 // found.
178 last_search_result_ = FindNotificationDetails( 178 last_search_result_ = FindNotificationDetails(
179 request_id, number_of_matches, selection, active_match_ordinal, 179 request_id, number_of_matches, selection, active_match_ordinal,
180 final_update); 180 final_update);
181 content::NotificationService::current()->Notify( 181 content::NotificationService::current()->Notify(
182 chrome::NOTIFICATION_FIND_RESULT_AVAILABLE, 182 chrome::NOTIFICATION_FIND_RESULT_AVAILABLE,
183 content::Source<WebContents>(web_contents()), 183 content::Source<WebContents>(web_contents()),
184 content::Details<FindNotificationDetails>(&last_search_result_)); 184 content::Details<FindNotificationDetails>(&last_search_result_));
185 } 185 }
186 } 186 }
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/render_frame_host_impl.h » ('j') | content/common/frame_messages.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698