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

Side by Side Diff: ios/chrome/browser/ui/toolbar/toolbar_tools_menu_button.h

Issue 2934463002: [iOS] Add experimental new keyboard accessory view. (Closed)
Patch Set: Split KeyboardAccessoryView into 2 classes. Created 3 years, 6 months 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 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_TOOLBAR_TOOLBAR_TOOLS_MENU_BUTTON_H_ 5 #ifndef IOS_CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_TOOLS_MENU_BUTTON_H_
6 #define IOS_CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_TOOLS_MENU_BUTTON_H_ 6 #define IOS_CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_TOOLS_MENU_BUTTON_H_
7 7
8 #import <UIKit/UIKit.h> 8 #import <UIKit/UIKit.h>
9 9
10 #import "ios/chrome/browser/ui/fancy_ui/tinted_button.h" 10 #import "ios/chrome/browser/ui/fancy_ui/colored_button.h"
11 #import "ios/chrome/browser/ui/toolbar/toolbar_controller.h" 11 #import "ios/chrome/browser/ui/toolbar/toolbar_controller.h"
12 12
13 // TintedButton specialization that updates the tint color when the tools menu 13 // ColoredButton specialization that updates the tint color when the tools menu
14 // is visible or when the reading list associated with |readingListModel| 14 // is visible or when the reading list associated with |readingListModel|
15 // contains unread items. 15 // contains unread items.
16 // Draws and animates the icon of the button using UIBezierPaths. 16 // Draws and animates the icon of the button using UIBezierPaths.
17 @interface ToolbarToolsMenuButton : TintedButton 17 @interface ToolbarToolsMenuButton : ColoredButton
18 18
19 // Initializes and returns a newly allocated TintedButton with the specified 19 // Initializes and returns a newly allocated TintedButton with the specified
20 // |frame| and the |style| of the toolbar it belongs to. 20 // |frame| and the |style| of the toolbar it belongs to.
21 - (instancetype)initWithFrame:(CGRect)frame 21 - (instancetype)initWithFrame:(CGRect)frame
22 style:(ToolbarControllerStyle)style 22 style:(ToolbarControllerStyle)style
23 NS_DESIGNATED_INITIALIZER; 23 NS_DESIGNATED_INITIALIZER;
24 24
25 - (instancetype)initWithFrame:(CGRect)frame NS_UNAVAILABLE; 25 - (instancetype)initWithFrame:(CGRect)frame NS_UNAVAILABLE;
26 26
27 - (instancetype)initWithCoder:(NSCoder*)coder NS_UNAVAILABLE; 27 - (instancetype)initWithCoder:(NSCoder*)coder NS_UNAVAILABLE;
28 28
29 // Informs the button that the Tools Menu's visibility is |toolsMenuVisible|. 29 // Informs the button that the Tools Menu's visibility is |toolsMenuVisible|.
30 - (void)setToolsMenuIsVisible:(BOOL)toolsMenuVisible; 30 - (void)setToolsMenuIsVisible:(BOOL)toolsMenuVisible;
31 31
32 // Notifies the button should alert user to the presence of reading list unseen 32 // Notifies the button should alert user to the presence of reading list unseen
33 // items. 33 // items.
34 - (void)setReadingListContainsUnseenItems:(BOOL)readingListContainsUnseenItems; 34 - (void)setReadingListContainsUnseenItems:(BOOL)readingListContainsUnseenItems;
35 35
36 // Triggers an animation on the button to draw the user's attention to the 36 // Triggers an animation on the button to draw the user's attention to the
37 // button. 37 // button.
38 - (void)triggerAnimation; 38 - (void)triggerAnimation;
39 39
40 @end 40 @end
41 41
42 #endif // IOS_CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_TOOLS_MENU_BUTTON_H_ 42 #endif // IOS_CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_TOOLS_MENU_BUTTON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698