| 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 | 136 |
| 137 // Returns the RenderWidgetHostView which has most recently updated any of its | 137 // Returns the RenderWidgetHostView which has most recently updated any of its |
| 138 // state (e.g., TextInputState or otherwise). | 138 // state (e.g., TextInputState or otherwise). |
| 139 RenderWidgetHostView* GetUpdatedView(); | 139 RenderWidgetHostView* GetUpdatedView(); |
| 140 | 140 |
| 141 // Returns true if a call to TextInputManager::UpdateTextInputState has led | 141 // Returns true if a call to TextInputManager::UpdateTextInputState has led |
| 142 // to a change in TextInputState (since the time the observer has been | 142 // to a change in TextInputState (since the time the observer has been |
| 143 // created). | 143 // created). |
| 144 bool IsTextInputStateChanged(); | 144 bool IsTextInputStateChanged(); |
| 145 | 145 |
| 146 // Returns true if there is a focused <input> and populates |user_initiated| |
| 147 // with the information whether it was triggered by user interaction in the |
| 148 // given view. |
| 149 bool GetTextSelectionUserInitiatedForView(RenderWidgetHostView* view, |
| 150 bool* user_initiated); |
| 151 |
| 146 private: | 152 private: |
| 147 // The actual internal observer of the TextInputManager. | 153 // The actual internal observer of the TextInputManager. |
| 148 class InternalObserver; | 154 class InternalObserver; |
| 149 | 155 |
| 150 std::unique_ptr<InternalObserver> observer_; | 156 std::unique_ptr<InternalObserver> observer_; |
| 151 | 157 |
| 152 DISALLOW_COPY_AND_ASSIGN(TextInputManagerTester); | 158 DISALLOW_COPY_AND_ASSIGN(TextInputManagerTester); |
| 153 }; | 159 }; |
| 154 | 160 |
| 155 // This class observes the lifetime of a RenderWidgetHostView. | 161 // This class observes the lifetime of a RenderWidgetHostView. |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 const gfx::Range& range); | 263 const gfx::Range& range); |
| 258 | 264 |
| 259 // Returns the total count of NSWindows instances which belong to the currently | 265 // Returns the total count of NSWindows instances which belong to the currently |
| 260 // running NSApplication. | 266 // running NSApplication. |
| 261 size_t GetOpenNSWindowsCount(); | 267 size_t GetOpenNSWindowsCount(); |
| 262 #endif | 268 #endif |
| 263 | 269 |
| 264 } // namespace content | 270 } // namespace content |
| 265 | 271 |
| 266 #endif // CONTENT_PUBLIC_TEST_TEXT_INPUT_TEST_UTILS_H_ | 272 #endif // CONTENT_PUBLIC_TEST_TEXT_INPUT_TEST_UTILS_H_ |
| OLD | NEW |