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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 // Context menu and its content list for the textfield. | 234 // Context menu and its content list for the textfield. |
237 scoped_ptr<ui::SimpleMenuModel> context_menu_contents_; | 235 scoped_ptr<ui::SimpleMenuModel> context_menu_contents_; |
238 scoped_ptr<Menu2> context_menu_menu_; | 236 scoped_ptr<Menu2> context_menu_menu_; |
239 | 237 |
240 DISALLOW_COPY_AND_ASSIGN(NativeTextfieldViews); | 238 DISALLOW_COPY_AND_ASSIGN(NativeTextfieldViews); |
241 }; | 239 }; |
242 | 240 |
243 } // namespace views | 241 } // namespace views |
244 | 242 |
245 #endif // VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_VIEWS_H_ | 243 #endif // VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_VIEWS_H_ |
OLD | NEW |