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

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

Issue 2789433006: Implement request mobile site. (Closed)
Patch Set: Address comments 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
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 4e535e1707b9fc7381d539b27c44681518c355af..a397d3b4ff4765b2fc832c4c76eabfc1b48609c8 100644
--- a/ios/chrome/browser/ui/browser_view_controller.mm
+++ b/ios/chrome/browser/ui/browser_view_controller.mm
@@ -678,13 +678,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;
@@ -4024,10 +4017,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];
@@ -4236,16 +4229,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];

Powered by Google App Engine
This is Rietveld 408576698