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

Unified Diff: chrome/browser/ui/views/payments/payment_dialog_state.cc

Issue 2528503002: [WebPayments] Implement state transitions in desktop WebPayments dialog. (Closed)
Patch Set: Make PaymentDialogState own the view returned through GetView Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/payments/payment_dialog_state.cc
diff --git a/chrome/browser/ui/views/payments/payment_dialog_state.cc b/chrome/browser/ui/views/payments/payment_dialog_state.cc
new file mode 100644
index 0000000000000000000000000000000000000000..37ffdebf4fec29134789ba6770696dd8a5d15297
--- /dev/null
+++ b/chrome/browser/ui/views/payments/payment_dialog_state.cc
@@ -0,0 +1,25 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/ui/views/payments/payment_dialog_state.h"
+
+#include "ui/views/view.h"
+
+namespace payments {
+
+PaymentDialogState::PaymentDialogState()
please use gerrit instead 2016/12/07 23:29:19 Please initialize interactiable_ boolean here. Oth
anthonyvd 2016/12/08 20:31:22 Ack. interactable_ doesn't exist anymore as of pat
+ : view_(nullptr) {}
sky 2016/12/08 03:58:17 No need to initialize view_ here (default value is
anthonyvd 2016/12/08 20:31:22 Done.
+
+PaymentDialogState::~PaymentDialogState() {}
+
+views::View* PaymentDialogState::GetView() {
+ if (!view_) {
+ view_.reset(CreateView());
+ view_->set_owned_by_client();
+ }
+
+ return view_.get();
+}
+
+} // namespace payments

Powered by Google App Engine
This is Rietveld 408576698