| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 // views::Textfield: | 101 // views::Textfield: |
| 102 gfx::Size GetMinimumSize() const override; | 102 gfx::Size GetMinimumSize() const override; |
| 103 void OnPaint(gfx::Canvas* canvas) override; | 103 void OnPaint(gfx::Canvas* canvas) override; |
| 104 void OnNativeThemeChanged(const ui::NativeTheme* theme) override; | 104 void OnNativeThemeChanged(const ui::NativeTheme* theme) override; |
| 105 void ExecuteCommand(int command_id, int event_flags) override; | 105 void ExecuteCommand(int command_id, int event_flags) override; |
| 106 ui::TextInputType GetTextInputType() const override; | 106 ui::TextInputType GetTextInputType() const override; |
| 107 | 107 |
| 108 private: | 108 private: |
| 109 FRIEND_TEST_ALL_PREFIXES(OmniboxViewViewsTest, CloseOmniboxPopupOnTextDrag); | 109 FRIEND_TEST_ALL_PREFIXES(OmniboxViewViewsTest, CloseOmniboxPopupOnTextDrag); |
| 110 FRIEND_TEST_ALL_PREFIXES(OmniboxViewViewsTest, MaintainCursorAfterFocusCycle); | 110 FRIEND_TEST_ALL_PREFIXES(OmniboxViewViewsTest, MaintainCursorAfterFocusCycle); |
| 111 FRIEND_TEST_ALL_PREFIXES(OmniboxViewViewsTest, OnBlur); |
| 111 | 112 |
| 112 // Update the field with |text| and set the selection. | 113 // Update the field with |text| and set the selection. |
| 113 void SetTextAndSelectedRange(const base::string16& text, | 114 void SetTextAndSelectedRange(const base::string16& text, |
| 114 const gfx::Range& range); | 115 const gfx::Range& range); |
| 115 | 116 |
| 116 // Returns the selected text. | 117 // Returns the selected text. |
| 117 base::string16 GetSelectedText() const; | 118 base::string16 GetSelectedText() const; |
| 118 | 119 |
| 119 // Paste text from the clipboard into the omnibox. | 120 // Paste text from the clipboard into the omnibox. |
| 120 // Textfields implementation of Paste() pastes the contents of the clipboard | 121 // Textfields implementation of Paste() pastes the contents of the clipboard |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 bool select_all_on_gesture_tap_; | 245 bool select_all_on_gesture_tap_; |
| 245 | 246 |
| 246 // The time of the first character insert operation that has not yet been | 247 // The time of the first character insert operation that has not yet been |
| 247 // painted. Used to measure omnibox responsiveness with a histogram. | 248 // painted. Used to measure omnibox responsiveness with a histogram. |
| 248 base::TimeTicks insert_char_time_; | 249 base::TimeTicks insert_char_time_; |
| 249 | 250 |
| 250 DISALLOW_COPY_AND_ASSIGN(OmniboxViewViews); | 251 DISALLOW_COPY_AND_ASSIGN(OmniboxViewViews); |
| 251 }; | 252 }; |
| 252 | 253 |
| 253 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ | 254 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ |
| OLD | NEW |