- add sources.
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / cocoa / bookmarks / bookmark_sync_promo_controller.h
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.
4
5 #ifndef CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_SYNC_PROMO_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_SYNC_PROMO_CONTROLLER_H_
7
8 #import <Cocoa/Cocoa.h>
9
10 #include "base/mac/scoped_nsobject.h"
11
12 class Browser;
13 @class HyperlinkTextView;
14
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
21
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_;
25 }
26
27 @property(nonatomic, readonly) CGFloat borderWidth;
28
29 - (id)initWithBrowser:(Browser*)browser;
30
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;
34
35 @end
36
37 #endif  // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_SYNC_PROMO_CONTROLLER_H_