[Metrics] Make MetricsStateManager take a callback param to check if UMA is enabled.
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / bookmarks / bookmark_sync_promo_controller.h
blobfb4fe6010e49fcf05107612f41cdc61253e7727c
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_BOOKMARKS_BOOKMARK_SYNC_PROMO_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_SYNC_PROMO_CONTROLLER_H_
8 #import <Cocoa/Cocoa.h>
10 #include "base/mac/scoped_nsobject.h"
12 class Browser;
13 @class HyperlinkTextView;
15 // Controller of the bookmark sync promo displayed at the bottom of the
16 // bookmark bubble.
17 @interface BookmarkSyncPromoController : NSViewController<NSTextViewDelegate> {
18 @private
19 // The browser in which the sign in page will be loaded.
20 Browser* browser_; // weak
22 // The text view that displays the promo message. Ownership is shared between
23 // the controller and its view.
24 base::scoped_nsobject<HyperlinkTextView> textView_;
27 @property(nonatomic, readonly) CGFloat borderWidth;
29 - (id)initWithBrowser:(Browser*)browser;
31 // Preferred height of the sync promo view for a given width. The border is
32 // is included in the provided width and in the returned height.
33 - (CGFloat)preferredHeightForWidth:(CGFloat)width;
35 @end
37 #endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_SYNC_PROMO_CONTROLLER_H_