| 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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; |
| 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 | 107 |
| 107 private: | 108 private: |
| 108 FRIEND_TEST_ALL_PREFIXES(OmniboxViewViewsTest, CloseOmniboxPopupOnTextDrag); | 109 FRIEND_TEST_ALL_PREFIXES(OmniboxViewViewsTest, CloseOmniboxPopupOnTextDrag); |
| 109 | 110 |
| 110 // Update the field with |text| and set the selection. | 111 // Update the field with |text| and set the selection. |
| 111 void SetTextAndSelectedRange(const base::string16& text, | 112 void SetTextAndSelectedRange(const base::string16& text, |
| 112 const gfx::Range& range); | 113 const gfx::Range& range); |
| 113 | 114 |
| 114 // Returns the selected text. | 115 // Returns the selected text. |
| 115 base::string16 GetSelectedText() const; | 116 base::string16 GetSelectedText() const; |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 // painted. Used to measure omnibox responsiveness with a histogram. | 252 // painted. Used to measure omnibox responsiveness with a histogram. |
| 252 base::TimeTicks insert_char_time_; | 253 base::TimeTicks insert_char_time_; |
| 253 | 254 |
| 254 // Used to bind callback functions to this object. | 255 // Used to bind callback functions to this object. |
| 255 base::WeakPtrFactory<OmniboxViewViews> weak_ptr_factory_; | 256 base::WeakPtrFactory<OmniboxViewViews> weak_ptr_factory_; |
| 256 | 257 |
| 257 DISALLOW_COPY_AND_ASSIGN(OmniboxViewViews); | 258 DISALLOW_COPY_AND_ASSIGN(OmniboxViewViews); |
| 258 }; | 259 }; |
| 259 | 260 |
| 260 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ | 261 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ |
| OLD | NEW |