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

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..39cc86eea623484ba7fd3271bfe0adc5cb646240
--- /dev/null
+++ b/chrome/browser/ui/autofill/autofill_dialog_controller.cc
@@ -0,0 +1,43 @@
+// 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 "chrome/browser/ui/autofill/autofill_dialog_view.h"
+#include "content/public/browser/web_contents.h"
+
+AutofillDialogController::AutofillDialogController(
+ content::WebContents* contents)
+ : contents_(contents) {}
+
+AutofillDialogController::~AutofillDialogController() {}
+
+void AutofillDialogController::Show() {
+ view_.reset(AutofillDialogView::CreateDialog(this));
+ view_->Show();
+}
+
+string16 AutofillDialogController::DialogTitle() const {
+ // TODO(estade): real strings and l10n.
+ return string16(ASCIIToUTF16("PaY"));
+}
+
+string16 AutofillDialogController::CancelButtonText() const {
+ // TODO(estade): real strings and l10n.
+ return string16(ASCIIToUTF16("CaNceL"));
+}
+
+string16 AutofillDialogController::ConfirmButtonText() const {
+ // TODO(estade): real strings and l10n.
+ return string16(ASCIIToUTF16("SuBMiT"));
+}
+
+bool AutofillDialogController::ConfirmButtonEnabled() const {
+ return false;
+}
+
+void AutofillDialogController::ViewClosed(Action action) {
+ // TODO(estade): pass the result along to the page.
+}

Powered by Google App Engine
This is Rietveld 408576698