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

Unified Diff: ios/chrome/browser/ui/tools_menu/tools_menu_view_controller.h

Issue 2714813002: [iOS] Add Request Mobile Site cell to tools menu (Closed)
Patch Set: Kurt's comments Created 3 years, 10 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/tools_menu/tools_menu_view_controller.h
diff --git a/ios/chrome/browser/ui/tools_menu/tools_menu_view_controller.h b/ios/chrome/browser/ui/tools_menu/tools_menu_view_controller.h
index 1f7958319fd19e23ec2330f66a33ceb6fc098884..39b0eab5cc4bce56eaa39ed729e0a5910f624c91 100644
--- a/ios/chrome/browser/ui/tools_menu/tools_menu_view_controller.h
+++ b/ios/chrome/browser/ui/tools_menu/tools_menu_view_controller.h
@@ -56,6 +56,11 @@ extern NSString* const kToolsMenuReadingListId;
@property(nonatomic, assign) id<ToolsPopupTableDelegate> delegate;
+// The user agent type used to load the current page, which also decides the
+// visibility and enability of "Request Desktop Site" and "Request Mobile Site"
+// cells in the tools popup menu.
+@property(nonatomic, assign) web::UserAgentType userAgentType;
+
// Initializes the Tools popup menu.
- (void)initializeMenu:(ToolsMenuContext*)context;
@@ -73,6 +78,9 @@ extern NSString* const kToolsMenuReadingListId;
// Called when the current tab loading state changes.
- (void)setIsTabLoading:(BOOL)isTabLoading;
+// Called when the current tab user agent type changes.
+- (void)setUserAgentType:(web::UserAgentType)type;
kkhorimoto 2017/02/27 23:44:24 This isn't necessary since it's automatically crea
liaoyuke 2017/02/28 02:01:00 Done.
+
// TODO(stuartmorgan): Should the set of options that are passed in to the
// constructor just have the ability to specify whether commands should be
// enabled or disabled rather than having these individual setters? crbug/228506
@@ -86,9 +94,6 @@ extern NSString* const kToolsMenuReadingListId;
// Informs tools popup menu whether the switch to reader mode is possible.
- (void)setCanUseReaderMode:(BOOL)enabled;
-// Informs tools popup menu whether "Request Desktop Site" can be enabled.
-- (void)setCanUseDesktopUserAgent:(BOOL)value;
-
- (void)animateContentIn;
- (void)hideContent;

Powered by Google App Engine
This is Rietveld 408576698