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

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: Minor changes that were missed in last patch 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 ContentType {
141 NONE,
142 GENERIC_INPUT,
143 URL_INPUT,
144 };
145
140 #if defined(TOUCH_UI) 146 #if defined(TOUCH_UI)
141 enum TouchStatus { 147 enum TouchStatus {
142 TOUCH_STATUS_UNKNOWN = 0, // Unknown touch status. This is used to indicate 148 TOUCH_STATUS_UNKNOWN = 0, // Unknown touch status. This is used to indicate
143 // that the touch event was not handled. 149 // that the touch event was not handled.
144 TOUCH_STATUS_START, // The touch event initiated a touch sequence. 150 TOUCH_STATUS_START, // The touch event initiated a touch sequence.
145 TOUCH_STATUS_CONTINUE, // The touch event is part of a previously 151 TOUCH_STATUS_CONTINUE, // The touch event is part of a previously
146 // started touch sequence. 152 // started touch sequence.
147 TOUCH_STATUS_END, // The touch event ended the touch sequence. 153 TOUCH_STATUS_END, // The touch event ended the touch sequence.
148 TOUCH_STATUS_CANCEL // The touch event was cancelled, but didn't 154 TOUCH_STATUS_CANCEL // The touch event was cancelled, but didn't
149 // terminate the touch sequence. 155 // terminate the touch sequence.
(...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 // See VariableRowHeightScrollHelper and FixedRowHeightScrollHelper for 988 // See VariableRowHeightScrollHelper and FixedRowHeightScrollHelper for
983 // implementations of common cases. 989 // implementations of common cases.
984 virtual int GetPageScrollIncrement(ScrollView* scroll_view, 990 virtual int GetPageScrollIncrement(ScrollView* scroll_view,
985 bool is_horizontal, bool is_positive); 991 bool is_horizontal, bool is_positive);
986 virtual int GetLineScrollIncrement(ScrollView* scroll_view, 992 virtual int GetLineScrollIncrement(ScrollView* scroll_view,
987 bool is_horizontal, bool is_positive); 993 bool is_horizontal, bool is_positive);
988 994
989 // Get the theme provider from the parent widget. 995 // Get the theme provider from the parent widget.
990 ThemeProvider* GetThemeProvider() const; 996 ThemeProvider* GetThemeProvider() const;
991 997
998 // Returns the content type of this view.
999 virtual ContentType GetContentType();
oshima 2011/01/27 23:39:09 const
varunjain 2011/01/28 01:55:57 Done.
1000
992 protected: 1001 protected:
993 // Returns whether this view can accept focus. 1002 // Returns whether this view can accept focus.
994 // A view can accept focus if it's enabled, focusable and visible. 1003 // 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. 1004 // This method is intended for views to use when calculating preferred size.
996 // The FocusManager and other places use IsFocusableInRootView. 1005 // The FocusManager and other places use IsFocusableInRootView.
997 virtual bool IsFocusable() const; 1006 virtual bool IsFocusable() const;
998 1007
999 // Called when the UI theme has changed, overriding allows individual Views to 1008 // Called when the UI theme has changed, overriding allows individual Views to
1000 // do special cleanup and processing (such as dropping resource caches). 1009 // do special cleanup and processing (such as dropping resource caches).
1001 // To dispatch a theme changed notification, call 1010 // 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 1354 // 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. 1355 // button on hover. This value is used if the OS doesn't supply one.
1347 static const int kShowFolderDropMenuDelay; 1356 static const int kShowFolderDropMenuDelay;
1348 1357
1349 DISALLOW_COPY_AND_ASSIGN(View); 1358 DISALLOW_COPY_AND_ASSIGN(View);
1350 }; 1359 };
1351 1360
1352 } // namespace views 1361 } // namespace views
1353 1362
1354 #endif // VIEWS_VIEW_H_ 1363 #endif // VIEWS_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698