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

Side by Side Diff: views/controls/textfield/native_textfield_views.h

Issue 7720012: Moves ownership of MenuItemView to MenuRunner as well as responbility (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit test Created 9 years, 4 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 13 matching lines...) Expand all
24 } 24 }
25 25
26 namespace gfx { 26 namespace gfx {
27 class Canvas; 27 class Canvas;
28 } 28 }
29 29
30 namespace views { 30 namespace views {
31 31
32 class FocusableBorder; 32 class FocusableBorder;
33 class KeyEvent; 33 class KeyEvent;
34 class MenuItemView;
35 class MenuModelAdapter; 34 class MenuModelAdapter;
35 class MenuRunner;
36 36
37 // A views/skia only implementation of NativeTextfieldWrapper. 37 // A views/skia only implementation of NativeTextfieldWrapper.
38 // No platform specific code is used. 38 // No platform specific code is used.
39 // Following features are not yet supported. 39 // Following features are not yet supported.
40 // * BIDI/Complex script. 40 // * BIDI/Complex script.
41 // * Support surrogate pair, or maybe we should just use UTF32 internally. 41 // * Support surrogate pair, or maybe we should just use UTF32 internally.
42 // * X selection (only if we want to support). 42 // * X selection (only if we want to support).
43 // Once completed, this will replace Textfield, NativeTextfieldWin and 43 // Once completed, this will replace Textfield, NativeTextfieldWin and
44 // NativeTextfieldGtk. 44 // NativeTextfieldGtk.
45 class VIEWS_EXPORT NativeTextfieldViews : public TouchSelectionClientView, 45 class VIEWS_EXPORT NativeTextfieldViews : public TouchSelectionClientView,
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 ScopedRunnableMethodFactory<NativeTextfieldViews> cursor_timer_; 242 ScopedRunnableMethodFactory<NativeTextfieldViews> cursor_timer_;
243 243
244 // State variables used to track double and triple clicks. 244 // State variables used to track double and triple clicks.
245 size_t aggregated_clicks_; 245 size_t aggregated_clicks_;
246 base::Time last_click_time_; 246 base::Time last_click_time_;
247 gfx::Point last_click_location_; 247 gfx::Point last_click_location_;
248 248
249 // Context menu and its content list for the textfield. 249 // Context menu and its content list for the textfield.
250 scoped_ptr<ui::SimpleMenuModel> context_menu_contents_; 250 scoped_ptr<ui::SimpleMenuModel> context_menu_contents_;
251 scoped_ptr<views::MenuModelAdapter> context_menu_delegate_; 251 scoped_ptr<views::MenuModelAdapter> context_menu_delegate_;
252 scoped_ptr<views::MenuItemView> context_menu_menu_; 252 scoped_ptr<views::MenuRunner> context_menu_runner_;
253 253
254 scoped_ptr<TouchSelectionController> touch_selection_controller_; 254 scoped_ptr<TouchSelectionController> touch_selection_controller_;
255 255
256 DISALLOW_COPY_AND_ASSIGN(NativeTextfieldViews); 256 DISALLOW_COPY_AND_ASSIGN(NativeTextfieldViews);
257 }; 257 };
258 258
259 } // namespace views 259 } // namespace views
260 260
261 #endif // VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_VIEWS_H_ 261 #endif // VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_VIEWS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698