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

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

Issue 2737353006: Replaced webPageOrderedClose with WebStateDelegate API. (Closed)
Patch Set: Addressed review comments 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 | « no previous file | ios/chrome/browser/tabs/tab_private.h » ('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 4776d011bc36afa194be41925a1e4a3074f4951f..b76b4266a6ee25239572d265dcf4b1f9b50a4875 100644
--- a/ios/chrome/browser/tabs/tab.mm
+++ b/ios/chrome/browser/tabs/tab.mm
@@ -353,9 +353,6 @@ enum class RendererTerminationTabState {
// Returns the OpenInController for this tab.
- (OpenInController*)openInController;
-// Calls the model and ask to close this tab.
-- (void)closeThisTab;
-
// Initialize the Native App Launcher controller.
- (void)initNativeAppNavigationController;
@@ -1429,15 +1426,6 @@ void TabInfoBarObserver::OnInfoBarReplaced(infobars::InfoBar* old_infobar,
return openInController_.get();
}
-- (void)closeThisTab {
- if (!parentTabModel_)
- return;
-
- NSUInteger index = [parentTabModel_ indexOfTab:self];
- if (index != NSNotFound)
- [parentTabModel_ closeTabAtIndex:index];
-}
-
- (id<CRWNativeContent>)controllerForUnhandledContentAtURL:(const GURL&)url {
// Shows download manager UI for unhandled content.
DownloadManagerController* downloadController =
@@ -1606,15 +1594,6 @@ void TabInfoBarObserver::OnInfoBarReplaced(infobars::InfoBar* old_infobar,
#pragma mark - CRWWebDelegate and CRWWebStateObserver protocol methods.
-// The web page wants to close its own window.
-- (void)webPageOrderedClose {
- // Only allow a web page to close itself if it was opened by DOM, or if there
- // are no navigation items.
- DCHECK([[self navigationManagerImpl]->GetSessionController() isOpenedByDOM] ||
- ![self navigationManager]->GetItemCount());
- [self closeThisTab];
-}
-
// This method is invoked whenever the system believes the URL is about to
// change, or immediately after any unexpected change of the URL. The apparent
// destination URL is included in the |url| parameter.
« no previous file with comments | « no previous file | ios/chrome/browser/tabs/tab_private.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698