| 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 | |
| 135 private: | 129 private: |
| 136 // The actual internal observer of the TextInputManager. | 130 // The actual internal observer of the TextInputManager. |
| 137 class InternalObserver; | 131 class InternalObserver; |
| 138 | 132 |
| 139 std::unique_ptr<InternalObserver> observer_; | 133 std::unique_ptr<InternalObserver> observer_; |
| 140 | 134 |
| 141 DISALLOW_COPY_AND_ASSIGN(TextInputManagerTester); | 135 DISALLOW_COPY_AND_ASSIGN(TextInputManagerTester); |
| 142 }; | 136 }; |
| 143 | 137 |
| 144 // This class observes the lifetime of a RenderWidgetHostView. | 138 // This class observes the lifetime of a RenderWidgetHostView. |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 const gfx::Range& range); | 240 const gfx::Range& range); |
| 247 | 241 |
| 248 // Returns the total count of NSWindows instances which belong to the currently | 242 // Returns the total count of NSWindows instances which belong to the currently |
| 249 // running NSApplication. | 243 // running NSApplication. |
| 250 size_t GetOpenNSWindowsCount(); | 244 size_t GetOpenNSWindowsCount(); |
| 251 #endif | 245 #endif |
| 252 | 246 |
| 253 } // namespace content | 247 } // namespace content |
| 254 | 248 |
| 255 #endif // CONTENT_PUBLIC_TEST_TEXT_INPUT_TEST_UTILS_H_ | 249 #endif // CONTENT_PUBLIC_TEST_TEXT_INPUT_TEST_UTILS_H_ |
| OLD | NEW |