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

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. It returns true if text or cursor
340 // have changed; otherwise, returns false.
341 virtual bool ExecuteTextEditCommandImpl(ui::TextEditCommand command);
sky 2017/03/09 19:31:24 Having to return whether state is modified by subc
338 342
339 private: 343 private:
340 friend class TextfieldTestApi; 344 friend class TextfieldTestApi;
341 345
342 // View overrides: 346 // View overrides:
343 // Declared final since overriding by subclasses would interfere with the 347 // Declared final since overriding by subclasses would interfere with the
344 // accounting related to the scheduled text edit command. Subclasses should 348 // accounting related to the scheduled text edit command. Subclasses should
345 // use TextfieldController::HandleKeyEvent, to intercept the key event. 349 // use TextfieldController::HandleKeyEvent, to intercept the key event.
346 bool OnKeyPressed(const ui::KeyEvent& event) final; 350 bool OnKeyPressed(const ui::KeyEvent& event) final;
347 bool OnKeyReleased(const ui::KeyEvent& event) final; 351 bool OnKeyReleased(const ui::KeyEvent& event) final;
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 533
530 // Used to bind callback functions to this object. 534 // Used to bind callback functions to this object.
531 base::WeakPtrFactory<Textfield> weak_ptr_factory_; 535 base::WeakPtrFactory<Textfield> weak_ptr_factory_;
532 536
533 DISALLOW_COPY_AND_ASSIGN(Textfield); 537 DISALLOW_COPY_AND_ASSIGN(Textfield);
534 }; 538 };
535 539
536 } // namespace views 540 } // namespace views
537 541
538 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ 542 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698