Chromium Code Reviews| 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 120 // as is. We want to strip whitespace and other things (see GetClipboardText() | 120 // as is. We want to strip whitespace and other things (see GetClipboardText() |
| 121 // for details). The function invokes OnBefore/AfterPossibleChange() as | 121 // for details). The function invokes OnBefore/AfterPossibleChange() as |
| 122 // necessary. | 122 // necessary. |
| 123 void OnPaste(); | 123 void OnPaste(); |
| 124 | 124 |
| 125 // Handle keyword hint tab-to-search and tabbing through dropdown results. | 125 // Handle keyword hint tab-to-search and tabbing through dropdown results. |
| 126 bool HandleEarlyTabActions(const ui::KeyEvent& event); | 126 bool HandleEarlyTabActions(const ui::KeyEvent& event); |
| 127 | 127 |
| 128 // Handles a request to change the value of this text field from software | 128 // Handles a request to change the value of this text field from software |
| 129 // using an accessibility API (typically automation software, screen readers | 129 // using an accessibility API (typically automation software, screen readers |
| 130 // don't normally use this). Sets the value and clears the selection. | 130 // don't normally use this). If |clear_first| is true, clears the existing |
| 131 void AccessibilitySetValue(const base::string16& new_value); | 131 // value first and sets it to |new_value|. If false, deletes whatever's |
| 132 // selected and replaces it with |new_value|. Then clears the text selection. | |
|
dmazzoni
2016/10/26 04:26:02
Doesn't it leave the cursor at the end of |new_val
Patti Lor
2016/10/27 00:38:48
That's true - replaced "Then clears the text selec
| |
| 133 void AccessibilitySetValue(const base::string16& new_value, bool clear_first); | |
| 132 | 134 |
| 133 // Updates |security_level_| based on the toolbar model's current value. | 135 // Updates |security_level_| based on the toolbar model's current value. |
| 134 void UpdateSecurityLevel(); | 136 void UpdateSecurityLevel(); |
| 135 | 137 |
| 136 // OmniboxView: | 138 // OmniboxView: |
| 137 void SetWindowTextAndCaretPos(const base::string16& text, | 139 void SetWindowTextAndCaretPos(const base::string16& text, |
| 138 size_t caret_pos, | 140 size_t caret_pos, |
| 139 bool update_popup, | 141 bool update_popup, |
| 140 bool notify_text_changed) override; | 142 bool notify_text_changed) override; |
| 141 bool IsSelectAll() const override; | 143 bool IsSelectAll() const override; |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 252 // painted. Used to measure omnibox responsiveness with a histogram. | 254 // painted. Used to measure omnibox responsiveness with a histogram. |
| 253 base::TimeTicks insert_char_time_; | 255 base::TimeTicks insert_char_time_; |
| 254 | 256 |
| 255 // Used to bind callback functions to this object. | 257 // Used to bind callback functions to this object. |
| 256 base::WeakPtrFactory<OmniboxViewViews> weak_ptr_factory_; | 258 base::WeakPtrFactory<OmniboxViewViews> weak_ptr_factory_; |
| 257 | 259 |
| 258 DISALLOW_COPY_AND_ASSIGN(OmniboxViewViews); | 260 DISALLOW_COPY_AND_ASSIGN(OmniboxViewViews); |
| 259 }; | 261 }; |
| 260 | 262 |
| 261 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ | 263 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ |
| OLD | NEW |