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

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

Issue 2399603002: views: don't send OnKeypressUnhandled for all keys (Closed)
Patch Set: OnKeypressUnhandled -> OnEditFailed Created 4 years, 2 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
« no previous file with comments | « no previous file | ui/views/controls/textfield/textfield.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ 5 #ifndef UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_
6 #define UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ 6 #define UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 396
397 void CreateTouchSelectionControllerAndNotifyIt(); 397 void CreateTouchSelectionControllerAndNotifyIt();
398 398
399 // Updates the selection clipboard to any non-empty text selection for a non- 399 // Updates the selection clipboard to any non-empty text selection for a non-
400 // password textfield. 400 // password textfield.
401 void UpdateSelectionClipboard() const; 401 void UpdateSelectionClipboard() const;
402 402
403 // Pastes the selection clipboard for the specified mouse event. 403 // Pastes the selection clipboard for the specified mouse event.
404 void PasteSelectionClipboard(const ui::MouseEvent& event); 404 void PasteSelectionClipboard(const ui::MouseEvent& event);
405 405
406 // Called whenever a keypress is unhandled for any reason, including failing 406 // Called when editing a textfield fails because the textfield is readonly.
407 // to insert text into a readonly text field. 407 void OnEditFailed();
408 void OnKeypressUnhandled();
409 408
410 // Returns true if an insertion cursor should be visible (a vertical bar, 409 // Returns true if an insertion cursor should be visible (a vertical bar,
411 // placed at the point new text will be inserted). 410 // placed at the point new text will be inserted).
412 bool ShouldShowCursor() const; 411 bool ShouldShowCursor() const;
413 412
414 // Returns true if an insertion cursor should be visible and blinking. 413 // Returns true if an insertion cursor should be visible and blinking.
415 bool ShouldBlinkCursor() const; 414 bool ShouldBlinkCursor() const;
416 415
417 // Starts and stops blinking the cursor, respectively. These are both 416 // Starts and stops blinking the cursor, respectively. These are both
418 // idempotent if the cursor is already blinking/not blinking. 417 // idempotent if the cursor is already blinking/not blinking.
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 517
519 // Used to bind callback functions to this object. 518 // Used to bind callback functions to this object.
520 base::WeakPtrFactory<Textfield> weak_ptr_factory_; 519 base::WeakPtrFactory<Textfield> weak_ptr_factory_;
521 520
522 DISALLOW_COPY_AND_ASSIGN(Textfield); 521 DISALLOW_COPY_AND_ASSIGN(Textfield);
523 }; 522 };
524 523
525 } // namespace views 524 } // namespace views
526 525
527 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ 526 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_
OLDNEW
« no previous file with comments | « no previous file | ui/views/controls/textfield/textfield.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698