| OLD | NEW |
| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 - (void)initializeMenu:(ToolsMenuContext*)context; | 59 - (void)initializeMenu:(ToolsMenuContext*)context; |
| 60 | 60 |
| 61 // Returns the optimal height needed to display the menu items. | 61 // Returns the optimal height needed to display the menu items. |
| 62 // The height returned is usually less than the |suggestedHeight| unless | 62 // The height returned is usually less than the |suggestedHeight| unless |
| 63 // the last row of the menu puts the height just over the |suggestedHeight|. | 63 // the last row of the menu puts the height just over the |suggestedHeight|. |
| 64 // If the Tools menu items is taller than the |suggestedHeight| by at least | 64 // If the Tools menu items is taller than the |suggestedHeight| by at least |
| 65 // one menu item, the last visible menu item will be shown partially so user | 65 // one menu item, the last visible menu item will be shown partially so user |
| 66 // can tell that the Tools menu is scrollable. | 66 // can tell that the Tools menu is scrollable. |
| 67 - (CGFloat)optimalHeight:(CGFloat)suggestedHeight; | 67 - (CGFloat)optimalHeight:(CGFloat)suggestedHeight; |
| 68 | 68 |
| 69 // Hide a menu item by IDC value. |
| 70 - (void)hideItemWithTag:(NSInteger)tag; |
| 71 |
| 69 // Enable or disable menu item by IDC value. | 72 // Enable or disable menu item by IDC value. |
| 70 - (void)setItemEnabled:(BOOL)enabled withTag:(NSInteger)tag; | 73 - (void)setItemEnabled:(BOOL)enabled withTag:(NSInteger)tag; |
| 71 | 74 |
| 72 // Called when the current tab loading state changes. | 75 // Called when the current tab loading state changes. |
| 73 - (void)setIsTabLoading:(BOOL)isTabLoading; | 76 - (void)setIsTabLoading:(BOOL)isTabLoading; |
| 74 | 77 |
| 78 // Informs tools popup menu to hide "Request Desktop Site" or |
| 79 // "Request Mobile Site", note that only one of them is expected to be called |
| 80 // at any time. |
| 81 - (void)hideRequestDesktopSite; |
| 82 - (void)hideRequestMobileSite; |
| 83 |
| 75 // TODO(stuartmorgan): Should the set of options that are passed in to the | 84 // TODO(stuartmorgan): Should the set of options that are passed in to the |
| 76 // constructor just have the ability to specify whether commands should be | 85 // constructor just have the ability to specify whether commands should be |
| 77 // enabled or disabled rather than having these individual setters? crbug/228506 | 86 // enabled or disabled rather than having these individual setters? crbug/228506 |
| 78 // Informs tools popup menu whether "Find In Page..." command should be | 87 // Informs tools popup menu whether "Find In Page..." command should be |
| 79 // enabled. | 88 // enabled. |
| 80 - (void)setCanShowFindBar:(BOOL)enabled; | 89 - (void)setCanShowFindBar:(BOOL)enabled; |
| 81 | 90 |
| 82 // Informs tools popup menu whether "Share..." command should be enabled. | 91 // Informs tools popup menu whether "Share..." command should be enabled. |
| 83 - (void)setCanShowShareMenu:(BOOL)enabled; | 92 - (void)setCanShowShareMenu:(BOOL)enabled; |
| 84 | 93 |
| 85 // Informs tools popup menu whether the switch to reader mode is possible. | 94 // Informs tools popup menu whether the switch to reader mode is possible. |
| 86 - (void)setCanUseReaderMode:(BOOL)enabled; | 95 - (void)setCanUseReaderMode:(BOOL)enabled; |
| 87 | 96 |
| 88 // Informs tools popup menu whether "Request Desktop Site" can be enabled. | 97 // Informs tools popup menu whether "Request Desktop Site" can be enabled. |
| 89 - (void)setCanUseDesktopUserAgent:(BOOL)value; | 98 - (void)setCanUseDesktopUserAgent:(BOOL)value; |
| 90 | 99 |
| 100 // Informs tools popup menu whether "Request Mobile Site" can be enabled. |
| 101 - (void)setCanUseMobileUserAgent:(BOOL)value; |
| 102 |
| 91 - (void)animateContentIn; | 103 - (void)animateContentIn; |
| 92 | 104 |
| 93 - (void)hideContent; | 105 - (void)hideContent; |
| 94 | 106 |
| 95 @end | 107 @end |
| 96 | 108 |
| 97 #endif // IOS_CHROME_BROWSER_UI_TOOLS_MENU_TOOLS_MENU_VIEW_CONTROLLER_H_ | 109 #endif // IOS_CHROME_BROWSER_UI_TOOLS_MENU_TOOLS_MENU_VIEW_CONTROLLER_H_ |
| OLD | NEW |