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

Side by Side Diff: chrome/browser/ui/views/omnibox/omnibox_view_views.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: Add includes for mac tests Created 4 years, 6 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_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_
6 #define CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ 6 #define CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 void OnTabChanged(const content::WebContents* web_contents); 82 void OnTabChanged(const content::WebContents* web_contents);
83 83
84 // Called to clear the saved state for |web_contents|. 84 // Called to clear the saved state for |web_contents|.
85 void ResetTabState(content::WebContents* web_contents); 85 void ResetTabState(content::WebContents* web_contents);
86 86
87 // OmniboxView: 87 // OmniboxView:
88 void Update() override; 88 void Update() override;
89 base::string16 GetText() const override; 89 base::string16 GetText() const override;
90 void SetUserText(const base::string16& text, 90 void SetUserText(const base::string16& text,
91 bool update_popup) override; 91 bool update_popup) override;
92 void SetForcedQuery() override; 92 void EnterKeywordModeForDefaultSearchProvider() override;
93 void GetSelectionBounds(base::string16::size_type* start, 93 void GetSelectionBounds(base::string16::size_type* start,
94 base::string16::size_type* end) const override; 94 base::string16::size_type* end) const override;
95 void SelectAll(bool reversed) override; 95 void SelectAll(bool reversed) override;
96 void RevertAll() override; 96 void RevertAll() override;
97 void SetFocus() override; 97 void SetFocus() override;
98 int GetTextWidth() const override; 98 int GetTextWidth() const override;
99 bool IsImeComposing() const override; 99 bool IsImeComposing() const override;
100 100
101 // views::Textfield: 101 // views::Textfield:
102 gfx::Size GetMinimumSize() const override; 102 gfx::Size GetMinimumSize() const override;
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 security_state::SecurityStateModel::SecurityLevel security_level_; 215 security_state::SecurityStateModel::SecurityLevel security_level_;
216 216
217 // Selection persisted across temporary text changes, like popup suggestions. 217 // Selection persisted across temporary text changes, like popup suggestions.
218 gfx::Range saved_temporary_selection_; 218 gfx::Range saved_temporary_selection_;
219 219
220 // Holds the user's selection across focus changes. There is only a saved 220 // Holds the user's selection across focus changes. There is only a saved
221 // selection if this range IsValid(). 221 // selection if this range IsValid().
222 gfx::Range saved_selection_for_focus_change_; 222 gfx::Range saved_selection_for_focus_change_;
223 223
224 // Tracking state before and after a possible change. 224 // Tracking state before and after a possible change.
225 base::string16 text_before_change_; 225 State state_before_change_;
226 gfx::Range sel_before_change_;
227 bool ime_composing_before_change_; 226 bool ime_composing_before_change_;
228 227
229 // Was the delete key pressed with an empty selection at the end of the edit? 228 // Was the delete key pressed with an empty selection at the end of the edit?
230 bool delete_at_end_pressed_; 229 bool delete_at_end_pressed_;
231 230
232 // |location_bar_view_| can be NULL in tests. 231 // |location_bar_view_| can be NULL in tests.
233 LocationBarView* location_bar_view_; 232 LocationBarView* location_bar_view_;
234 233
235 // True if the IME candidate window is open. When this is true, we want to 234 // True if the IME candidate window is open. When this is true, we want to
236 // avoid showing the popup. So far, the candidate window is detected only 235 // avoid showing the popup. So far, the candidate window is detected only
(...skipping 15 matching lines...) Expand all
252 // painted. Used to measure omnibox responsiveness with a histogram. 251 // painted. Used to measure omnibox responsiveness with a histogram.
253 base::TimeTicks insert_char_time_; 252 base::TimeTicks insert_char_time_;
254 253
255 // Used to bind callback functions to this object. 254 // Used to bind callback functions to this object.
256 base::WeakPtrFactory<OmniboxViewViews> weak_ptr_factory_; 255 base::WeakPtrFactory<OmniboxViewViews> weak_ptr_factory_;
257 256
258 DISALLOW_COPY_AND_ASSIGN(OmniboxViewViews); 257 DISALLOW_COPY_AND_ASSIGN(OmniboxViewViews);
259 }; 258 };
260 259
261 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ 260 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/location_bar/location_icon_view.cc ('k') | chrome/browser/ui/views/omnibox/omnibox_view_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698