| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_TEXTFIELD_H_ | 5 #ifndef VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ |
| 6 #define VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ | 6 #define VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 #if !defined(OS_LINUX) | 24 #if !defined(OS_LINUX) |
| 25 #include "base/logging.h" | 25 #include "base/logging.h" |
| 26 #endif | 26 #endif |
| 27 | 27 |
| 28 namespace gfx { | 28 namespace gfx { |
| 29 struct StyleRange; | 29 struct StyleRange; |
| 30 } // namespace gfx | 30 } // namespace gfx |
| 31 | 31 |
| 32 namespace ui { | 32 namespace ui { |
| 33 class Range; | 33 class Range; |
| 34 class TextInputClient; |
| 34 } // namespace ui | 35 } // namespace ui |
| 35 | 36 |
| 36 namespace views { | 37 namespace views { |
| 37 | 38 |
| 38 class KeyEvent; | 39 class KeyEvent; |
| 39 class TextfieldController; | 40 class TextfieldController; |
| 40 | 41 |
| 41 // This class implements a View that wraps a native text (edit) field. | 42 // This class implements a View that wraps a native text (edit) field. |
| 42 class VIEWS_EXPORT Textfield : public View { | 43 class VIEWS_EXPORT Textfield : public View { |
| 43 public: | 44 public: |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 virtual void AboutToRequestFocusFromTabTraversal(bool reverse) OVERRIDE; | 229 virtual void AboutToRequestFocusFromTabTraversal(bool reverse) OVERRIDE; |
| 229 virtual bool SkipDefaultKeyEventProcessing(const KeyEvent& e) OVERRIDE; | 230 virtual bool SkipDefaultKeyEventProcessing(const KeyEvent& e) OVERRIDE; |
| 230 virtual void OnEnabledChanged() OVERRIDE; | 231 virtual void OnEnabledChanged() OVERRIDE; |
| 231 virtual void OnPaintBackground(gfx::Canvas* canvas) OVERRIDE; | 232 virtual void OnPaintBackground(gfx::Canvas* canvas) OVERRIDE; |
| 232 virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE; | 233 virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE; |
| 233 virtual bool OnKeyPressed(const views::KeyEvent& e) OVERRIDE; | 234 virtual bool OnKeyPressed(const views::KeyEvent& e) OVERRIDE; |
| 234 virtual bool OnKeyReleased(const views::KeyEvent& e) OVERRIDE; | 235 virtual bool OnKeyReleased(const views::KeyEvent& e) OVERRIDE; |
| 235 virtual void OnFocus() OVERRIDE; | 236 virtual void OnFocus() OVERRIDE; |
| 236 virtual void OnBlur() OVERRIDE; | 237 virtual void OnBlur() OVERRIDE; |
| 237 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; | 238 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; |
| 238 virtual TextInputClient* GetTextInputClient() OVERRIDE; | 239 virtual ui::TextInputClient* GetTextInputClient() OVERRIDE; |
| 239 | 240 |
| 240 protected: | 241 protected: |
| 241 virtual void ViewHierarchyChanged(bool is_add, View* parent, | 242 virtual void ViewHierarchyChanged(bool is_add, View* parent, |
| 242 View* child) OVERRIDE; | 243 View* child) OVERRIDE; |
| 243 virtual std::string GetClassName() const OVERRIDE; | 244 virtual std::string GetClassName() const OVERRIDE; |
| 244 | 245 |
| 245 // The object that actually implements the native text field. | 246 // The object that actually implements the native text field. |
| 246 NativeTextfieldWrapper* native_wrapper_; | 247 NativeTextfieldWrapper* native_wrapper_; |
| 247 | 248 |
| 248 private: | 249 private: |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 | 306 |
| 306 // The input type of this text field. | 307 // The input type of this text field. |
| 307 ui::TextInputType text_input_type_; | 308 ui::TextInputType text_input_type_; |
| 308 | 309 |
| 309 DISALLOW_COPY_AND_ASSIGN(Textfield); | 310 DISALLOW_COPY_AND_ASSIGN(Textfield); |
| 310 }; | 311 }; |
| 311 | 312 |
| 312 } // namespace views | 313 } // namespace views |
| 313 | 314 |
| 314 #endif // VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ | 315 #endif // VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ |
| OLD | NEW |