| 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 | 100 |
| 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 | 111 |
| 111 // Update the field with |text| and set the selection. | 112 // Update the field with |text| and set the selection. |
| 112 void SetTextAndSelectedRange(const base::string16& text, | 113 void SetTextAndSelectedRange(const base::string16& text, |
| 113 const gfx::Range& range); | 114 const gfx::Range& range); |
| 114 | 115 |
| 115 // Returns the selected text. | 116 // Returns the selected text. |
| 116 base::string16 GetSelectedText() const; | 117 base::string16 GetSelectedText() const; |
| 117 | 118 |
| 118 // Paste text from the clipboard into the omnibox. | 119 // Paste text from the clipboard into the omnibox. |
| 119 // Textfields implementation of Paste() pastes the contents of the clipboard | 120 // Textfields implementation of Paste() pastes the contents of the clipboard |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 bool select_all_on_gesture_tap_; | 244 bool select_all_on_gesture_tap_; |
| 244 | 245 |
| 245 // The time of the first character insert operation that has not yet been | 246 // The time of the first character insert operation that has not yet been |
| 246 // painted. Used to measure omnibox responsiveness with a histogram. | 247 // painted. Used to measure omnibox responsiveness with a histogram. |
| 247 base::TimeTicks insert_char_time_; | 248 base::TimeTicks insert_char_time_; |
| 248 | 249 |
| 249 DISALLOW_COPY_AND_ASSIGN(OmniboxViewViews); | 250 DISALLOW_COPY_AND_ASSIGN(OmniboxViewViews); |
| 250 }; | 251 }; |
| 251 | 252 |
| 252 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ | 253 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ |
| OLD | NEW |