Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Side by Side Diff: content/public/test/text_input_test_utils.h

Issue 2901093003: Revert of Update TextSelection for non-user initiated events (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/public/renderer/render_frame.h ('k') | content/public/test/text_input_test_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « content/public/renderer/render_frame.h ('k') | content/public/test/text_input_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698