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

Unified Diff: views/controls/textfield/textfield.h

Issue 5857002: no native implementation of Textfield. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix comment Created 10 years 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 | « views/controls/textfield/native_textfield_views_unittest.cc ('k') | views/controls/textfield/textfield.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/textfield/textfield.h
diff --git a/views/controls/textfield/textfield.h b/views/controls/textfield/textfield.h
index d171eb5b5edaa2a2aba9358a7b93730296d01353..9dd1ee9febfdaf3aadd6f65e16d496157f1bfc1a 100644
--- a/views/controls/textfield/textfield.h
+++ b/views/controls/textfield/textfield.h
@@ -60,10 +60,11 @@ class Textfield : public View {
int repeat_count() const { return repeat_count_; }
unsigned int flags() const { return flags_; }
#else
- explicit Keystroke(GdkEventKey* event)
- : event_(*event) {
+ explicit Keystroke(const KeyEvent* event)
+ : event_(event) {
}
- const GdkEventKey* event() const { return &event_; }
+ const KeyEvent& key_event() const { return *event_;};
+ const GdkEventKey* event() const { return event_->native_event(); }
#endif
app::KeyboardCode GetKeyboardCode() const;
bool IsControlHeld() const;
@@ -76,7 +77,7 @@ class Textfield : public View {
int repeat_count_;
unsigned int flags_;
#else
- GdkEventKey event_;
+ const KeyEvent* event_;
#endif
DISALLOW_COPY_AND_ASSIGN(Keystroke);
@@ -169,7 +170,7 @@ class Textfield : public View {
void UseDefaultBackgroundColor();
// Gets/Sets the font used when rendering the text within the Textfield.
- gfx::Font font() const { return font_; }
+ const gfx::Font& font() const { return font_; }
void SetFont(const gfx::Font& font);
// Sets the left and right margin (in pixels) within the text box. On Windows
@@ -230,6 +231,9 @@ class Textfield : public View {
gfx::NativeView GetTestingHandle() const {
return native_wrapper_ ? native_wrapper_->GetTestingHandle() : NULL;
}
+ NativeTextfieldWrapper* native_wrapper() const {
+ return native_wrapper_;
+ }
#endif
// Overridden from View:
« no previous file with comments | « views/controls/textfield/native_textfield_views_unittest.cc ('k') | views/controls/textfield/textfield.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698