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

Side by Side Diff: ios/chrome/browser/tabs/tab.mm

Issue 2710913006: Removed -[CRWWebDelegate webController:titleDidChange:]. (Closed)
Patch Set: Rebased 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 unified diff | Download patch
« no previous file with comments | « no previous file | ios/chrome/browser/tabs/tab_unittest.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 #import "ios/chrome/browser/tabs/tab.h" 5 #import "ios/chrome/browser/tabs/tab.h"
6 6
7 #import <CoreLocation/CoreLocation.h> 7 #import <CoreLocation/CoreLocation.h>
8 #import <UIKit/UIKit.h> 8 #import <UIKit/UIKit.h>
9 9
10 #include <utility> 10 #include <utility>
(...skipping 1778 matching lines...) Expand 10 before | Expand all | Expand 10 after
1789 } 1789 }
1790 1790
1791 - (void)webState:(web::WebState*)webState 1791 - (void)webState:(web::WebState*)webState
1792 didChangeLoadingProgress:(double)progress { 1792 didChangeLoadingProgress:(double)progress {
1793 // TODO(crbug.com/546406): It is probably possible to do something smarter, 1793 // TODO(crbug.com/546406): It is probably possible to do something smarter,
1794 // but the fact that this is not always sent will have to be taken into 1794 // but the fact that this is not always sent will have to be taken into
1795 // account. 1795 // account.
1796 [parentTabModel_ notifyTabChanged:self]; 1796 [parentTabModel_ notifyTabChanged:self];
1797 } 1797 }
1798 1798
1799 - (void)webStateDidChangeTitle:(web::WebState*)webState {
1800 [self saveTitleToHistoryDB];
1801 [parentTabModel_ notifyTabChanged:self];
1802 }
1803
1799 - (void)webStateDidDismissInterstitial:(web::WebState*)webState { 1804 - (void)webStateDidDismissInterstitial:(web::WebState*)webState {
1800 [parentTabModel_ notifyTabChanged:self]; 1805 [parentTabModel_ notifyTabChanged:self];
1801 } 1806 }
1802 1807
1803 - (void)webLoadCancelled:(const GURL&)url { 1808 - (void)webLoadCancelled:(const GURL&)url {
1804 // When a load is cancelled, this is the maximum that a page will ever load. 1809 // When a load is cancelled, this is the maximum that a page will ever load.
1805 [fullScreenController_ enableFullScreen]; 1810 [fullScreenController_ enableFullScreen];
1806 [parentTabModel_ notifyTabChanged:self]; 1811 [parentTabModel_ notifyTabChanged:self];
1807 } 1812 }
1808 1813
1809 - (BOOL)webController:(CRWWebController*)webController 1814 - (BOOL)webController:(CRWWebController*)webController
1810 shouldOpenExternalURL:(const GURL&)URL { 1815 shouldOpenExternalURL:(const GURL&)URL {
1811 if (isPrerenderTab_ && !isLinkLoadingPrerenderTab_) { 1816 if (isPrerenderTab_ && !isLinkLoadingPrerenderTab_) {
1812 [delegate_ discardPrerender]; 1817 [delegate_ discardPrerender];
1813 return NO; 1818 return NO;
1814 } 1819 }
1815 return YES; 1820 return YES;
1816 } 1821 }
1817 1822
1818 - (void)webController:(CRWWebController*)webController
1819 titleDidChange:(NSString*)title {
1820 [self saveTitleToHistoryDB];
1821 [parentTabModel_ notifyTabChanged:self];
1822 }
1823
1824 - (BOOL)urlTriggersNativeAppLaunch:(const GURL&)url 1823 - (BOOL)urlTriggersNativeAppLaunch:(const GURL&)url
1825 sourceURL:(const GURL&)sourceURL 1824 sourceURL:(const GURL&)sourceURL
1826 linkClicked:(BOOL)linkClicked { 1825 linkClicked:(BOOL)linkClicked {
1827 // Don't open any native app directly when prerendering or from Incognito. 1826 // Don't open any native app directly when prerendering or from Incognito.
1828 if (isPrerenderTab_ || self.browserState->IsOffTheRecord()) 1827 if (isPrerenderTab_ || self.browserState->IsOffTheRecord())
1829 return NO; 1828 return NO;
1830 1829
1831 base::scoped_nsprotocol<id<NativeAppMetadata>> metadata( 1830 base::scoped_nsprotocol<id<NativeAppMetadata>> metadata(
1832 [[ios::GetChromeBrowserProvider()->GetNativeAppWhitelistManager() 1831 [[ios::GetChromeBrowserProvider()->GetNativeAppWhitelistManager()
1833 nativeAppForURL:url] retain]); 1832 nativeAppForURL:url] retain]);
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
2209 2208
2210 - (TabModel*)parentTabModel { 2209 - (TabModel*)parentTabModel {
2211 return parentTabModel_; 2210 return parentTabModel_;
2212 } 2211 }
2213 2212
2214 - (FormInputAccessoryViewController*)inputAccessoryViewController { 2213 - (FormInputAccessoryViewController*)inputAccessoryViewController {
2215 return inputAccessoryViewController_.get(); 2214 return inputAccessoryViewController_.get();
2216 } 2215 }
2217 2216
2218 @end 2217 @end
OLDNEW
« no previous file with comments | « no previous file | ios/chrome/browser/tabs/tab_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698