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

Side by Side Diff: chrome/browser/ui/views/payments/payment_request_dialog_view.cc

Issue 2846053002: [Web Payments] Respect Harmony dialog width in Payment Request (Closed)
Patch Set: Change the dialog to Large Created 3 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/payments/payment_request_sheet_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_dialog_view.h" 5 #include "chrome/browser/ui/views/payments/payment_request_dialog_view.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 325
326 layout->StartRow(0.5, 1); 326 layout->StartRow(0.5, 1);
327 layout->AddView(new views::Label( 327 layout->AddView(new views::Label(
328 l10n_util::GetStringUTF16(IDS_PAYMENTS_PROCESSING_MESSAGE))); 328 l10n_util::GetStringUTF16(IDS_PAYMENTS_PROCESSING_MESSAGE)));
329 329
330 throbber_overlay_.SetLayoutManager(layout.release()); 330 throbber_overlay_.SetLayoutManager(layout.release());
331 AddChildView(&throbber_overlay_); 331 AddChildView(&throbber_overlay_);
332 } 332 }
333 333
334 gfx::Size PaymentRequestDialogView::GetPreferredSize() const { 334 gfx::Size PaymentRequestDialogView::GetPreferredSize() const {
335 return gfx::Size(kDialogWidth, kDialogHeight); 335 return gfx::Size(GetActualDialogWidth(), kDialogHeight);
336 } 336 }
337 337
338 void PaymentRequestDialogView::ViewHierarchyChanged( 338 void PaymentRequestDialogView::ViewHierarchyChanged(
339 const ViewHierarchyChangedDetails& details) { 339 const ViewHierarchyChangedDetails& details) {
340 if (being_closed_) 340 if (being_closed_)
341 return; 341 return;
342 342
343 // When a view that is associated with a controller is removed from this 343 // When a view that is associated with a controller is removed from this
344 // view's descendants, dispose of the controller. 344 // view's descendants, dispose of the controller.
345 if (!details.is_add && 345 if (!details.is_add &&
346 controller_map_.find(details.child) != controller_map_.end()) { 346 controller_map_.find(details.child) != controller_map_.end()) {
347 DCHECK(!details.move_view); 347 DCHECK(!details.move_view);
348 controller_map_.erase(details.child); 348 controller_map_.erase(details.child);
349 } 349 }
350 } 350 }
351 351
352 } // namespace payments 352 } // namespace payments
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/payments/payment_request_sheet_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698