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

Unified Diff: ui/views/controls/message_box_view.h

Issue 10378086: views: Add a new ctor to MessageBoxView that takes only a InitParams. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix review Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/user_data_dir_dialog.cc ('k') | ui/views/controls/message_box_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/message_box_view.h
diff --git a/ui/views/controls/message_box_view.h b/ui/views/controls/message_box_view.h
index 7325a05b0675210ce0e428d585ce76a0f7b7d653..c1a6baa44beb9d696ec23413932d10432ce12cc4 100644
--- a/ui/views/controls/message_box_view.h
+++ b/ui/views/controls/message_box_view.h
@@ -6,7 +6,6 @@
#define UI_VIEWS_CONTROLS_MESSAGE_BOX_VIEW_H_
#pragma once
-#include <string>
#include <vector>
#include "base/string16.h"
@@ -37,14 +36,17 @@ class VIEWS_EXPORT MessageBoxView : public View {
HAS_PROMPT_FIELD = 1 << 1,
};
- MessageBoxView(int options,
- const string16& message,
- const string16& default_prompt,
- int message_width);
+ struct InitParams {
+ explicit InitParams(const string16& message);
+ ~InitParams();
- MessageBoxView(int options,
- const string16& message,
- const string16& default_prompt);
+ uint16 options;
+ string16 message;
+ string16 default_prompt;
+ int message_width;
+ };
+
+ explicit MessageBoxView(const InitParams& params);
virtual ~MessageBoxView();
@@ -84,7 +86,7 @@ class VIEWS_EXPORT MessageBoxView : public View {
private:
// Sets up the layout manager and initializes the message labels and prompt
// field. This should only be called once, from the constructor.
- void Init(int options, const string16& message, const string16& prompt);
+ void Init(const InitParams& params);
// Sets up the layout manager based on currently initialized views. Should be
// called when a view is initialized or changed.
« no previous file with comments | « chrome/browser/ui/views/user_data_dir_dialog.cc ('k') | ui/views/controls/message_box_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698