blob: 965f50cc1193a115f196bec7b1069bbbc500bc4a [file] [log] [blame]
spqchan69b67522017-06-07 20:56:561// Copyright 2017 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
Lei Zhang7fc035b42021-04-20 20:03:195#ifndef UI_BASE_COCOA_TOUCH_BAR_UTIL_H_
6#define UI_BASE_COCOA_TOUCH_BAR_UTIL_H_
spqchan69b67522017-06-07 20:56:567
8#import <Cocoa/Cocoa.h>
Avi Drissman111a0c02020-01-27 21:18:169#include <os/availability.h>
spqchan69b67522017-06-07 20:56:5610
Henrique Ferreiro376c7652020-05-22 09:00:0411#include "base/component_export.h"
spqchan69b67522017-06-07 20:56:5612
13namespace ui {
14
spqchand24dbd52017-07-21 00:57:0615// The touch bar actions that are being recorded in a histogram. These values
16// should not be re-ordered or removed.
17enum TouchBarAction {
18 BACK = 0,
19 FORWARD,
20 STOP,
21 RELOAD,
22 HOME,
23 SEARCH,
24 STAR,
25 NEW_TAB,
26 CREDIT_CARD_AUTOFILL,
Tessa Nijssenc67abee2018-07-19 18:45:4927 TEXT_SUGGESTION,
spqchand24dbd52017-07-21 00:57:0628 TOUCH_BAR_ACTION_COUNT
29};
30
31// Logs the sample's UMA metrics into the DefaultTouchBar.Metrics histogram.
Henrique Ferreiro376c7652020-05-22 09:00:0432COMPONENT_EXPORT(UI_BASE) void LogTouchBarUMA(TouchBarAction command);
spqchand24dbd52017-07-21 00:57:0633
spqchan69b67522017-06-07 20:56:5634// Creates a touch bar identifier with the given |id|.
Henrique Ferreiro376c7652020-05-22 09:00:0435COMPONENT_EXPORT(UI_BASE) NSString* GetTouchBarId(NSString* touch_bar_id);
spqchan69b67522017-06-07 20:56:5636
37// Creates a touch Bar jtem identifier.
Henrique Ferreiro376c7652020-05-22 09:00:0438COMPONENT_EXPORT(UI_BASE)
39NSString* GetTouchBarItemId(NSString* touch_bar_id, NSString* item_id);
spqchan69b67522017-06-07 20:56:5640
41} // namespace ui
42
Lei Zhang7fc035b42021-04-20 20:03:1943#endif // UI_BASE_COCOA_TOUCH_BAR_UTIL_H_