Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 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 | 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_POPUP_CONTROLLER_H_ | 5 #ifndef IOS_CHROME_BROWSER_UI_TOOLS_MENU_TOOLS_POPUP_CONTROLLER_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_TOOLS_MENU_TOOLS_POPUP_CONTROLLER_H_ | 6 #define IOS_CHROME_BROWSER_UI_TOOLS_MENU_TOOLS_POPUP_CONTROLLER_H_ |
| 7 | 7 |
| 8 #import <UIKit/UIKit.h> | 8 #import <UIKit/UIKit.h> |
| 9 | 9 |
| 10 #import "ios/chrome/browser/ui/popup_menu/popup_menu_controller.h" | 10 #import "ios/chrome/browser/ui/popup_menu/popup_menu_controller.h" |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 21 | 21 |
| 22 @property(nonatomic, assign) BOOL isCurrentPageBookmarked; | 22 @property(nonatomic, assign) BOOL isCurrentPageBookmarked; |
| 23 | 23 |
| 24 // Initializes the popup with the given |context|, a set of information used to | 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. | 25 // determine the appearance of the menu and the entries displayed. |
| 26 - (instancetype)initWithContext:(ToolsMenuContext*)context; | 26 - (instancetype)initWithContext:(ToolsMenuContext*)context; |
| 27 | 27 |
| 28 // Called when the current tab loading state changes. | 28 // Called when the current tab loading state changes. |
| 29 - (void)setIsTabLoading:(BOOL)isTabLoading; | 29 - (void)setIsTabLoading:(BOOL)isTabLoading; |
| 30 | 30 |
| 31 // Informs tools popup menu to hide "Request Desktop Site" or | |
| 32 // "Request Mobile Site", note that only one of them is expected to be called | |
| 33 // at any time. | |
| 34 - (void)hideRequestDesktopSite; | |
| 35 - (void)hideRequestMobileSite; | |
| 36 | |
| 31 // TODO(stuartmorgan): Should the set of options that are passed in to the | 37 // 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 | 38 // constructor just have the ability to specify whether commands should be |
| 33 // enabled or disabled rather than having these individual setters? b/6048639 | 39 // enabled or disabled rather than having these individual setters? b/6048639 |
| 34 // Informs tools popup menu whether "Find In Page..." command should be | 40 // Informs tools popup menu whether "Find In Page..." command should be |
| 35 // enabled. | 41 // enabled. |
| 36 - (void)setCanShowFindBar:(BOOL)enabled; | 42 - (void)setCanShowFindBar:(BOOL)enabled; |
| 37 | 43 |
| 38 // Informs tools popup menu whether "Share..." command should be enabled. | 44 // Informs tools popup menu whether "Share..." command should be enabled. |
| 39 - (void)setCanShowShareMenu:(BOOL)enabled; | 45 - (void)setCanShowShareMenu:(BOOL)enabled; |
| 40 | 46 |
| 41 // Informs tools popup menu whether the switch to reader mode is possible. | 47 // Informs tools popup menu whether the switch to reader mode is possible. |
| 42 - (void)setCanUseReaderMode:(BOOL)enabled; | 48 - (void)setCanUseReaderMode:(BOOL)enabled; |
| 43 | 49 |
| 44 // Informs tools popup menu whether "Request Desktop Site" can be enabled. | 50 // Informs tools popup menu whether "Request Desktop Site" can be enabled. |
| 45 - (void)setCanUseDesktopUserAgent:(BOOL)value; | 51 - (void)setCanUseDesktopUserAgent:(BOOL)value; |
| 46 | 52 |
| 53 // Informs tools popup menu whether "Request Mobile Site" can be enabled. | |
| 54 - (void)setCanUseMobileUserAgent:(BOOL)value; | |
|
kkhorimoto
2017/02/25 02:36:33
Let's duplicate the interface I suggested for the
liaoyuke
2017/02/27 17:34:22
Acknowledged.
| |
| 55 | |
| 47 @end | 56 @end |
| 48 | 57 |
| 49 #endif // IOS_CHROME_BROWSER_UI_TOOLS_MENU_TOOLS_POPUP_CONTROLLER_H_ | 58 #endif // IOS_CHROME_BROWSER_UI_TOOLS_MENU_TOOLS_POPUP_CONTROLLER_H_ |
| OLD | NEW |