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

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

Issue 5988010: focus reverse traversal was not working for TextfieldViews. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: explicitly forward key/focus event to TextfieldViews Created 9 years, 11 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_CONTROLS_TEXTFIELD_TEXTFIELD_H_ 5 #ifndef VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_
6 #define VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ 6 #define VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_
7 #pragma once 7 #pragma once
8 8
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 10
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 #endif 237 #endif
238 238
239 // Overridden from View: 239 // Overridden from View:
240 virtual void Layout(); 240 virtual void Layout();
241 virtual gfx::Size GetPreferredSize(); 241 virtual gfx::Size GetPreferredSize();
242 virtual bool IsFocusable() const; 242 virtual bool IsFocusable() const;
243 virtual void AboutToRequestFocusFromTabTraversal(bool reverse); 243 virtual void AboutToRequestFocusFromTabTraversal(bool reverse);
244 virtual bool SkipDefaultKeyEventProcessing(const KeyEvent& e); 244 virtual bool SkipDefaultKeyEventProcessing(const KeyEvent& e);
245 virtual void SetEnabled(bool enabled); 245 virtual void SetEnabled(bool enabled);
246 virtual void PaintFocusBorder(gfx::Canvas* canvas); 246 virtual void PaintFocusBorder(gfx::Canvas* canvas);
247 virtual bool OnKeyPressed(const views::KeyEvent& e);
248 virtual bool OnKeyReleased(const views::KeyEvent& e);
249 virtual void WillGainFocus();
250 virtual void DidGainFocus();
251 virtual void WillLoseFocus();
247 252
248 // Accessibility accessors, overridden from View: 253 // Accessibility accessors, overridden from View:
249 virtual AccessibilityTypes::Role GetAccessibleRole(); 254 virtual AccessibilityTypes::Role GetAccessibleRole();
250 virtual AccessibilityTypes::State GetAccessibleState(); 255 virtual AccessibilityTypes::State GetAccessibleState();
251 virtual std::wstring GetAccessibleValue(); 256 virtual std::wstring GetAccessibleValue();
252 257
253 protected: 258 protected:
254 virtual void Focus(); 259 virtual void Focus();
255 virtual void ViewHierarchyChanged(bool is_add, View* parent, View* child); 260 virtual void ViewHierarchyChanged(bool is_add, View* parent, View* child);
256 virtual std::string GetClassName() const; 261 virtual std::string GetClassName() const;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 320
316 // Text to display when empty. 321 // Text to display when empty.
317 string16 text_to_display_when_empty_; 322 string16 text_to_display_when_empty_;
318 323
319 DISALLOW_COPY_AND_ASSIGN(Textfield); 324 DISALLOW_COPY_AND_ASSIGN(Textfield);
320 }; 325 };
321 326
322 } // namespace views 327 } // namespace views
323 328
324 #endif // VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ 329 #endif // VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698