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

Unified Diff: content/public/test/text_input_test_utils.cc

Issue 2045363002: Routing IME Result Calls to the Correct RenderWidgetHost (Aura Only) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing a comment Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: content/public/test/text_input_test_utils.cc
diff --git a/content/public/test/text_input_test_utils.cc b/content/public/test/text_input_test_utils.cc
index 895f7b743d0bee0f76c7df4b0aa4641cdf921927..ff56d827110753c27291f98b5d9d937b77ae38f9 100644
--- a/content/public/test/text_input_test_utils.cc
+++ b/content/public/test/text_input_test_utils.cc
@@ -4,6 +4,7 @@
#include "content/public/test/text_input_test_utils.h"
+#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/browser/renderer_host/render_widget_host_view_aura.h"
#include "content/browser/renderer_host/render_widget_host_view_base.h"
#include "content/browser/renderer_host/render_widget_host_view_base_observer.h"
@@ -200,9 +201,10 @@ bool GetTextInputTypeForView(WebContents* web_contents,
}
RenderWidgetHostView* GetActiveViewFromWebContents(WebContents* web_contents) {
- return static_cast<WebContentsImpl*>(web_contents)
- ->GetTextInputManager()
- ->GetActiveView();
+ RenderWidgetHostImpl* host = static_cast<WebContentsImpl*>(web_contents)
+ ->GetTextInputManager()
+ ->GetActiveWidget();
+ return !!host ? host->GetView() : nullptr;
}
TextInputManagerTester::TextInputManagerTester(WebContents* web_contents)
@@ -237,7 +239,9 @@ bool TextInputManagerTester::GetTextInputValue(std::string* value) {
const RenderWidgetHostView* TextInputManagerTester::GetActiveView() {
DCHECK(observer_->text_input_manager());
- return observer_->text_input_manager()->GetActiveView();
+ RenderWidgetHostImpl* host =
+ observer_->text_input_manager()->GetActiveWidget();
+ return !!host ? host->GetView() : nullptr;
}
const RenderWidgetHostView* TextInputManagerTester::GetUpdatedView() {

Powered by Google App Engine
This is Rietveld 408576698