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

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

Issue 2413223003: Views:: Make Labels support text selection. (Closed)
Patch Set: Rebase Created 4 years, 1 month 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 | « ui/views/controls/link.cc ('k') | 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 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 // View overrides: 346 // View overrides:
347 // Declared final since overriding by subclasses would interfere with the 347 // Declared final since overriding by subclasses would interfere with the
348 // accounting related to the scheduled text edit command. Subclasses should 348 // accounting related to the scheduled text edit command. Subclasses should
349 // use TextfieldController::HandleKeyEvent, to intercept the key event. 349 // use TextfieldController::HandleKeyEvent, to intercept the key event.
350 bool OnKeyPressed(const ui::KeyEvent& event) final; 350 bool OnKeyPressed(const ui::KeyEvent& event) final;
351 bool OnKeyReleased(const ui::KeyEvent& event) final; 351 bool OnKeyReleased(const ui::KeyEvent& event) final;
352 352
353 // SelectionControllerDelegate overrides: 353 // SelectionControllerDelegate overrides:
354 gfx::RenderText* GetRenderTextForSelectionController() override; 354 gfx::RenderText* GetRenderTextForSelectionController() override;
355 bool IsReadOnly() const override; 355 bool IsReadOnly() const override;
356 bool SupportsDrag() const override;
356 void SetTextBeingDragged(bool value) override; 357 void SetTextBeingDragged(bool value) override;
357 int GetViewHeight() const override; 358 int GetViewHeight() const override;
358 int GetViewWidth() const override; 359 int GetViewWidth() const override;
359 int GetDragSelectionDelay() const override; 360 int GetDragSelectionDelay() const override;
360 void OnBeforePointerAction() override; 361 void OnBeforePointerAction() override;
361 void OnAfterPointerAction(bool text_changed, bool selection_changed) override; 362 void OnAfterPointerAction(bool text_changed, bool selection_changed) override;
362 // Callers within Textfield should call UpdateAfterChange depending on the 363 // Callers within Textfield should call UpdateAfterChange depending on the
363 // return value. 364 // return value.
364 bool PasteSelectionClipboard() override; 365 bool PasteSelectionClipboard() override;
365 void UpdateSelectionClipboard() override; 366 void UpdateSelectionClipboard() override;
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 530
530 // Used to bind callback functions to this object. 531 // Used to bind callback functions to this object.
531 base::WeakPtrFactory<Textfield> weak_ptr_factory_; 532 base::WeakPtrFactory<Textfield> weak_ptr_factory_;
532 533
533 DISALLOW_COPY_AND_ASSIGN(Textfield); 534 DISALLOW_COPY_AND_ASSIGN(Textfield);
534 }; 535 };
535 536
536 } // namespace views 537 } // namespace views
537 538
538 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ 539 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_
OLDNEW
« no previous file with comments | « ui/views/controls/link.cc ('k') | ui/views/controls/textfield/textfield.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698