Chromium Code Reviews| 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 ToolsMenuConfiguration; | 10 @class ToolsMenuConfiguration; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 46 | 46 |
| 47 // A table view with two icons in the first row and regular text cells in | 47 // A table view with two icons in the first row and regular text cells in |
| 48 // subsequent rows. | 48 // subsequent rows. |
| 49 // For each icon and item in the menu there is a corresponding delegate method. | 49 // For each icon and item in the menu there is a corresponding delegate method. |
| 50 @interface ToolsMenuViewController : UIViewController | 50 @interface ToolsMenuViewController : UIViewController |
| 51 // Keeps track of the state (Bookmarked or not) of the current visible page. | 51 // Keeps track of the state (Bookmarked or not) of the current visible page. |
| 52 // This is used to alter the state of the popup menu (i.e. Add/Edit bookmark). | 52 // This is used to alter the state of the popup menu (i.e. Add/Edit bookmark). |
| 53 @property(nonatomic, assign) BOOL isCurrentPageBookmarked; | 53 @property(nonatomic, assign) BOOL isCurrentPageBookmarked; |
| 54 @property(nonatomic, assign) BOOL isTabLoading; | 54 @property(nonatomic, assign) BOOL isTabLoading; |
| 55 // The tool button to be shown hovering above the popup. | 55 // The tool button to be shown hovering above the popup. |
| 56 @property(nonatomic, readonly) UIButton* toolsButton; | 56 @property(nonatomic, readonly, weak) UIButton* toolsButton; |
|
stkhapugin
2017/06/15 15:43:55
nit: this probably is strong
marq (ping after 24h)
2017/06/16 12:11:14
No, it's a property that exposes (and mutates as a
| |
| 57 | 57 |
| 58 // Keeps track of the items in tools menu. | 58 // Keeps track of the items in tools menu. |
| 59 @property(nonatomic, copy) NSArray* menuItems; | 59 @property(nonatomic, copy) NSArray* menuItems; |
| 60 | 60 |
| 61 @property(nonatomic, assign) id<ToolsPopupTableDelegate> delegate; | 61 @property(nonatomic, weak) id<ToolsPopupTableDelegate> delegate; |
| 62 | 62 |
| 63 // Initializes the Tools popup menu. | 63 // Initializes the Tools popup menu. |
| 64 - (void)initializeMenuWithConfiguration:(ToolsMenuConfiguration*)configuration; | 64 - (void)initializeMenuWithConfiguration:(ToolsMenuConfiguration*)configuration; |
| 65 | 65 |
| 66 // Returns the optimal height needed to display the menu items. | 66 // Returns the optimal height needed to display the menu items. |
| 67 // The height returned is usually less than the |suggestedHeight| unless | 67 // The height returned is usually less than the |suggestedHeight| unless |
| 68 // the last row of the menu puts the height just over the |suggestedHeight|. | 68 // the last row of the menu puts the height just over the |suggestedHeight|. |
| 69 // If the Tools menu items is taller than the |suggestedHeight| by at least | 69 // If the Tools menu items is taller than the |suggestedHeight| by at least |
| 70 // one menu item, the last visible menu item will be shown partially so user | 70 // one menu item, the last visible menu item will be shown partially so user |
| 71 // can tell that the Tools menu is scrollable. | 71 // can tell that the Tools menu is scrollable. |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 90 // Informs tools popup menu whether the switch to reader mode is possible. | 90 // Informs tools popup menu whether the switch to reader mode is possible. |
| 91 - (void)setCanUseReaderMode:(BOOL)enabled; | 91 - (void)setCanUseReaderMode:(BOOL)enabled; |
| 92 | 92 |
| 93 - (void)animateContentIn; | 93 - (void)animateContentIn; |
| 94 | 94 |
| 95 - (void)hideContent; | 95 - (void)hideContent; |
| 96 | 96 |
| 97 @end | 97 @end |
| 98 | 98 |
| 99 #endif // IOS_CHROME_BROWSER_UI_TOOLS_MENU_TOOLS_MENU_VIEW_CONTROLLER_H_ | 99 #endif // IOS_CHROME_BROWSER_UI_TOOLS_MENU_TOOLS_MENU_VIEW_CONTROLLER_H_ |
| OLD | NEW |