Commit 3095966c authored by Robert Liao's avatar Robert Liao Committed by Commit Bot

Add Builder Support to Textfield

BUG=1130078

Change-Id: I0703a0109fc8a40a9af64bf2f6e7c4501007dd6e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2429254
Auto-Submit: Robert Liao <robliao@chromium.org>
Commit-Queue: Wei Li <weili@chromium.org>
Reviewed-by: default avatarWei Li <weili@chromium.org>
Cr-Commit-Position: refs/heads/master@{#810713}
parent 544b6e75
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
#include "ui/views/controls/focus_ring.h" #include "ui/views/controls/focus_ring.h"
#include "ui/views/controls/textfield/textfield_model.h" #include "ui/views/controls/textfield/textfield_model.h"
#include "ui/views/drag_controller.h" #include "ui/views/drag_controller.h"
#include "ui/views/metadata/view_factory.h"
#include "ui/views/selection_controller.h" #include "ui/views/selection_controller.h"
#include "ui/views/selection_controller_delegate.h" #include "ui/views/selection_controller_delegate.h"
#include "ui/views/view.h" #include "ui/views/view.h"
...@@ -737,6 +738,23 @@ class VIEWS_EXPORT Textfield : public View, ...@@ -737,6 +738,23 @@ class VIEWS_EXPORT Textfield : public View,
DISALLOW_COPY_AND_ASSIGN(Textfield); DISALLOW_COPY_AND_ASSIGN(Textfield);
}; };
BEGIN_VIEW_BUILDER(VIEWS_EXPORT, Textfield, View)
VIEW_BUILDER_PROPERTY(bool, ReadOnly)
VIEW_BUILDER_PROPERTY(base::string16, Text)
VIEW_BUILDER_PROPERTY(ui::TextInputType, TextInputType)
VIEW_BUILDER_PROPERTY(int, TextInputFlags)
VIEW_BUILDER_PROPERTY(SkColor, TextColor)
VIEW_BUILDER_PROPERTY(SkColor, SelectionTextColor)
VIEW_BUILDER_PROPERTY(SkColor, BackgroundColor)
VIEW_BUILDER_PROPERTY(SkColor, SelectionBackgroundColor)
VIEW_BUILDER_PROPERTY(bool, CursorEnabled)
VIEW_BUILDER_PROPERTY(base::string16, PlaceholderText)
VIEW_BUILDER_PROPERTY(bool, Invalid)
VIEW_BUILDER_PROPERTY(gfx::HorizontalAlignment, HorizontalAlignment)
VIEW_BUILDER_PROPERTY(gfx::Range, SelectedRange)
VIEW_BUILDER_PROPERTY(base::string16, AccessibleName)
END_VIEW_BUILDER(VIEWS_EXPORT, Textfield)
} // namespace views } // namespace views
#endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment