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

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

Issue 2856093003: Update TextSelection for non-user initiated events (Closed)
Patch Set: Update TextSelection for non-user initiated events 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
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
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_
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