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

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

Issue 2413223003: Views:: Make Labels support text selection. (Closed)
Patch Set: Address comments. 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
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 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 // View overrides: 345 // View overrides:
346 // Declared final since overriding by subclasses would interfere with the 346 // Declared final since overriding by subclasses would interfere with the
347 // accounting related to the scheduled text edit command. Subclasses should 347 // accounting related to the scheduled text edit command. Subclasses should
348 // use TextfieldController::HandleKeyEvent, to intercept the key event. 348 // use TextfieldController::HandleKeyEvent, to intercept the key event.
349 bool OnKeyPressed(const ui::KeyEvent& event) final; 349 bool OnKeyPressed(const ui::KeyEvent& event) final;
350 bool OnKeyReleased(const ui::KeyEvent& event) final; 350 bool OnKeyReleased(const ui::KeyEvent& event) final;
351 351
352 // SelectionControllerDelegate overrides: 352 // SelectionControllerDelegate overrides:
353 gfx::RenderText* GetRenderTextForSelectionController() override; 353 gfx::RenderText* GetRenderTextForSelectionController() override;
354 bool IsReadOnly() const override; 354 bool IsReadOnly() const override;
355 bool SupportsDrag() const override;
355 void SetTextBeingDragged(bool value) override; 356 void SetTextBeingDragged(bool value) override;
356 int GetViewHeight() const override; 357 int GetViewHeight() const override;
357 int GetViewWidth() const override; 358 int GetViewWidth() const override;
358 int GetDragSelectionDelay() const override; 359 int GetDragSelectionDelay() const override;
359 void OnBeforePointerAction() override; 360 void OnBeforePointerAction() override;
360 void OnAfterPointerAction(bool text_changed, bool selection_changed) override; 361 void OnAfterPointerAction(bool text_changed, bool selection_changed) override;
361 // Callers within Textfield should call UpdateAfterChange depending on the 362 // Callers within Textfield should call UpdateAfterChange depending on the
362 // return value. 363 // return value.
363 bool PasteSelectionClipboard() override; 364 bool PasteSelectionClipboard() override;
364 void UpdateSelectionClipboard() override; 365 void UpdateSelectionClipboard() override;
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 537
537 // Used to bind callback functions to this object. 538 // Used to bind callback functions to this object.
538 base::WeakPtrFactory<Textfield> weak_ptr_factory_; 539 base::WeakPtrFactory<Textfield> weak_ptr_factory_;
539 540
540 DISALLOW_COPY_AND_ASSIGN(Textfield); 541 DISALLOW_COPY_AND_ASSIGN(Textfield);
541 }; 542 };
542 543
543 } // namespace views 544 } // namespace views
544 545
545 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ 546 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698