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

Unified Diff: ui/base/cocoa/touch_bar_util.h

Issue 2921083003: [Mac] Touch Bar Support for Dialogs (Closed)
Patch Set: nits Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: ui/base/cocoa/touch_bar_util.h
diff --git a/ui/base/cocoa/touch_bar_util.h b/ui/base/cocoa/touch_bar_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..a6cf2d839ecb9e4f094741819be21c96b29be555
--- /dev/null
+++ b/ui/base/cocoa/touch_bar_util.h
@@ -0,0 +1,29 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
Robert Sesek 2017/06/06 14:52:35 Unittests for this file?
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_BASE_COCOA_TOUCH_BAR_UTIL_H
+#define UI_BASE_COCOA_TOUCH_BAR_UTIL_H
+
+#import <Cocoa/Cocoa.h>
+
+#include "ui/base/ui_base_export.h"
+
+namespace ui {
+
Robert Sesek 2017/06/06 14:52:36 Optional: It may be handy to add a function like:
spqchan 2017/06/06 19:34:50 Done.
+// Returns a stylized blue button for the touch bar. The button performs
+// |action| from the |target|.
+UI_BASE_EXPORT NSButton* CreateBlueTouchBarButton(NSString* title,
Robert Sesek 2017/06/06 14:52:35 These functions shouldn't be named "Create" unless
spqchan 2017/06/06 19:34:50 What should I use? GetBlueTouchBarButton or just B
Robert Sesek 2017/06/06 20:14:59 Yes, I'd use GetBlueTouchBarButton().
+ id target,
+ SEL action);
+
+// Creates a Touch Bar identifier with the given |id|.
+UI_BASE_EXPORT NSString* CreateTouchBarId(NSString* touch_bar_id);
+
+// Creates a Touch Bar Item identifier.
+UI_BASE_EXPORT NSString* CreateTouchBarItemId(NSString* touch_bar_id,
+ NSString* item_id);
+
+} // namespace ui
+
+#endif // UI_BASE_COCOA_TOUCH_BAR_UTIL_H

Powered by Google App Engine
This is Rietveld 408576698