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

Side by Side Diff: chrome/browser/ui/views/autofill/save_card_bubble_views.cc

Issue 1518543002: Adds MD ink ripple animations to buttons within location bar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adds MD ink ripple animations to buttons within location bar (with WidgetObserver) Created 4 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/autofill/save_card_bubble_views.h" 5 #include "chrome/browser/ui/views/autofill/save_card_bubble_views.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 new views::StyledLabel(line.text(), listener)); 47 new views::StyledLabel(line.text(), listener));
48 for (const LegalMessageLine::Link& link : line.links()) { 48 for (const LegalMessageLine::Link& link : line.links()) {
49 label->AddStyleRange(link.range, 49 label->AddStyleRange(link.range,
50 views::StyledLabel::RangeStyleInfo::CreateForLink()); 50 views::StyledLabel::RangeStyleInfo::CreateForLink());
51 } 51 }
52 return label; 52 return label;
53 } 53 }
54 54
55 } // namespace 55 } // namespace
56 56
57 SaveCardBubbleViews::SaveCardBubbleViews(views::View* anchor_view, 57 SaveCardBubbleViews::SaveCardBubbleViews(views::WidgetObserverView* anchor_view,
58 content::WebContents* web_contents, 58 content::WebContents* web_contents,
59 SaveCardBubbleController* controller) 59 SaveCardBubbleController* controller)
60 : LocationBarBubbleDelegateView(anchor_view, web_contents), 60 : LocationBarBubbleDelegateView(anchor_view, web_contents),
61 controller_(controller), 61 controller_(controller),
62 save_button_(nullptr), 62 save_button_(nullptr),
63 cancel_button_(nullptr), 63 cancel_button_(nullptr),
64 learn_more_link_(nullptr) { 64 learn_more_link_(nullptr) {
65 DCHECK(controller); 65 DCHECK(controller);
66 views::BubbleDelegateView::CreateBubble(this); 66 views::BubbleDelegateView::CreateBubble(this);
67 } 67 }
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 void SaveCardBubbleViews::Init() { 234 void SaveCardBubbleViews::Init() {
235 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0)); 235 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0));
236 AddChildView(CreateMainContentView().release()); 236 AddChildView(CreateMainContentView().release());
237 if (!controller_->GetLegalMessageLines().empty()) 237 if (!controller_->GetLegalMessageLines().empty())
238 AddChildView(CreateFootnoteView().release()); 238 AddChildView(CreateFootnoteView().release());
239 239
240 set_margins(gfx::Insets(1, 0, 1, 0)); 240 set_margins(gfx::Insets(1, 0, 1, 0));
241 } 241 }
242 242
243 } // namespace autofill 243 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698