[Metrics] Make MetricsStateManager take a callback param to check if UMA is enabled.
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / omnibox / omnibox_popup_matrix.h
blob2ce61674c6b3890e773de072237ebebe06a5aae6
1 // Copyright 2013 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.
5 #ifndef CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_POPUP_MATRIX_H_
6 #define CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_POPUP_MATRIX_H_
8 #import <Cocoa/Cocoa.h>
10 #import "ui/base/cocoa/tracking_area.h"
11 #include "ui/base/window_open_disposition.h"
13 @class OmniboxPopupMatrix;
15 class OmniboxPopupMatrixDelegate {
16 public:
17 // Called when the selection in the matrix changes.
18 virtual void OnMatrixRowSelected(OmniboxPopupMatrix* matrix, size_t row) = 0;
20 // Called when the user clicks on a row.
21 virtual void OnMatrixRowClicked(OmniboxPopupMatrix* matrix, size_t row) = 0;
23 // Called when the user middle clicks on a row.
24 virtual void OnMatrixRowMiddleClicked(OmniboxPopupMatrix* matrix,
25 size_t row) = 0;
28 // Sets up a tracking area to implement hover by highlighting the cell the mouse
29 // is over.
30 @interface OmniboxPopupMatrix : NSMatrix {
31 OmniboxPopupMatrixDelegate* delegate_; // weak
32 ui::ScopedCrTrackingArea trackingArea_;
35 // Create a zero-size matrix.
36 - (id)initWithDelegate:(OmniboxPopupMatrixDelegate*)delegate;
38 // Sets the delegate.
39 - (void)setDelegate:(OmniboxPopupMatrixDelegate*)delegate;
41 // Return the currently highlighted row. Returns -1 if no row is highlighted.
42 - (NSInteger)highlightedRow;
44 @end
46 #endif // CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_POPUP_MATRIX_H_