summaryrefslogtreecommitdiffstats
path: root/views/controls/text_field.h
diff options
context:
space:
mode:
Diffstat (limited to 'views/controls/text_field.h')
-rw-r--r--views/controls/text_field.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/views/controls/text_field.h b/views/controls/text_field.h
index a53c325..3c4571a 100644
--- a/views/controls/text_field.h
+++ b/views/controls/text_field.h
@@ -71,8 +71,11 @@ class TextField : public View {
STYLE_LOWERCASE = 1<<2
};
- TextField::TextField()
- : native_view_(NULL),
+ TextField()
+ :
+#if defined(OS_WIN)
+ native_view_(NULL),
+#endif
edit_(NULL),
controller_(NULL),
style_(STYLE_DEFAULT),
@@ -83,8 +86,11 @@ class TextField : public View {
num_lines_(1) {
SetFocusable(true);
}
- explicit TextField::TextField(StyleFlags style)
- : native_view_(NULL),
+ explicit TextField(StyleFlags style)
+ :
+#if defined(OS_WIN)
+ native_view_(NULL),
+#endif
edit_(NULL),
controller_(NULL),
style_(style),
@@ -122,7 +128,9 @@ class TextField : public View {
// Overridden from Chrome::View.
virtual bool SkipDefaultKeyEventProcessing(const KeyEvent& e);
+#if defined(OS_WIN)
virtual HWND GetNativeComponent();
+#endif
// Returns the text currently displayed in the text field.
std::wstring GetText() const;
@@ -197,8 +205,10 @@ class TextField : public View {
// Resets the background color of the edit.
void UpdateEditBackgroundColor();
+#if defined(OS_WIN)
// This encapsulates the HWND of the native text field.
HWNDView* native_view_;
+#endif
// This inherits from the native text field.
Edit* edit_;