OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/payments/payment_request_views_util.h" | 5 #include "chrome/browser/ui/views/payments/payment_request_views_util.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 } | 171 } |
172 | 172 |
173 private: | 173 private: |
174 SkColor color_; | 174 SkColor color_; |
175 DISALLOW_COPY_AND_ASSIGN(PaymentRequestRowBorderPainter); | 175 DISALLOW_COPY_AND_ASSIGN(PaymentRequestRowBorderPainter); |
176 }; | 176 }; |
177 | 177 |
178 } // namespace | 178 } // namespace |
179 | 179 |
180 int GetActualDialogWidth() { | 180 int GetActualDialogWidth() { |
181 constexpr int kDialogMinWidth = 512; | |
182 static int actual_width = | 181 static int actual_width = |
183 views::LayoutProvider::Get()->GetSnappedDialogWidth(kDialogMinWidth); | 182 views::LayoutProvider::Get()->GetSnappedDialogWidth(kDialogMinWidth); |
184 return actual_width; | 183 return actual_width; |
185 } | 184 } |
186 | 185 |
187 std::unique_ptr<views::View> CreateSheetHeaderView( | 186 std::unique_ptr<views::View> CreateSheetHeaderView( |
188 bool show_back_arrow, | 187 bool show_back_arrow, |
189 const base::string16& title, | 188 const base::string16& title, |
190 views::ButtonListener* listener) { | 189 views::ButtonListener* listener) { |
191 std::unique_ptr<views::View> container = base::MakeUnique<views::View>(); | 190 std::unique_ptr<views::View> container = base::MakeUnique<views::View>(); |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 amount_label->SetHorizontalAlignment(gfx::ALIGN_LEFT); | 390 amount_label->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
392 amount_label->set_id( | 391 amount_label->set_id( |
393 static_cast<int>(DialogViewID::SHIPPING_OPTION_AMOUNT)); | 392 static_cast<int>(DialogViewID::SHIPPING_OPTION_AMOUNT)); |
394 container->AddChildView(amount_label.release()); | 393 container->AddChildView(amount_label.release()); |
395 } | 394 } |
396 | 395 |
397 return container; | 396 return container; |
398 } | 397 } |
399 | 398 |
400 } // namespace payments | 399 } // namespace payments |
OLD | NEW |