| 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_NATIVE_TEXTFIELD_VIEWS_H_ | 5 #ifndef VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_VIEWS_H_ |
| 6 #define VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_VIEWS_H_ | 6 #define VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_VIEWS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/string16.h" | 9 #include "base/string16.h" |
| 10 #include "base/task.h" | 10 #include "base/task.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 // * Undo/Redo | 40 // * Undo/Redo |
| 41 class NativeTextfieldViews : public views::View, | 41 class NativeTextfieldViews : public views::View, |
| 42 public views::ContextMenuController, | 42 public views::ContextMenuController, |
| 43 public NativeTextfieldWrapper, | 43 public NativeTextfieldWrapper, |
| 44 public ui::SimpleMenuModel::Delegate { | 44 public ui::SimpleMenuModel::Delegate { |
| 45 public: | 45 public: |
| 46 explicit NativeTextfieldViews(Textfield* parent); | 46 explicit NativeTextfieldViews(Textfield* parent); |
| 47 ~NativeTextfieldViews(); | 47 ~NativeTextfieldViews(); |
| 48 | 48 |
| 49 // views::View overrides: | 49 // views::View overrides: |
| 50 virtual bool OnMousePressed(const views::MouseEvent& e) OVERRIDE; | 50 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; |
| 51 virtual bool OnMouseDragged(const views::MouseEvent& e) OVERRIDE; | 51 virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE; |
| 52 virtual void OnMouseReleased(const views::MouseEvent& e, | 52 virtual bool OnKeyPressed(const views::KeyEvent& event) OVERRIDE; |
| 53 bool canceled) OVERRIDE; | 53 virtual bool OnKeyReleased(const views::KeyEvent& event) OVERRIDE; |
| 54 virtual bool OnKeyPressed(const views::KeyEvent& e) OVERRIDE; | |
| 55 virtual bool OnKeyReleased(const views::KeyEvent& e) OVERRIDE; | |
| 56 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 54 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
| 57 virtual void OnFocus() OVERRIDE; | 55 virtual void OnFocus() OVERRIDE; |
| 58 virtual void OnBlur() OVERRIDE; | 56 virtual void OnBlur() OVERRIDE; |
| 59 virtual gfx::NativeCursor GetCursorForPoint(ui::EventType event_type, | 57 virtual gfx::NativeCursor GetCursorForPoint(ui::EventType event_type, |
| 60 const gfx::Point& p) OVERRIDE; | 58 const gfx::Point& p) OVERRIDE; |
| 61 | 59 |
| 62 // views::ContextMenuController overrides: | 60 // views::ContextMenuController overrides: |
| 63 virtual void ShowContextMenuForView(View* source, | 61 virtual void ShowContextMenuForView(View* source, |
| 64 const gfx::Point& p, | 62 const gfx::Point& p, |
| 65 bool is_mouse_gesture) OVERRIDE; | 63 bool is_mouse_gesture) OVERRIDE; |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 // Context menu and its content list for the textfield. | 228 // Context menu and its content list for the textfield. |
| 231 scoped_ptr<ui::SimpleMenuModel> context_menu_contents_; | 229 scoped_ptr<ui::SimpleMenuModel> context_menu_contents_; |
| 232 scoped_ptr<Menu2> context_menu_menu_; | 230 scoped_ptr<Menu2> context_menu_menu_; |
| 233 | 231 |
| 234 DISALLOW_COPY_AND_ASSIGN(NativeTextfieldViews); | 232 DISALLOW_COPY_AND_ASSIGN(NativeTextfieldViews); |
| 235 }; | 233 }; |
| 236 | 234 |
| 237 } // namespace views | 235 } // namespace views |
| 238 | 236 |
| 239 #endif // VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_VIEWS_H_ | 237 #endif // VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_VIEWS_H_ |
| OLD | NEW |