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

Unified Diff: chrome/browser/ui/autofill/autofill_dialog_controller.cc

Issue 11231063: [views] "Hello, world" autofill imperative API dialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/autofill/autofill_dialog_controller.cc
diff --git a/chrome/browser/ui/autofill/autofill_dialog_controller.cc b/chrome/browser/ui/autofill/autofill_dialog_controller.cc
new file mode 100644
index 0000000000000000000000000000000000000000..7bc2fe027ccea071f6fef9714690c530f4a4416f
--- /dev/null
+++ b/chrome/browser/ui/autofill/autofill_dialog_controller.cc
@@ -0,0 +1,49 @@
+// Copyright (c) 2012 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/autofill/autofill_dialog_controller.h"
+
+#include "base/utf_string_conversions.h"
+#include "content/public/browser/web_contents.h"
+
+AutofillDialogController::AutofillDialogController(
+ content::WebContents* contents) : contents_(contents) {}
+
+void AutofillDialogController::Show() {
+ view_.reset(AutofillDialogView::CreateDialog(this));
+ view_->Show();
+}
+
+string16 AutofillDialogController::DialogTitle() {
+ // TODO(estade): real strings and l10n.
+ return string16(ASCIIToUTF16("Pay"));
Ilya Sherman 2012/10/23 00:39:00 nit: I think the strings should include some clear
Evan Stade 2012/10/23 01:52:04 Done.
+}
+
+string16 AutofillDialogController::CancelButtonText() {
+ // TODO(estade): real strings and l10n.
+ return string16(ASCIIToUTF16("Cancel"));
+}
+
+string16 AutofillDialogController::ConfirmButtonText() {
+ // TODO(estade): real strings and l10n.
+ return string16(ASCIIToUTF16("Submit"));
+}
+
+bool AutofillDialogController::ConfirmButtonEnabled() {
+ return false;
+}
+
+void AutofillDialogController::ViewClosed(bool accepted) {
+ // TODO(estade): pass the result along to the page.
+}
+
+// AutofillDialogView ----------------------------------------------------------
+
+AutofillDialogView::~AutofillDialogView() {}
+
+#if !defined(TOOLKIT_VIEWS)
+AutofillDialogView* AutofillDialogView::CreateDialog() {
Ilya Sherman 2012/10/23 00:39:00 nit: This should be annotated with a bug id for im
Evan Stade 2012/10/23 01:52:04 I dislike NOTIMPLEMENTED() because it's easy to be
+ return NULL;
+}
+#endif

Powered by Google App Engine
This is Rietveld 408576698