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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 virtual void GetSelectionBounds( | 81 virtual void GetSelectionBounds( |
82 base::string16::size_type* start, | 82 base::string16::size_type* start, |
83 base::string16::size_type* end) const OVERRIDE; | 83 base::string16::size_type* end) const OVERRIDE; |
84 virtual void SelectAll(bool reversed) OVERRIDE; | 84 virtual void SelectAll(bool reversed) OVERRIDE; |
85 virtual void RevertAll() OVERRIDE; | 85 virtual void RevertAll() OVERRIDE; |
86 virtual void SetFocus() OVERRIDE; | 86 virtual void SetFocus() OVERRIDE; |
87 virtual int GetTextWidth() const OVERRIDE; | 87 virtual int GetTextWidth() const OVERRIDE; |
88 virtual bool IsImeComposing() const OVERRIDE; | 88 virtual bool IsImeComposing() const OVERRIDE; |
89 | 89 |
90 // views::Textfield: | 90 // views::Textfield: |
91 virtual gfx::Size GetMinimumSize() OVERRIDE; | 91 virtual gfx::Size GetMinimumSize() const OVERRIDE; |
92 virtual void OnNativeThemeChanged(const ui::NativeTheme* theme) OVERRIDE; | 92 virtual void OnNativeThemeChanged(const ui::NativeTheme* theme) OVERRIDE; |
93 virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE; | 93 virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE; |
94 | 94 |
95 private: | 95 private: |
96 FRIEND_TEST_ALL_PREFIXES(OmniboxViewViewsTest, CloseOmniboxPopupOnTextDrag); | 96 FRIEND_TEST_ALL_PREFIXES(OmniboxViewViewsTest, CloseOmniboxPopupOnTextDrag); |
97 | 97 |
98 // Update the field with |text| and set the selection. | 98 // Update the field with |text| and set the selection. |
99 void SetTextAndSelectedRange(const base::string16& text, | 99 void SetTextAndSelectedRange(const base::string16& text, |
100 const gfx::Range& range); | 100 const gfx::Range& range); |
101 | 101 |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 // GESTURE_TAP. We want to select all only when the textfield is not in focus | 232 // GESTURE_TAP. We want to select all only when the textfield is not in focus |
233 // and gets a tap. So we use this variable to remember focus state before tap. | 233 // and gets a tap. So we use this variable to remember focus state before tap. |
234 bool select_all_on_gesture_tap_; | 234 bool select_all_on_gesture_tap_; |
235 | 235 |
236 scoped_ptr<gfx::SlideAnimation> fade_in_animation_; | 236 scoped_ptr<gfx::SlideAnimation> fade_in_animation_; |
237 | 237 |
238 DISALLOW_COPY_AND_ASSIGN(OmniboxViewViews); | 238 DISALLOW_COPY_AND_ASSIGN(OmniboxViewViews); |
239 }; | 239 }; |
240 | 240 |
241 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ | 241 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ |
OLD | NEW |