OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CONTENT_PUBLIC_TEST_TEXT_INPUT_TEST_UTILS_H_ | 5 #ifndef CONTENT_PUBLIC_TEST_TEXT_INPUT_TEST_UTILS_H_ |
6 #define CONTENT_PUBLIC_TEST_TEXT_INPUT_TEST_UTILS_H_ | 6 #define CONTENT_PUBLIC_TEST_TEXT_INPUT_TEST_UTILS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 | 119 |
120 // Returns the RenderWidgetHostView which has most recently updated any of its | 120 // Returns the RenderWidgetHostView which has most recently updated any of its |
121 // state (e.g., TextInputState or otherwise). | 121 // state (e.g., TextInputState or otherwise). |
122 RenderWidgetHostView* GetUpdatedView(); | 122 RenderWidgetHostView* GetUpdatedView(); |
123 | 123 |
124 // Returns true if a call to TextInputManager::UpdateTextInputState has led | 124 // Returns true if a call to TextInputManager::UpdateTextInputState has led |
125 // to a change in TextInputState (since the time the observer has been | 125 // to a change in TextInputState (since the time the observer has been |
126 // created). | 126 // created). |
127 bool IsTextInputStateChanged(); | 127 bool IsTextInputStateChanged(); |
128 | 128 |
| 129 // Returns true if there is a focused <input> and populates |user_initiated| |
| 130 // with the information whether it was triggered by user interaction in the |
| 131 // given view. |
| 132 bool GetTextSelectionUserInitiatedForView(RenderWidgetHostView* view, |
| 133 bool* user_initiated); |
| 134 |
129 private: | 135 private: |
130 // The actual internal observer of the TextInputManager. | 136 // The actual internal observer of the TextInputManager. |
131 class InternalObserver; | 137 class InternalObserver; |
132 | 138 |
133 std::unique_ptr<InternalObserver> observer_; | 139 std::unique_ptr<InternalObserver> observer_; |
134 | 140 |
135 DISALLOW_COPY_AND_ASSIGN(TextInputManagerTester); | 141 DISALLOW_COPY_AND_ASSIGN(TextInputManagerTester); |
136 }; | 142 }; |
137 | 143 |
138 // This class observes the lifetime of a RenderWidgetHostView. | 144 // This class observes the lifetime of a RenderWidgetHostView. |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 const gfx::Range& range); | 246 const gfx::Range& range); |
241 | 247 |
242 // Returns the total count of NSWindows instances which belong to the currently | 248 // Returns the total count of NSWindows instances which belong to the currently |
243 // running NSApplication. | 249 // running NSApplication. |
244 size_t GetOpenNSWindowsCount(); | 250 size_t GetOpenNSWindowsCount(); |
245 #endif | 251 #endif |
246 | 252 |
247 } // namespace content | 253 } // namespace content |
248 | 254 |
249 #endif // CONTENT_PUBLIC_TEST_TEXT_INPUT_TEST_UTILS_H_ | 255 #endif // CONTENT_PUBLIC_TEST_TEXT_INPUT_TEST_UTILS_H_ |
OLD | NEW |