OLD | NEW |
---|---|
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 1507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1518 | 1518 |
1519 [self.readerModeController exitReaderMode]; | 1519 [self.readerModeController exitReaderMode]; |
1520 } | 1520 } |
1521 | 1521 |
1522 #pragma mark - | 1522 #pragma mark - |
1523 | 1523 |
1524 - (void)openAppStore:(NSString*)appId { | 1524 - (void)openAppStore:(NSString*)appId { |
1525 [storeKitLauncher_ openAppStore:appId]; | 1525 [storeKitLauncher_ openAppStore:appId]; |
1526 } | 1526 } |
1527 | 1527 |
1528 - (BOOL)useDesktopUserAgent { | 1528 - (BOOL)useDesktopUserAgent { |
kkhorimoto
2017/02/22 01:08:40
The naming of this property is a little confusing,
kkhorimoto
2017/02/22 01:16:32
Oops, made a mistake, the implementation would be:
liaoyuke
2017/02/22 01:37:43
yeah, I also don't like the name of the function,
kkhorimoto
2017/02/22 01:54:33
I think we should go ahead and use isUsingDesktopU
| |
1529 web::NavigationItem* currentItem = self.currentNavigationItem; | 1529 return [self navigationManager]->GetUseDesktopUserAgent(); |
1530 return currentItem && currentItem->IsOverridingUserAgent(); | |
1531 } | 1530 } |
1532 | 1531 |
1533 - (void)enableDesktopUserAgent { | 1532 - (void)enableDesktopUserAgent { |
1534 DCHECK_EQ(self.useDesktopUserAgent, NO); | 1533 DCHECK_EQ(self.useDesktopUserAgent, NO); |
1535 DCHECK([self navigationManager]); | 1534 DCHECK([self navigationManager]); |
1536 [self navigationManager]->OverrideDesktopUserAgentForNextPendingItem(); | 1535 [self navigationManager]->OverrideDesktopUserAgentForNextPendingItem(); |
1537 } | 1536 } |
1538 | 1537 |
1539 - (void)reloadForDesktopUserAgent { | 1538 - (void)reloadForDesktopUserAgent { |
1540 // |loadWithParams| will recreate the removed UIWebView. | 1539 // |loadWithParams| will recreate the removed UIWebView. |
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2210 | 2209 |
2211 - (TabModel*)parentTabModel { | 2210 - (TabModel*)parentTabModel { |
2212 return parentTabModel_; | 2211 return parentTabModel_; |
2213 } | 2212 } |
2214 | 2213 |
2215 - (FormInputAccessoryViewController*)inputAccessoryViewController { | 2214 - (FormInputAccessoryViewController*)inputAccessoryViewController { |
2216 return inputAccessoryViewController_.get(); | 2215 return inputAccessoryViewController_.get(); |
2217 } | 2216 } |
2218 | 2217 |
2219 @end | 2218 @end |
OLD | NEW |