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

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

Issue 2342343003: views: provide feedback when editing fails (Closed)
Patch Set: OnEditFailed -> OnKeypressUnhandled Created 4 years, 3 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 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 void RevealPasswordChar(int index); 385 void RevealPasswordChar(int index);
386 386
387 void CreateTouchSelectionControllerAndNotifyIt(); 387 void CreateTouchSelectionControllerAndNotifyIt();
388 388
389 // Updates the selection clipboard to any non-empty text selection. 389 // Updates the selection clipboard to any non-empty text selection.
390 void UpdateSelectionClipboard() const; 390 void UpdateSelectionClipboard() const;
391 391
392 // Pastes the selection clipboard for the specified mouse event. 392 // Pastes the selection clipboard for the specified mouse event.
393 void PasteSelectionClipboard(const ui::MouseEvent& event); 393 void PasteSelectionClipboard(const ui::MouseEvent& event);
394 394
395 // Called whenever a keypress is unhandled for any reason, including failing
396 // to insert text into a readonly text field.
397 void OnKeypressUnhandled();
398
395 // The text model. 399 // The text model.
396 std::unique_ptr<TextfieldModel> model_; 400 std::unique_ptr<TextfieldModel> model_;
397 401
398 // This is the current listener for events from this Textfield. 402 // This is the current listener for events from this Textfield.
399 TextfieldController* controller_; 403 TextfieldController* controller_;
400 404
401 // An edit command to execute on the next key event. When set to a valid 405 // An edit command to execute on the next key event. When set to a valid
402 // value, the key event is still passed to |controller_|, but otherwise 406 // value, the key event is still passed to |controller_|, but otherwise
403 // ignored in favor of the edit command. Set via 407 // ignored in favor of the edit command. Set via
404 // SetTextEditCommandForNextKeyEvent() during dispatch of that key event (see 408 // SetTextEditCommandForNextKeyEvent() during dispatch of that key event (see
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 492
489 // Used to bind callback functions to this object. 493 // Used to bind callback functions to this object.
490 base::WeakPtrFactory<Textfield> weak_ptr_factory_; 494 base::WeakPtrFactory<Textfield> weak_ptr_factory_;
491 495
492 DISALLOW_COPY_AND_ASSIGN(Textfield); 496 DISALLOW_COPY_AND_ASSIGN(Textfield);
493 }; 497 };
494 498
495 } // namespace views 499 } // namespace views
496 500
497 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ 501 #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