| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_TOUCH_BAR_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_TOUCH_BAR_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_TOUCH_BAR_H_ | 6 #define CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_TOUCH_BAR_H_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 | 9 |
| 10 #import "ui/base/cocoa/touch_bar_forward_declarations.h" | 10 #import "ui/base/cocoa/touch_bar_forward_declarations.h" |
| 11 | 11 |
| 12 class Browser; | 12 class Browser; |
| 13 @class BrowserWindowController; | 13 @class BrowserWindowController; |
| 14 | 14 |
| 15 // Provides a touch bar for the browser window. This class implements the | 15 // Provides a touch bar for the browser window. This class implements the |
| 16 // NSTouchBarDelegate and handles the items in the touch bar. | 16 // NSTouchBarDelegate and handles the items in the touch bar. |
| 17 @interface BrowserWindowTouchBar : NSObject<NSTouchBarDelegate> | 17 @interface BrowserWindowTouchBar : NSObject<NSTouchBarDelegate> |
| 18 // True is the current page is loading. Used to determine if a stop or reload | 18 // True is the current page is loading. Used to determine if a stop or reload |
| 19 // button should be provided. | 19 // button should be provided. |
| 20 @property(nonatomic, assign) BOOL isPageLoading; | 20 @property(nonatomic, assign) BOOL isPageLoading; |
| 21 | 21 |
| 22 // True if the current page is starred. Used by star touch bar button. | 22 // True if the current page is starred. Used by star touch bar button. |
| 23 @property(nonatomic, assign) BOOL isStarred; | 23 @property(nonatomic, assign) BOOL isStarred; |
| 24 | 24 |
| 25 // Returns a touch bar item identifier for the given |touchBarId| and |itemId|. | |
| 26 + (NSString*)identifierForTouchBarId:(NSString*)touchBarId | |
| 27 itemId:(NSString*)itemId; | |
| 28 | |
| 29 // Designated initializer. | 25 // Designated initializer. |
| 30 - (instancetype)initWithBrowser:(Browser*)browser | 26 - (instancetype)initWithBrowser:(Browser*)browser |
| 31 browserWindowController:(BrowserWindowController*)bwc; | 27 browserWindowController:(BrowserWindowController*)bwc; |
| 32 | 28 |
| 33 // Creates and returns a touch bar for the browser window. | 29 // Creates and returns a touch bar for the browser window. |
| 34 - (NSTouchBar*)makeTouchBar; | 30 - (NSTouchBar*)makeTouchBar; |
| 35 | 31 |
| 36 @end | 32 @end |
| 37 | 33 |
| 38 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_TOUCH_BAR_H_ | 34 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_TOUCH_BAR_H_ |
| OLD | NEW |