OLD | NEW |
(Empty) | |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef IOS_CHROME_BROWSER_UI_TOOLS_MENU_TOOLS_POPUP_CONTROLLER_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_TOOLS_MENU_TOOLS_POPUP_CONTROLLER_H_ |
| 7 |
| 8 #import <UIKit/UIKit.h> |
| 9 |
| 10 #import "ios/chrome/browser/ui/popup_menu/popup_menu_controller.h" |
| 11 |
| 12 // The a11y ID of the tools menu table view (used by integration tests). |
| 13 extern NSString* const kToolsMenuTableViewId; |
| 14 |
| 15 @class ToolsMenuContext; |
| 16 |
| 17 // The view controller for the tools menu within the top toolbar. |
| 18 // The menu is composed of two main view: a top view with icons and a bottom |
| 19 // view with a table view of menu items. |
| 20 @interface ToolsPopupController : PopupMenuController |
| 21 |
| 22 @property(nonatomic, assign) BOOL isCurrentPageBookmarked; |
| 23 |
| 24 // Initializes the popup with the given |context|, a set of information used to |
| 25 // determine the appearance of the menu and the entries displayed. |
| 26 - (instancetype)initWithContext:(ToolsMenuContext*)context; |
| 27 |
| 28 // Called when the current tab loading state changes. |
| 29 - (void)setIsTabLoading:(BOOL)isTabLoading; |
| 30 |
| 31 // TODO(stuartmorgan): Should the set of options that are passed in to the |
| 32 // constructor just have the ability to specify whether commands should be |
| 33 // enabled or disabled rather than having these individual setters? b/6048639 |
| 34 // Informs tools popup menu whether "Find In Page..." command should be |
| 35 // enabled. |
| 36 - (void)setCanShowFindBar:(BOOL)enabled; |
| 37 |
| 38 // Informs tools popup menu whether "Share..." command should be enabled. |
| 39 - (void)setCanShowShareMenu:(BOOL)enabled; |
| 40 |
| 41 // Informs tools popup menu whether the switch to reader mode is possible. |
| 42 - (void)setCanUseReaderMode:(BOOL)enabled; |
| 43 |
| 44 // Informs tools popup menu whether "Request Desktop Site" can be enabled. |
| 45 - (void)setCanUseDesktopUserAgent:(BOOL)value; |
| 46 |
| 47 @end |
| 48 |
| 49 #endif // IOS_CHROME_BROWSER_UI_TOOLS_MENU_TOOLS_POPUP_CONTROLLER_H_ |
OLD | NEW |