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

Side by Side Diff: ios/chrome/browser/ui/tools_menu/tools_menu_context.h

Issue 2588733002: Upstream Chrome on iOS source code [9/11]. (Closed)
Patch Set: Created 4 years 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
(Empty)
1 // Copyright 2016 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_MENU_CONTEXT_H_
6 #define IOS_CHROME_BROWSER_UI_TOOLS_MENU_TOOLS_MENU_CONTEXT_H_
7
8 #import <Foundation/Foundation.h>
9 #import <UIKit/UIKit.h>
10
11 @class ReadingListMenuNotifier;
12
13 // Context defining options that can be set to change the tools menu's
14 // appearance. All are set to false by default.
15 @interface ToolsMenuContext : NSObject
16 // Indicate that the menu is being shown while in the tab switcher.
17 @property(nonatomic, getter=isInTabSwitcher) BOOL inTabSwitcher;
18 // Indicate that the menu is being shown while there are no open tabs.
19 @property(nonatomic, getter=hasNoOpenedTabs) BOOL noOpenedTabs;
20 // Indicate that the menu is being shown while in incognito mode.
21 @property(nonatomic, getter=isInIncognito) BOOL inIncognito;
22 // View that the menu will be displayed in.
23 @property(nonatomic, readonly) UIView* displayView;
24 // Button from which popup menu will be opened.
25 @property(nonatomic, assign) UIButton* toolsMenuButton;
26 // Menu's origin relative to the |displayView|'s coordinate system, calculated
27 // from |toolsMenuButton| and |displayView|.
28 @property(nonatomic, readonly) CGRect sourceRect;
29 // Image insets that should be applied to the tools button if it is displayed,
30 // calculated from |toolsMenuButton|.
31 @property(nonatomic, readonly) UIEdgeInsets toolsButtonInsets;
32 // Notifier for changes to the reading list requiring the menu to be updated.
33 // Menus needing to be updated should set themselves as this object's delegate.
34 @property(nonatomic, assign) ReadingListMenuNotifier* readingListMenuNotifier;
35
36 // Initialize a ToolsMenuContext instance with default values. |displayView| is
37 // the weakly-held parent view within which the popup tools menu using this
38 // context will be displayed.
39 - (instancetype)initWithDisplayView:(UIView*)displayView
40 NS_DESIGNATED_INITIALIZER;
41 - (instancetype)init NS_UNAVAILABLE;
42
43 @end
44
45 #endif // IOS_CHROME_BROWSER_UI_TOOLS_MENU_TOOLS_MENU_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698