| 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 <set> | 10 #include <set> |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 const base::string16& display_text, | 91 const base::string16& display_text, |
| 92 bool update_popup) override; | 92 bool update_popup) override; |
| 93 void SetForcedQuery() override; | 93 void EnterKeywordModeForDefaultSearchProvider() override; |
| 94 void GetSelectionBounds(base::string16::size_type* start, | 94 void GetSelectionBounds(base::string16::size_type* start, |
| 95 base::string16::size_type* end) const override; | 95 base::string16::size_type* end) const override; |
| 96 void SelectAll(bool reversed) override; | 96 void SelectAll(bool reversed) override; |
| 97 void RevertAll() override; | 97 void RevertAll() override; |
| 98 void SetFocus() override; | 98 void SetFocus() override; |
| 99 int GetTextWidth() const override; | 99 int GetTextWidth() const override; |
| 100 bool IsImeComposing() const override; | 100 bool IsImeComposing() const override; |
| 101 | 101 |
| 102 // views::Textfield: | 102 // views::Textfield: |
| 103 gfx::Size GetMinimumSize() const override; | 103 gfx::Size GetMinimumSize() const override; |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 | 217 |
| 218 // Selection persisted across temporary text changes, like popup suggestions. | 218 // Selection persisted across temporary text changes, like popup suggestions. |
| 219 gfx::Range saved_temporary_selection_; | 219 gfx::Range saved_temporary_selection_; |
| 220 | 220 |
| 221 // Holds the user's selection across focus changes. There is only a saved | 221 // Holds the user's selection across focus changes. There is only a saved |
| 222 // selection if this range IsValid(). | 222 // selection if this range IsValid(). |
| 223 gfx::Range saved_selection_for_focus_change_; | 223 gfx::Range saved_selection_for_focus_change_; |
| 224 | 224 |
| 225 // Tracking state before and after a possible change. | 225 // Tracking state before and after a possible change. |
| 226 base::string16 text_before_change_; | 226 base::string16 text_before_change_; |
| 227 base::string16 keyword_before_change_; |
| 228 bool is_keyword_selected_before_change_; |
| 227 gfx::Range sel_before_change_; | 229 gfx::Range sel_before_change_; |
| 228 bool ime_composing_before_change_; | 230 bool ime_composing_before_change_; |
| 229 | 231 |
| 230 // Was the delete key pressed with an empty selection at the end of the edit? | 232 // Was the delete key pressed with an empty selection at the end of the edit? |
| 231 bool delete_at_end_pressed_; | 233 bool delete_at_end_pressed_; |
| 232 | 234 |
| 233 // |location_bar_view_| can be NULL in tests. | 235 // |location_bar_view_| can be NULL in tests. |
| 234 LocationBarView* location_bar_view_; | 236 LocationBarView* location_bar_view_; |
| 235 | 237 |
| 236 // True if the IME candidate window is open. When this is true, we want to | 238 // True if the IME candidate window is open. When this is true, we want to |
| (...skipping 16 matching lines...) Expand all Loading... |
| 253 // painted. Used to measure omnibox responsiveness with a histogram. | 255 // painted. Used to measure omnibox responsiveness with a histogram. |
| 254 base::TimeTicks insert_char_time_; | 256 base::TimeTicks insert_char_time_; |
| 255 | 257 |
| 256 // Used to bind callback functions to this object. | 258 // Used to bind callback functions to this object. |
| 257 base::WeakPtrFactory<OmniboxViewViews> weak_ptr_factory_; | 259 base::WeakPtrFactory<OmniboxViewViews> weak_ptr_factory_; |
| 258 | 260 |
| 259 DISALLOW_COPY_AND_ASSIGN(OmniboxViewViews); | 261 DISALLOW_COPY_AND_ASSIGN(OmniboxViewViews); |
| 260 }; | 262 }; |
| 261 | 263 |
| 262 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ | 264 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ |
| OLD | NEW |