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

Unified Diff: ui/views/cocoa/bridged_content_view_touch_bar.mm

Issue 2519563002: [Mac] Switch from NSObject categories to forward declarations for Touch Bar support. (Closed)
Patch Set: Tweak comment, change `retain` back to `strong` in interfaces from Apple headers. Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/base/cocoa/touch_bar_forward_declarations.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/cocoa/bridged_content_view_touch_bar.mm
diff --git a/ui/views/cocoa/bridged_content_view_touch_bar.mm b/ui/views/cocoa/bridged_content_view_touch_bar.mm
index 109f4cdafa8fd930869e60f12e3e8038bfd22aa7..2f1d81dfc172ef78525acd4c73d8acb2721351cd 100644
--- a/ui/views/cocoa/bridged_content_view_touch_bar.mm
+++ b/ui/views/cocoa/bridged_content_view_touch_bar.mm
@@ -48,7 +48,8 @@ NSString* const kTouchBarCancelId = @"com.google.chrome-CANCEL";
// NSTouchBarDelegate protocol implementation.
- (NSTouchBarItem*)touchBar:(NSTouchBar*)touchBar
- makeItemForIdentifier:(NSTouchBarItemIdentifier)identifier {
+ makeItemForIdentifier:(NSTouchBarItemIdentifier)identifier
+ NS_AVAILABLE_MAC(10_12_1) {
if (!hostedView_)
return nil;
@@ -61,7 +62,9 @@ NSString* const kTouchBarCancelId = @"com.google.chrome-CANCEL";
}
if ([items count] == 0)
return nil;
- return [NSGroupTouchBarItem groupItemWithIdentifier:identifier items:items];
+ return [NSClassFromString(@"NSGroupTouchBarItem")
+ groupItemWithIdentifier:identifier
+ items:items];
}
ui::DialogButton type = ui::DIALOG_BUTTON_NONE;
@@ -101,7 +104,7 @@ NSString* const kTouchBarCancelId = @"com.google.chrome-CANCEL";
// NSTouchBarProvider protocol implementation (via NSResponder category).
-- (NSTouchBar*)makeTouchBar {
+- (NSTouchBar*)makeTouchBar NS_AVAILABLE_MAC(10_12_1) {
if (!hostedView_)
return nil;
« no previous file with comments | « ui/base/cocoa/touch_bar_forward_declarations.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698