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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 bool update_popup, | 101 bool update_popup, |
102 bool notify_text_changed) OVERRIDE; | 102 bool notify_text_changed) OVERRIDE; |
103 virtual void SetForcedQuery() OVERRIDE; | 103 virtual void SetForcedQuery() OVERRIDE; |
104 virtual bool IsSelectAll() const OVERRIDE; | 104 virtual bool IsSelectAll() const OVERRIDE; |
105 virtual bool DeleteAtEndPressed() OVERRIDE; | 105 virtual bool DeleteAtEndPressed() OVERRIDE; |
106 virtual void GetSelectionBounds(string16::size_type* start, | 106 virtual void GetSelectionBounds(string16::size_type* start, |
107 string16::size_type* end) const OVERRIDE; | 107 string16::size_type* end) const OVERRIDE; |
108 virtual void SelectAll(bool reversed) OVERRIDE; | 108 virtual void SelectAll(bool reversed) OVERRIDE; |
109 virtual void UpdatePopup() OVERRIDE; | 109 virtual void UpdatePopup() OVERRIDE; |
110 virtual void SetFocus() OVERRIDE; | 110 virtual void SetFocus() OVERRIDE; |
| 111 virtual void SetInvisibleFocus() OVERRIDE; |
111 virtual void OnTemporaryTextMaybeChanged( | 112 virtual void OnTemporaryTextMaybeChanged( |
112 const string16& display_text, | 113 const string16& display_text, |
113 bool save_original_selection) OVERRIDE; | 114 bool save_original_selection) OVERRIDE; |
114 virtual bool OnInlineAutocompleteTextMaybeChanged( | 115 virtual bool OnInlineAutocompleteTextMaybeChanged( |
115 const string16& display_text, size_t user_text_length) OVERRIDE; | 116 const string16& display_text, size_t user_text_length) OVERRIDE; |
116 virtual void OnRevertTemporaryText() OVERRIDE; | 117 virtual void OnRevertTemporaryText() OVERRIDE; |
117 virtual void OnBeforePossibleChange() OVERRIDE; | 118 virtual void OnBeforePossibleChange() OVERRIDE; |
118 virtual bool OnAfterPossibleChange() OVERRIDE; | 119 virtual bool OnAfterPossibleChange() OVERRIDE; |
119 virtual gfx::NativeView GetNativeView() const OVERRIDE; | 120 virtual gfx::NativeView GetNativeView() const OVERRIDE; |
120 virtual gfx::NativeView GetRelativeWindowForPopup() const OVERRIDE; | 121 virtual gfx::NativeView GetRelativeWindowForPopup() const OVERRIDE; |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 void CopyURL(); | 174 void CopyURL(); |
174 | 175 |
175 // Paste text from the clipboard into the omnibox. | 176 // Paste text from the clipboard into the omnibox. |
176 // Textfields implementation of Paste() pastes the contents of the clipboard | 177 // Textfields implementation of Paste() pastes the contents of the clipboard |
177 // as is. We want to strip whitespace and other things (see GetClipboardText() | 178 // as is. We want to strip whitespace and other things (see GetClipboardText() |
178 // for details). | 179 // for details). |
179 // It is assumed this is invoked after a call to OnBeforePossibleChange() and | 180 // It is assumed this is invoked after a call to OnBeforePossibleChange() and |
180 // that after invoking this OnAfterPossibleChange() is invoked. | 181 // that after invoking this OnAfterPossibleChange() is invoked. |
181 void OnPaste(); | 182 void OnPaste(); |
182 | 183 |
| 184 // Update focus visibility. |
| 185 void SetFocusVisibility(bool focus_is_visible); |
| 186 |
183 views::Textfield* textfield_; | 187 views::Textfield* textfield_; |
184 | 188 |
185 // When true, the location bar view is read only and also is has a slightly | 189 // When true, the location bar view is read only and also is has a slightly |
186 // different presentation (smaller font size). This is used for popups. | 190 // different presentation (smaller font size). This is used for popups. |
187 bool popup_window_mode_; | 191 bool popup_window_mode_; |
188 | 192 |
189 scoped_ptr<OmniboxPopupView> popup_view_; | 193 scoped_ptr<OmniboxPopupView> popup_view_; |
190 | 194 |
191 ToolbarModel::SecurityLevel security_level_; | 195 ToolbarModel::SecurityLevel security_level_; |
192 | 196 |
(...skipping 18 matching lines...) Expand all Loading... |
211 // Should we select all the text when we see the mouse button get released? | 215 // Should we select all the text when we see the mouse button get released? |
212 // We select in response to a click that focuses the omnibox, but we defer | 216 // We select in response to a click that focuses the omnibox, but we defer |
213 // until release, setting this variable back to false if we saw a drag, to | 217 // until release, setting this variable back to false if we saw a drag, to |
214 // allow the user to select just a portion of the text. | 218 // allow the user to select just a portion of the text. |
215 bool select_all_on_mouse_release_; | 219 bool select_all_on_mouse_release_; |
216 | 220 |
217 DISALLOW_COPY_AND_ASSIGN(OmniboxViewViews); | 221 DISALLOW_COPY_AND_ASSIGN(OmniboxViewViews); |
218 }; | 222 }; |
219 | 223 |
220 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ | 224 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ |
OLD | NEW |