OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_GTK_H_ | 5 #ifndef VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_GTK_H_ |
6 #define VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_GTK_H_ | 6 #define VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_GTK_H_ |
7 | 7 |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 | 9 |
10 #include "base/string16.h" | 10 #include "base/string16.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 virtual View* GetView(); | 36 virtual View* GetView(); |
37 virtual gfx::NativeView GetTestingHandle() const; | 37 virtual gfx::NativeView GetTestingHandle() const; |
38 | 38 |
39 // Overridden from NativeControlGtk: | 39 // Overridden from NativeControlGtk: |
40 virtual void CreateNativeControl(); | 40 virtual void CreateNativeControl(); |
41 virtual void NativeControlCreated(GtkWidget* widget); | 41 virtual void NativeControlCreated(GtkWidget* widget); |
42 | 42 |
43 private: | 43 private: |
44 Textfield* textfield_; | 44 Textfield* textfield_; |
45 | 45 |
| 46 // Callback when the entry text changes. |
| 47 static gboolean OnKeyPressEventHandler( |
| 48 GtkWidget* entry, |
| 49 GdkEventKey* event, |
| 50 NativeTextfieldGtk* textfield); |
| 51 gboolean OnKeyPressEvent(GdkEventKey* event); |
| 52 static gboolean OnChangedHandler( |
| 53 GtkWidget* entry, |
| 54 NativeTextfieldGtk* textfield); |
| 55 gboolean OnChanged(); |
| 56 |
46 DISALLOW_COPY_AND_ASSIGN(NativeTextfieldGtk); | 57 DISALLOW_COPY_AND_ASSIGN(NativeTextfieldGtk); |
47 }; | 58 }; |
48 | 59 |
49 } // namespace views | 60 } // namespace views |
50 | 61 |
51 #endif // VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_GTK_H_ | 62 #endif // VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_GTK_H_ |
OLD | NEW |