Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(486)

Side by Side Diff: chrome/browser/ui/views/bookmarks/bookmark_sync_promo_view.cc

Issue 145033006: views: Make View::set_border() take a scoped_ptr<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Further renaming Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698