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"
13 @
class HyperlinkTextView
;
15 // Controller of the bookmark sync promo displayed at the bottom of the
17 @interface BookmarkSyncPromoController
: NSViewController
<NSTextViewDelegate
> {
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
;
37 #endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_SYNC_PROMO_CONTROLLER_H_