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

Unified Diff: chrome/browser/ui/input_window_dialog.h

Issue 8438037: Change 'Add Page' to show a simple input dialog with --use-more-webui. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Address comments Created 9 years, 1 month 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/input_window_dialog.h
diff --git a/chrome/browser/ui/input_window_dialog.h b/chrome/browser/ui/input_window_dialog.h
index 61b0dc4a4ec99c563adfd352b3fbd6dd4465c040..ed4c09e923b7eb855e2fac30a7922e2b9fe0d218 100644
--- a/chrome/browser/ui/input_window_dialog.h
+++ b/chrome/browser/ui/input_window_dialog.h
@@ -6,6 +6,8 @@
#define CHROME_BROWSER_UI_INPUT_WINDOW_DIALOG_H_
#pragma once
+#include <vector>
+
#include "base/basictypes.h"
#include "base/string16.h"
#include "ui/gfx/native_widget_types.h"
@@ -17,16 +19,18 @@ class InputWindowDialog {
BUTTON_TYPE_ADD,
BUTTON_TYPE_SAVE,
};
+ typedef std::vector<std::pair<string16, string16> > LabelContentsPairs;
+ typedef std::vector<string16> InputTexts;
class Delegate {
public:
virtual ~Delegate() {}
// Checks whether |text| is a valid input string.
- virtual bool IsValid(const string16& text) = 0;
+ virtual bool IsValid(const InputTexts& texts) = 0;
// Callback for when the user clicks the OK button.
- virtual void InputAccepted(const string16& text) = 0;
+ virtual void InputAccepted(const InputTexts& texts) = 0;
// Callback for when the user clicks the Cancel button.
virtual void InputCanceled() = 0;
@@ -34,12 +38,12 @@ class InputWindowDialog {
// Creates a new input window dialog parented to |parent|. Ownership of
// |delegate| is taken by InputWindowDialog or InputWindowDialog's owner.
- static InputWindowDialog* Create(gfx::NativeWindow parent,
- const string16& window_title,
- const string16& label,
- const string16& contents,
- Delegate* delegate,
- ButtonType type);
+ static InputWindowDialog* Create(
+ gfx::NativeWindow parent,
+ const string16& window_title,
+ const LabelContentsPairs& label_contents_pairs,
+ Delegate* delegate,
+ ButtonType type);
// Displays the window.
virtual void Show() = 0;
« no previous file with comments | « chrome/browser/ui/gtk/bookmarks/bookmark_editor_gtk_unittest.cc ('k') | chrome/browser/ui/input_window_dialog_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698