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

Unified Diff: ios/chrome/browser/ui/browser_view_controller.mm

Issue 2789433006: Implement request mobile site. (Closed)
Patch Set: Fix failing eg tests on iPad. Created 3 years, 8 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.mm ('k') | ios/chrome/browser/ui/tools_menu/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/browser_view_controller.mm
diff --git a/ios/chrome/browser/ui/browser_view_controller.mm b/ios/chrome/browser/ui/browser_view_controller.mm
index a3edd8a9d8cf2359c4ba254ec3b06f54a85849cc..5d14922b5291714df6fe7fb04f4f2c770885b868 100644
--- a/ios/chrome/browser/ui/browser_view_controller.mm
+++ b/ios/chrome/browser/ui/browser_view_controller.mm
@@ -724,13 +724,6 @@ - (CardView*)addCardViewInFullscreen:(BOOL)fullScreen;
- (void)tabLoadComplete:(Tab*)tab withSuccess:(BOOL)success;
// Evaluates Javascript asynchronously using the current page context.
- (void)openJavascript:(NSString*)javascript;
-
-// Sets the desktop user agent flag and reloads the current page.
-- (void)enableDesktopUserAgent;
-
-// Sets the desktop user agent flag and reloads the current page.
-- (void)enableMobileUserAgent;
-
// Helper methods used by ShareToDelegate methods.
// Shows an alert with the given title and message id.
- (void)showErrorAlert:(int)titleMessageId message:(int)messageId;
@@ -4057,10 +4050,10 @@ - (IBAction)chromeExecuteCommand:(id)sender {
[[_model currentTab] switchToReaderMode];
break;
case IDC_REQUEST_DESKTOP_SITE:
- [self enableDesktopUserAgent];
+ [[_model currentTab] reloadWithUserAgentType:web::UserAgentType::DESKTOP];
break;
case IDC_REQUEST_MOBILE_SITE:
- [self enableMobileUserAgent];
+ [[_model currentTab] reloadWithUserAgentType:web::UserAgentType::MOBILE];
break;
case IDC_SHOW_TOOLS_MENU: {
[self showToolsMenuPopup];
@@ -4269,16 +4262,6 @@ - (void)showHelpPage {
appendTo:kCurrentTab];
}
-- (void)enableDesktopUserAgent {
- [[_model currentTab] reloadForDesktopUserAgent];
-}
-
-// TODO(crbug.com/692303): Implement the actual functionality of
-// "Request Mobile Site", and also refactoring the user agent related function
-// names to improve readability.
-- (void)enableMobileUserAgent {
-}
-
- (void)resetAllWebViews {
[_dialogPresenter cancelAllDialogs];
[_model resetAllWebViews];
« no previous file with comments | « ios/chrome/browser/tabs/tab.mm ('k') | ios/chrome/browser/ui/tools_menu/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698