| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 base::string16 text_before_change_; |
| 226 base::string16 keyword_before_change_; |
| 227 bool is_keyword_selected_before_change_; |
| 226 gfx::Range sel_before_change_; | 228 gfx::Range sel_before_change_; |
| 227 bool ime_composing_before_change_; | 229 bool ime_composing_before_change_; |
| 228 | 230 |
| 229 // Was the delete key pressed with an empty selection at the end of the edit? | 231 // Was the delete key pressed with an empty selection at the end of the edit? |
| 230 bool delete_at_end_pressed_; | 232 bool delete_at_end_pressed_; |
| 231 | 233 |
| 232 // |location_bar_view_| can be NULL in tests. | 234 // |location_bar_view_| can be NULL in tests. |
| 233 LocationBarView* location_bar_view_; | 235 LocationBarView* location_bar_view_; |
| 234 | 236 |
| 235 // True if the IME candidate window is open. When this is true, we want to | 237 // True if the IME candidate window is open. When this is true, we want to |
| (...skipping 16 matching lines...) Expand all Loading... |
| 252 // painted. Used to measure omnibox responsiveness with a histogram. | 254 // painted. Used to measure omnibox responsiveness with a histogram. |
| 253 base::TimeTicks insert_char_time_; | 255 base::TimeTicks insert_char_time_; |
| 254 | 256 |
| 255 // Used to bind callback functions to this object. | 257 // Used to bind callback functions to this object. |
| 256 base::WeakPtrFactory<OmniboxViewViews> weak_ptr_factory_; | 258 base::WeakPtrFactory<OmniboxViewViews> weak_ptr_factory_; |
| 257 | 259 |
| 258 DISALLOW_COPY_AND_ASSIGN(OmniboxViewViews); | 260 DISALLOW_COPY_AND_ASSIGN(OmniboxViewViews); |
| 259 }; | 261 }; |
| 260 | 262 |
| 261 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ | 263 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ |
| OLD | NEW |