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

Side by Side Diff: views/view.h

Issue 6384004: Browser should get notified if a views textfield changes focus. In addition, (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Re-did CL according to discussions Created 9 years, 10 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_VIEW_H_ 5 #ifndef VIEWS_VIEW_H_
6 #define VIEWS_VIEW_H_ 6 #define VIEWS_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 10
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 class View : public AcceleratorTarget { 130 class View : public AcceleratorTarget {
131 public: 131 public:
132 // Used in the versions of GetBounds() and x() that take a transformation 132 // Used in the versions of GetBounds() and x() that take a transformation
133 // parameter in order to determine whether or not to take into account the 133 // parameter in order to determine whether or not to take into account the
134 // mirroring setting of the View when returning bounds positions. 134 // mirroring setting of the View when returning bounds positions.
135 enum PositionMirroringSettings { 135 enum PositionMirroringSettings {
136 IGNORE_MIRRORING_TRANSFORMATION = 0, 136 IGNORE_MIRRORING_TRANSFORMATION = 0,
137 APPLY_MIRRORING_TRANSFORMATION 137 APPLY_MIRRORING_TRANSFORMATION
138 }; 138 };
139 139
140 enum VirtualKeyboardType {
rjkroege 2011/01/27 00:04:22 I think that this does not belong here. The extens
varunjain 2011/01/27 00:19:34 moved NO_KEYBOARD I thought we decided in the disc
141 REGULAR_KEYBOARD,
142 PASSWORD_KEYBOARD,
143 DATE_KEYBOARD,
144 EMAIL_KEYBOARD,
145 URL_KEYBOARD,
146 NO_KEYBOARD,
147 };
148
140 #if defined(TOUCH_UI) 149 #if defined(TOUCH_UI)
141 enum TouchStatus { 150 enum TouchStatus {
142 TOUCH_STATUS_UNKNOWN = 0, // Unknown touch status. This is used to indicate 151 TOUCH_STATUS_UNKNOWN = 0, // Unknown touch status. This is used to indicate
143 // that the touch event was not handled. 152 // that the touch event was not handled.
144 TOUCH_STATUS_START, // The touch event initiated a touch sequence. 153 TOUCH_STATUS_START, // The touch event initiated a touch sequence.
145 TOUCH_STATUS_CONTINUE, // The touch event is part of a previously 154 TOUCH_STATUS_CONTINUE, // The touch event is part of a previously
146 // started touch sequence. 155 // started touch sequence.
147 TOUCH_STATUS_END, // The touch event ended the touch sequence. 156 TOUCH_STATUS_END, // The touch event ended the touch sequence.
148 TOUCH_STATUS_CANCEL // The touch event was cancelled, but didn't 157 TOUCH_STATUS_CANCEL // The touch event was cancelled, but didn't
149 // terminate the touch sequence. 158 // terminate the touch sequence.
(...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 // See VariableRowHeightScrollHelper and FixedRowHeightScrollHelper for 991 // See VariableRowHeightScrollHelper and FixedRowHeightScrollHelper for
983 // implementations of common cases. 992 // implementations of common cases.
984 virtual int GetPageScrollIncrement(ScrollView* scroll_view, 993 virtual int GetPageScrollIncrement(ScrollView* scroll_view,
985 bool is_horizontal, bool is_positive); 994 bool is_horizontal, bool is_positive);
986 virtual int GetLineScrollIncrement(ScrollView* scroll_view, 995 virtual int GetLineScrollIncrement(ScrollView* scroll_view,
987 bool is_horizontal, bool is_positive); 996 bool is_horizontal, bool is_positive);
988 997
989 // Get the theme provider from the parent widget. 998 // Get the theme provider from the parent widget.
990 ThemeProvider* GetThemeProvider() const; 999 ThemeProvider* GetThemeProvider() const;
991 1000
1001 // Returns the virtual keyboard type this view requires.
1002 virtual VirtualKeyboardType GetVirtualKeyboardType();
1003
992 protected: 1004 protected:
993 // Returns whether this view can accept focus. 1005 // Returns whether this view can accept focus.
994 // A view can accept focus if it's enabled, focusable and visible. 1006 // A view can accept focus if it's enabled, focusable and visible.
995 // This method is intended for views to use when calculating preferred size. 1007 // This method is intended for views to use when calculating preferred size.
996 // The FocusManager and other places use IsFocusableInRootView. 1008 // The FocusManager and other places use IsFocusableInRootView.
997 virtual bool IsFocusable() const; 1009 virtual bool IsFocusable() const;
998 1010
999 // Called when the UI theme has changed, overriding allows individual Views to 1011 // Called when the UI theme has changed, overriding allows individual Views to
1000 // do special cleanup and processing (such as dropping resource caches). 1012 // do special cleanup and processing (such as dropping resource caches).
1001 // To dispatch a theme changed notification, call 1013 // To dispatch a theme changed notification, call
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
1345 // The default value for how long to wait (in ms) before showing a menu 1357 // The default value for how long to wait (in ms) before showing a menu
1346 // button on hover. This value is used if the OS doesn't supply one. 1358 // button on hover. This value is used if the OS doesn't supply one.
1347 static const int kShowFolderDropMenuDelay; 1359 static const int kShowFolderDropMenuDelay;
1348 1360
1349 DISALLOW_COPY_AND_ASSIGN(View); 1361 DISALLOW_COPY_AND_ASSIGN(View);
1350 }; 1362 };
1351 1363
1352 } // namespace views 1364 } // namespace views
1353 1365
1354 #endif // VIEWS_VIEW_H_ 1366 #endif // VIEWS_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698