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