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

Side by Side Diff: chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h

Issue 2510373003: Cleanup: Remove "gray text" logic from Omnibox (Closed)
Patch Set: review (mac) 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
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 CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_VIEW_MAC_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_VIEW_MAC_H_
6 #define CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_VIEW_MAC_H_ 6 #define CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_VIEW_MAC_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 10
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 bool save_original_selection, 82 bool save_original_selection,
83 bool notify_text_changed) override; 83 bool notify_text_changed) override;
84 bool OnInlineAutocompleteTextMaybeChanged(const base::string16& display_text, 84 bool OnInlineAutocompleteTextMaybeChanged(const base::string16& display_text,
85 size_t user_text_length) override; 85 size_t user_text_length) override;
86 void OnInlineAutocompleteTextCleared() override; 86 void OnInlineAutocompleteTextCleared() override;
87 void OnRevertTemporaryText() override; 87 void OnRevertTemporaryText() override;
88 void OnBeforePossibleChange() override; 88 void OnBeforePossibleChange() override;
89 bool OnAfterPossibleChange(bool allow_keyword_ui_change) override; 89 bool OnAfterPossibleChange(bool allow_keyword_ui_change) override;
90 gfx::NativeView GetNativeView() const override; 90 gfx::NativeView GetNativeView() const override;
91 gfx::NativeView GetRelativeWindowForPopup() const override; 91 gfx::NativeView GetRelativeWindowForPopup() const override;
92 void SetGrayTextAutocompletion(const base::string16& input) override;
93 base::string16 GetGrayTextAutocompletion() const override;
94 int GetTextWidth() const override; 92 int GetTextWidth() const override;
95 int GetWidth() const override; 93 int GetWidth() const override;
96 bool IsImeComposing() const override; 94 bool IsImeComposing() const override;
97 95
98 // Implement the AutocompleteTextFieldObserver interface. 96 // Implement the AutocompleteTextFieldObserver interface.
99 NSRange SelectionRangeForProposedRange(NSRange proposed_range) override; 97 NSRange SelectionRangeForProposedRange(NSRange proposed_range) override;
100 void OnControlKeyChanged(bool pressed) override; 98 void OnControlKeyChanged(bool pressed) override;
101 bool CanCopy() override; 99 bool CanCopy() override;
102 base::scoped_nsobject<NSPasteboardItem> CreatePasteboardItem() override; 100 base::scoped_nsobject<NSPasteboardItem> CreatePasteboardItem() override;
103 void CopyToPasteboard(NSPasteboard* pboard) override; 101 void CopyToPasteboard(NSPasteboard* pboard) override;
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 // to model_. 210 // to model_.
213 State state_before_change_; 211 State state_before_change_;
214 NSRange marked_range_before_change_; 212 NSRange marked_range_before_change_;
215 213
216 // Was delete pressed? 214 // Was delete pressed?
217 bool delete_was_pressed_; 215 bool delete_was_pressed_;
218 216
219 // Was the delete key pressed with an empty selection at the end of the edit? 217 // Was the delete key pressed with an empty selection at the end of the edit?
220 bool delete_at_end_pressed_; 218 bool delete_at_end_pressed_;
221 219
222 base::string16 suggest_text_;
223
224 // State used to coalesce changes to text and selection to avoid drawing 220 // State used to coalesce changes to text and selection to avoid drawing
225 // transient state. 221 // transient state.
226 bool in_coalesced_update_block_; 222 bool in_coalesced_update_block_;
227 bool do_coalesced_text_update_; 223 bool do_coalesced_text_update_;
228 base::string16 coalesced_text_update_; 224 base::string16 coalesced_text_update_;
229 bool do_coalesced_range_update_; 225 bool do_coalesced_range_update_;
230 NSRange coalesced_range_update_; 226 NSRange coalesced_range_update_;
231 227
232 // The time of the first character insert operation that has not yet been 228 // The time of the first character insert operation that has not yet been
233 // painted. Used to measure omnibox responsiveness with a histogram. 229 // painted. Used to measure omnibox responsiveness with a histogram.
234 base::TimeTicks insert_char_time_; 230 base::TimeTicks insert_char_time_;
235 231
236 // The time when OnBeforeDrawRect() was called. 232 // The time when OnBeforeDrawRect() was called.
237 base::TimeTicks draw_rect_start_time_; 233 base::TimeTicks draw_rect_start_time_;
238 234
239 DISALLOW_COPY_AND_ASSIGN(OmniboxViewMac); 235 DISALLOW_COPY_AND_ASSIGN(OmniboxViewMac);
240 }; 236 };
241 237
242 #endif // CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_VIEW_MAC_H_ 238 #endif // CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_VIEW_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698