Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 200 void OnGetDragOperationsForTextfield(int* drag_operations) override; | 200 void OnGetDragOperationsForTextfield(int* drag_operations) override; |
| 201 void AppendDropFormats( | 201 void AppendDropFormats( |
| 202 int* formats, | 202 int* formats, |
| 203 std::set<ui::Clipboard::FormatType>* format_types) override; | 203 std::set<ui::Clipboard::FormatType>* format_types) override; |
| 204 int OnDrop(const ui::OSExchangeData& data) override; | 204 int OnDrop(const ui::OSExchangeData& data) override; |
| 205 void UpdateContextMenu(ui::SimpleMenuModel* menu_contents) override; | 205 void UpdateContextMenu(ui::SimpleMenuModel* menu_contents) override; |
| 206 | 206 |
| 207 Profile* profile_; | 207 Profile* profile_; |
| 208 | 208 |
| 209 // When true, the location bar view is read only and also is has a slightly | 209 // When true, the location bar view is read only and also is has a slightly |
| 210 // different presentation (smaller font size). This is used for popups. | 210 // different presentation (smaller font size). This is used for opups. |
|
Peter Kasting
2016/06/04 02:17:18
Oops?
Tom (Use chromium acct)
2016/06/04 20:39:09
oops
| |
| 211 bool popup_window_mode_; | 211 bool popup_window_mode_; |
| 212 | 212 |
| 213 std::unique_ptr<OmniboxPopupView> popup_view_; | 213 std::unique_ptr<OmniboxPopupView> popup_view_; |
| 214 | 214 |
| 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 TextState text_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 Loading... | |
| 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_ |
| OLD | NEW |