Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/views/bookmarks/bookmark_sync_promo_view.h" | 5 #include "chrome/browser/ui/views/bookmarks/bookmark_sync_promo_view.h" |
| 6 | 6 |
| 7 #include "base/strings/string16.h" | 7 #include "base/strings/string16.h" |
| 8 #include "chrome/browser/ui/bookmarks/bookmark_bubble_delegate.h" | 8 #include "chrome/browser/ui/bookmarks/bookmark_bubble_delegate.h" |
| 9 #include "grit/generated_resources.h" | 9 #include "grit/generated_resources.h" |
| 10 #include "third_party/skia/include/core/SkColor.h" | 10 #include "third_party/skia/include/core/SkColor.h" |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 27 const int kBorderWidth = 1; | 27 const int kBorderWidth = 1; |
| 28 | 28 |
| 29 // Color of the text of the promo. | 29 // Color of the text of the promo. |
| 30 const SkColor kTextColor = SkColorSetRGB(102, 102, 102); | 30 const SkColor kTextColor = SkColorSetRGB(102, 102, 102); |
| 31 | 31 |
| 32 } // namespace | 32 } // namespace |
| 33 | 33 |
| 34 BookmarkSyncPromoView::BookmarkSyncPromoView(BookmarkBubbleDelegate* delegate) | 34 BookmarkSyncPromoView::BookmarkSyncPromoView(BookmarkBubbleDelegate* delegate) |
| 35 : delegate_(delegate) { | 35 : delegate_(delegate) { |
| 36 set_background(views::Background::CreateSolidBackground(kBackgroundColor)); | 36 set_background(views::Background::CreateSolidBackground(kBackgroundColor)); |
| 37 set_border(views::Border::CreateSolidSidedBorder(kBorderWidth, | 37 SetBorder(views::Border::CreateSolidSidedBorder(kBorderWidth, |
| 38 0, | 38 0, |
|
sky
2014/01/23 15:30:54
nit: fix indentation.
| |
| 39 0, | 39 0, |
| 40 0, | 40 0, |
| 41 kBorderColor)); | 41 kBorderColor)); |
| 42 size_t offset; | 42 size_t offset; |
| 43 base::string16 link_text = | 43 base::string16 link_text = |
| 44 l10n_util::GetStringUTF16(IDS_BOOKMARK_SYNC_PROMO_LINK); | 44 l10n_util::GetStringUTF16(IDS_BOOKMARK_SYNC_PROMO_LINK); |
| 45 base::string16 promo_text = l10n_util::GetStringFUTF16( | 45 base::string16 promo_text = l10n_util::GetStringFUTF16( |
| 46 IDS_BOOKMARK_SYNC_PROMO_MESSAGE, | 46 IDS_BOOKMARK_SYNC_PROMO_MESSAGE, |
| 47 link_text, | 47 link_text, |
| 48 &offset); | 48 &offset); |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 70 views::kPanelVertMargin, | 70 views::kPanelVertMargin, |
| 71 0); | 71 0); |
| 72 SetLayoutManager(layout); | 72 SetLayoutManager(layout); |
| 73 AddChildView(promo_label); | 73 AddChildView(promo_label); |
| 74 } | 74 } |
| 75 | 75 |
| 76 void BookmarkSyncPromoView::StyledLabelLinkClicked(const gfx::Range& range, | 76 void BookmarkSyncPromoView::StyledLabelLinkClicked(const gfx::Range& range, |
| 77 int event_flags) { | 77 int event_flags) { |
| 78 delegate_->OnSignInLinkClicked(); | 78 delegate_->OnSignInLinkClicked(); |
| 79 } | 79 } |
| OLD | NEW |