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

Side by Side 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: Update setUserAgentType implementation and Add TODO 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef IOS_CHROME_BROWSER_UI_TOOLS_MENU_TOOLS_MENU_VIEW_CONTROLLER_H_ 5 #ifndef IOS_CHROME_BROWSER_UI_TOOLS_MENU_TOOLS_MENU_VIEW_CONTROLLER_H_
6 #define IOS_CHROME_BROWSER_UI_TOOLS_MENU_TOOLS_MENU_VIEW_CONTROLLER_H_ 6 #define IOS_CHROME_BROWSER_UI_TOOLS_MENU_TOOLS_MENU_VIEW_CONTROLLER_H_
7 7
8 #import <UIKit/UIKit.h> 8 #import <UIKit/UIKit.h>
9 9
10 @class ToolsMenuContext; 10 @class ToolsMenuContext;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 @interface ToolsMenuViewController : UIViewController 49 @interface ToolsMenuViewController : UIViewController
50 // Keeps track of the state (Bookmarked or not) of the current visible page. 50 // Keeps track of the state (Bookmarked or not) of the current visible page.
51 // This is used to alter the state of the popup menu (i.e. Add/Edit bookmark). 51 // This is used to alter the state of the popup menu (i.e. Add/Edit bookmark).
52 @property(nonatomic, assign) BOOL isCurrentPageBookmarked; 52 @property(nonatomic, assign) BOOL isCurrentPageBookmarked;
53 @property(nonatomic, assign) BOOL isTabLoading; 53 @property(nonatomic, assign) BOOL isTabLoading;
54 // The tool button to be shown hovering above the popup. 54 // The tool button to be shown hovering above the popup.
55 @property(nonatomic, readonly) UIButton* toolsButton; 55 @property(nonatomic, readonly) UIButton* toolsButton;
56 56
57 @property(nonatomic, assign) id<ToolsPopupTableDelegate> delegate; 57 @property(nonatomic, assign) id<ToolsPopupTableDelegate> delegate;
58 58
59 // The user agent type used to load the current page, which also decides the
60 // visibility and enability of "Request Desktop Site" and "Request Mobile Site"
Eugene But (OOO till 7-30) 2017/03/01 19:12:55 "which also decides the visibility and enability "
liaoyuke 2017/03/03 01:04:06 Acknowledged.
61 // cells in the tools popup menu.
62 @property(nonatomic, assign) web::UserAgentType userAgentType;
63
59 // Initializes the Tools popup menu. 64 // Initializes the Tools popup menu.
60 - (void)initializeMenu:(ToolsMenuContext*)context; 65 - (void)initializeMenu:(ToolsMenuContext*)context;
61 66
62 // Returns the optimal height needed to display the menu items. 67 // Returns the optimal height needed to display the menu items.
63 // The height returned is usually less than the |suggestedHeight| unless 68 // The height returned is usually less than the |suggestedHeight| unless
64 // the last row of the menu puts the height just over the |suggestedHeight|. 69 // the last row of the menu puts the height just over the |suggestedHeight|.
65 // If the Tools menu items is taller than the |suggestedHeight| by at least 70 // If the Tools menu items is taller than the |suggestedHeight| by at least
66 // one menu item, the last visible menu item will be shown partially so user 71 // one menu item, the last visible menu item will be shown partially so user
67 // can tell that the Tools menu is scrollable. 72 // can tell that the Tools menu is scrollable.
68 - (CGFloat)optimalHeight:(CGFloat)suggestedHeight; 73 - (CGFloat)optimalHeight:(CGFloat)suggestedHeight;
(...skipping 10 matching lines...) Expand all
79 // Informs tools popup menu whether "Find In Page..." command should be 84 // Informs tools popup menu whether "Find In Page..." command should be
80 // enabled. 85 // enabled.
81 - (void)setCanShowFindBar:(BOOL)enabled; 86 - (void)setCanShowFindBar:(BOOL)enabled;
82 87
83 // Informs tools popup menu whether "Share..." command should be enabled. 88 // Informs tools popup menu whether "Share..." command should be enabled.
84 - (void)setCanShowShareMenu:(BOOL)enabled; 89 - (void)setCanShowShareMenu:(BOOL)enabled;
85 90
86 // Informs tools popup menu whether the switch to reader mode is possible. 91 // Informs tools popup menu whether the switch to reader mode is possible.
87 - (void)setCanUseReaderMode:(BOOL)enabled; 92 - (void)setCanUseReaderMode:(BOOL)enabled;
88 93
89 // Informs tools popup menu whether "Request Desktop Site" can be enabled.
90 - (void)setCanUseDesktopUserAgent:(BOOL)value;
91
92 - (void)animateContentIn; 94 - (void)animateContentIn;
93 95
94 - (void)hideContent; 96 - (void)hideContent;
95 97
96 @end 98 @end
97 99
98 #endif // IOS_CHROME_BROWSER_UI_TOOLS_MENU_TOOLS_MENU_VIEW_CONTROLLER_H_ 100 #endif // IOS_CHROME_BROWSER_UI_TOOLS_MENU_TOOLS_MENU_VIEW_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698