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

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

Issue 2729133005: Fix: Cursor missing in omnibox after entering a alphabet in NTP 'Search box' (Closed)
Patch Set: address comments Created 3 years, 9 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
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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 327
328 // Returns the TextfieldModel's text/cursor/selection rendering model. 328 // Returns the TextfieldModel's text/cursor/selection rendering model.
329 gfx::RenderText* GetRenderText() const; 329 gfx::RenderText* GetRenderText() const;
330 330
331 gfx::Point GetLastClickLocation() const; 331 gfx::Point GetLastClickLocation() const;
332 332
333 // Get the text from the selection clipboard. 333 // Get the text from the selection clipboard.
334 virtual base::string16 GetSelectionClipboardText() const; 334 virtual base::string16 GetSelectionClipboardText() const;
335 335
336 // Executes the given |command|. 336 // Executes the given |command|.
337 virtual void ExecuteTextEditCommand(ui::TextEditCommand command); 337 void ExecuteTextEditCommand(ui::TextEditCommand command);
338
339 // Implementation of ExecuteTextEditCommand.
340 virtual bool ExecuteTextEditCommandImpl(ui::TextEditCommand command);
sadrul 2017/03/09 01:47:38 Document the return value.
yiyix 2017/03/09 02:45:33 Done.
338 341
339 private: 342 private:
340 friend class TextfieldTestApi; 343 friend class TextfieldTestApi;
341 344
342 // View overrides: 345 // View overrides:
343 // Declared final since overriding by subclasses would interfere with the 346 // Declared final since overriding by subclasses would interfere with the
344 // accounting related to the scheduled text edit command. Subclasses should 347 // accounting related to the scheduled text edit command. Subclasses should
345 // use TextfieldController::HandleKeyEvent, to intercept the key event. 348 // use TextfieldController::HandleKeyEvent, to intercept the key event.
346 bool OnKeyPressed(const ui::KeyEvent& event) final; 349 bool OnKeyPressed(const ui::KeyEvent& event) final;
347 bool OnKeyReleased(const ui::KeyEvent& event) final; 350 bool OnKeyReleased(const ui::KeyEvent& event) final;
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 532
530 // Used to bind callback functions to this object. 533 // Used to bind callback functions to this object.
531 base::WeakPtrFactory<Textfield> weak_ptr_factory_; 534 base::WeakPtrFactory<Textfield> weak_ptr_factory_;
532 535
533 DISALLOW_COPY_AND_ASSIGN(Textfield); 536 DISALLOW_COPY_AND_ASSIGN(Textfield);
534 }; 537 };
535 538
536 } // namespace views 539 } // namespace views
537 540
538 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ 541 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698