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

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

Issue 1855423003: Interpret '?' and Ctrl-K or Ctrl-E as putting omnibox in keyword search mode for Default Search Pro… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase, make '?' enter keyword mode on nonempty inputs Created 4 years, 7 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 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 void OpenMatch(const AutocompleteMatch& match, 55 void OpenMatch(const AutocompleteMatch& match,
56 WindowOpenDisposition disposition, 56 WindowOpenDisposition disposition,
57 const GURL& alternate_nav_url, 57 const GURL& alternate_nav_url,
58 const base::string16& pasted_text, 58 const base::string16& pasted_text,
59 size_t selected_line) override; 59 size_t selected_line) override;
60 base::string16 GetText() const override; 60 base::string16 GetText() const override;
61 void SetWindowTextAndCaretPos(const base::string16& text, 61 void SetWindowTextAndCaretPos(const base::string16& text,
62 size_t caret_pos, 62 size_t caret_pos,
63 bool update_popup, 63 bool update_popup,
64 bool notify_text_changed) override; 64 bool notify_text_changed) override;
65 void SetForcedQuery() override; 65 void EnterKeywordModeForDefaultSearchProvider() override;
66 bool IsSelectAll() const override; 66 bool IsSelectAll() const override;
67 bool DeleteAtEndPressed() override; 67 bool DeleteAtEndPressed() override;
68 void GetSelectionBounds(base::string16::size_type* start, 68 void GetSelectionBounds(base::string16::size_type* start,
69 base::string16::size_type* end) const override; 69 base::string16::size_type* end) const override;
70 void SelectAll(bool reversed) override; 70 void SelectAll(bool reversed) override;
71 void RevertAll() override; 71 void RevertAll() override;
72 void UpdatePopup() override; 72 void UpdatePopup() override;
73 void CloseOmniboxPopup() override; 73 void CloseOmniboxPopup() override;
74 void SetFocus() override; 74 void SetFocus() override;
75 void ApplyCaretVisibility() override; 75 void ApplyCaretVisibility() override;
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 AutocompleteTextField* field_; // owned by tab controller 200 AutocompleteTextField* field_; // owned by tab controller
201 201
202 // Selection at the point where the user started using the 202 // Selection at the point where the user started using the
203 // arrows to move around in the popup. 203 // arrows to move around in the popup.
204 NSRange saved_temporary_selection_; 204 NSRange saved_temporary_selection_;
205 205
206 // Tracking state before and after a possible change for reporting 206 // Tracking state before and after a possible change for reporting
207 // to model_. 207 // to model_.
208 NSRange selection_before_change_; 208 NSRange selection_before_change_;
209 base::string16 text_before_change_; 209 base::string16 text_before_change_;
210 base::string16 keyword_before_change_;
211 bool is_keyword_selected_before_change_;
210 NSRange marked_range_before_change_; 212 NSRange marked_range_before_change_;
211 213
212 // Was delete pressed? 214 // Was delete pressed?
213 bool delete_was_pressed_; 215 bool delete_was_pressed_;
214 216
215 // 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?
216 bool delete_at_end_pressed_; 218 bool delete_at_end_pressed_;
217 219
218 base::string16 suggest_text_; 220 base::string16 suggest_text_;
219 221
220 // State used to coalesce changes to text and selection to avoid drawing 222 // State used to coalesce changes to text and selection to avoid drawing
221 // transient state. 223 // transient state.
222 bool in_coalesced_update_block_; 224 bool in_coalesced_update_block_;
223 bool do_coalesced_text_update_; 225 bool do_coalesced_text_update_;
224 base::string16 coalesced_text_update_; 226 base::string16 coalesced_text_update_;
225 bool do_coalesced_range_update_; 227 bool do_coalesced_range_update_;
226 NSRange coalesced_range_update_; 228 NSRange coalesced_range_update_;
227 229
228 // The time of the first character insert operation that has not yet been 230 // The time of the first character insert operation that has not yet been
229 // painted. Used to measure omnibox responsiveness with a histogram. 231 // painted. Used to measure omnibox responsiveness with a histogram.
230 base::TimeTicks insert_char_time_; 232 base::TimeTicks insert_char_time_;
231 233
232 DISALLOW_COPY_AND_ASSIGN(OmniboxViewMac); 234 DISALLOW_COPY_AND_ASSIGN(OmniboxViewMac);
233 }; 235 };
234 236
235 #endif // CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_VIEW_MAC_H_ 237 #endif // CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_VIEW_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698