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

Unified Diff: ios/chrome/browser/tabs/tab.mm

Issue 2654433007: [ios] Moves find-in-page code out of Tab and into FindTabHelper. (Closed)
Patch Set: Review. Created 3 years, 10 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/tabs/tab.h ('k') | ios/chrome/browser/ui/browser_view_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/tabs/tab.mm
diff --git a/ios/chrome/browser/tabs/tab.mm b/ios/chrome/browser/tabs/tab.mm
index 18cfa16a2d057a84c6c9a5573fadf0d94c1fe6d1..9c5817c93f2cc87c952e47199a85086a156df635 100644
--- a/ios/chrome/browser/tabs/tab.mm
+++ b/ios/chrome/browser/tabs/tab.mm
@@ -63,6 +63,7 @@
#include "ios/chrome/browser/experimental_flags.h"
#include "ios/chrome/browser/favicon/favicon_service_factory.h"
#import "ios/chrome/browser/find_in_page/find_in_page_controller.h"
+#import "ios/chrome/browser/find_in_page/find_tab_helper.h"
#import "ios/chrome/browser/geolocation/omnibox_geolocation_controller.h"
#include "ios/chrome/browser/history/history_service_factory.h"
#include "ios/chrome/browser/history/top_sites_factory.h"
@@ -274,9 +275,6 @@ enum class RendererTerminationTabState {
// Handles autofill.
base::scoped_nsobject<AutofillController> autofillController_;
- // Handles find on page.
- base::scoped_nsobject<FindInPageController> findInPageController_;
-
// Handles GAL infobar on web pages.
base::scoped_nsobject<NativeAppNavigationController>
nativeAppNavigationController_;
@@ -550,10 +548,6 @@ void TabInfoBarObserver::OnInfoBarReplaced(infobars::InfoBar* old_infobar,
initWithSnapshotManager:snapshotManager_
tab:self]);
- findInPageController_.reset([[FindInPageController alloc]
- initWithWebState:self.webState
- delegate:self]);
-
[self initNativeAppNavigationController];
if (attachTabHelpers) {
@@ -568,6 +562,7 @@ void TabInfoBarObserver::OnInfoBarReplaced(infobars::InfoBar* old_infobar,
IOSSecurityStateTabHelper::CreateForWebState(self.webState);
RepostFormTabHelper::CreateForWebState(self.webState);
BlockedPopupTabHelper::CreateForWebState(self.webState);
+ FindTabHelper::CreateForWebState(self.webState, self);
if (reading_list::switches::IsReadingListEnabled()) {
ReadingListModel* model =
@@ -1199,9 +1194,6 @@ void TabInfoBarObserver::OnInfoBarReplaced(infobars::InfoBar* old_infobar,
[[NSNotificationCenter defaultCenter] removeObserver:self];
- [findInPageController_ detachFromWebState];
- findInPageController_.reset();
-
[passwordController_ detach];
passwordController_.reset();
tabInfoBarObserver_.reset();
@@ -1705,7 +1697,6 @@ void TabInfoBarObserver::OnInfoBarReplaced(infobars::InfoBar* old_infobar,
// TODO(crbug.com/381201): Move this call there once that bug is fixed so that
// |disableFullScreen| is called only from one place.
[fullScreenController_ disableFullScreen];
- [findInPageController_ disableFindInPageWithCompletionHandler:nil];
GURL lastCommittedURL = webState->GetLastCommittedURL();
[autoReloadBridge_ loadStartedForURL:lastCommittedURL];
@@ -2182,10 +2173,6 @@ void TabInfoBarObserver::OnInfoBarReplaced(infobars::InfoBar* old_infobar,
}
}
-- (FindInPageController*)findInPageController {
- return findInPageController_;
-}
-
- (NativeAppNavigationController*)nativeAppNavigationController {
return nativeAppNavigationController_;
}
« no previous file with comments | « ios/chrome/browser/tabs/tab.h ('k') | ios/chrome/browser/ui/browser_view_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698