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

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

Issue 2554513002: Change |EnsureCaretInRect| to |EnsureCaretNotInRect|. (Closed)
Patch Set: Created 4 years 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/keyboard/keyboard_ui.cc ('k') | ui/views/controls/prefix_selector.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_PREFIX_SELECTOR_H_ 5 #ifndef UI_VIEWS_CONTROLS_PREFIX_SELECTOR_H_
6 #define UI_VIEWS_CONTROLS_PREFIX_SELECTOR_H_ 6 #define UI_VIEWS_CONTROLS_PREFIX_SELECTOR_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 bool GetCompositionTextRange(gfx::Range* range) const override; 48 bool GetCompositionTextRange(gfx::Range* range) const override;
49 bool GetSelectionRange(gfx::Range* range) const override; 49 bool GetSelectionRange(gfx::Range* range) const override;
50 bool SetSelectionRange(const gfx::Range& range) override; 50 bool SetSelectionRange(const gfx::Range& range) override;
51 bool DeleteRange(const gfx::Range& range) override; 51 bool DeleteRange(const gfx::Range& range) override;
52 bool GetTextFromRange(const gfx::Range& range, 52 bool GetTextFromRange(const gfx::Range& range,
53 base::string16* text) const override; 53 base::string16* text) const override;
54 void OnInputMethodChanged() override; 54 void OnInputMethodChanged() override;
55 bool ChangeTextDirectionAndLayoutAlignment( 55 bool ChangeTextDirectionAndLayoutAlignment(
56 base::i18n::TextDirection direction) override; 56 base::i18n::TextDirection direction) override;
57 void ExtendSelectionAndDelete(size_t before, size_t after) override; 57 void ExtendSelectionAndDelete(size_t before, size_t after) override;
58 void EnsureCaretInRect(const gfx::Rect& rect) override; 58 void EnsureCaretNotInRect(const gfx::Rect& rect) override;
59 59
60 bool IsTextEditCommandEnabled(ui::TextEditCommand command) const override; 60 bool IsTextEditCommandEnabled(ui::TextEditCommand command) const override;
61 void SetTextEditCommandForNextKeyEvent(ui::TextEditCommand command) override; 61 void SetTextEditCommandForNextKeyEvent(ui::TextEditCommand command) override;
62 62
63 private: 63 private:
64 // Invoked when text is typed. Tries to change the selection appropriately. 64 // Invoked when text is typed. Tries to change the selection appropriately.
65 void OnTextInput(const base::string16& text); 65 void OnTextInput(const base::string16& text);
66 66
67 // Returns true if the text of the node at |row| starts with |lower_text|. 67 // Returns true if the text of the node at |row| starts with |lower_text|.
68 bool TextAtRowMatchesText(int row, const base::string16& lower_text); 68 bool TextAtRowMatchesText(int row, const base::string16& lower_text);
69 69
70 // Clears |current_text_| and resets |time_of_last_key_|. 70 // Clears |current_text_| and resets |time_of_last_key_|.
71 void ClearText(); 71 void ClearText();
72 72
73 PrefixDelegate* prefix_delegate_; 73 PrefixDelegate* prefix_delegate_;
74 74
75 View* host_view_; 75 View* host_view_;
76 76
77 // Time OnTextInput() was last invoked. 77 // Time OnTextInput() was last invoked.
78 base::TimeTicks time_of_last_key_; 78 base::TimeTicks time_of_last_key_;
79 79
80 base::string16 current_text_; 80 base::string16 current_text_;
81 81
82 DISALLOW_COPY_AND_ASSIGN(PrefixSelector); 82 DISALLOW_COPY_AND_ASSIGN(PrefixSelector);
83 }; 83 };
84 84
85 } // namespace views 85 } // namespace views
86 86
87 #endif // UI_VIEWS_CONTROLS_PREFIX_SELECTOR_H_ 87 #endif // UI_VIEWS_CONTROLS_PREFIX_SELECTOR_H_
OLDNEW
« no previous file with comments | « ui/keyboard/keyboard_ui.cc ('k') | ui/views/controls/prefix_selector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698