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

Unified Diff: ios/chrome/browser/find_in_page/find_in_page_controller.mm

Issue 2724683002: [ios] Moves the Find in Page APIs into FindTabHelper. (Closed)
Patch Set: Review Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/chrome/browser/find_in_page/BUILD.gn ('k') | ios/chrome/browser/find_in_page/find_tab_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/find_in_page/find_in_page_controller.mm
diff --git a/ios/chrome/browser/find_in_page/find_in_page_controller.mm b/ios/chrome/browser/find_in_page/find_in_page_controller.mm
index 692d7f6eb914b86abf8db36f3bdc7df31b3af385..0d799069c3bfa880005e2c5ece1c2341caf0eee6 100644
--- a/ios/chrome/browser/find_in_page/find_in_page_controller.mm
+++ b/ios/chrome/browser/find_in_page/find_in_page_controller.mm
@@ -268,15 +268,17 @@ static NSString* gSearchTerm;
// Remove highlights from the page and disable the model.
- (void)disableFindInPageWithCompletionHandler:
(ProceduralBlock)completionHandler {
- if (![self canFindInPage])
+ if (![self canFindInPage]) {
+ if (completionHandler)
+ completionHandler();
return;
+ }
// Cancel any queued calls to |recurringPumpWithCompletionHandler|.
[NSObject cancelPreviousPerformRequestsWithTarget:self];
__weak FindInPageController* weakSelf = self;
ProceduralBlock handler = ^{
FindInPageController* strongSelf = weakSelf;
if (strongSelf) {
- [strongSelf.findInPageModel setEnabled:NO];
web::WebState* webState = [strongSelf webState];
if (webState)
DOMAlteringLock::FromWebState(webState)->Release(strongSelf);
« no previous file with comments | « ios/chrome/browser/find_in_page/BUILD.gn ('k') | ios/chrome/browser/find_in_page/find_tab_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698