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

Unified Diff: content/browser/renderer_host/ime_adapter_android.cc

Issue 1411203010: Separate RenderViewHost from RenderWidgetHost, part 4: delegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: oops Created 5 years, 2 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/browser/renderer_host/ime_adapter_android.cc
diff --git a/content/browser/renderer_host/ime_adapter_android.cc b/content/browser/renderer_host/ime_adapter_android.cc
index dbad05cf8b619b442eb549a56f6a87af8dce683e..7fe848513e3533ff3fcbb84ed70823ab3ed0d7db 100644
--- a/content/browser/renderer_host/ime_adapter_android.cc
+++ b/content/browser/renderer_host/ime_adapter_android.cc
@@ -281,7 +281,7 @@ RenderWidgetHostImpl* ImeAdapterAndroid::GetRenderWidgetHostImpl() {
DCHECK(rwhva_);
RenderWidgetHost* rwh = rwhva_->GetRenderWidgetHost();
if (!rwh)
- return NULL;
+ return nullptr;
return RenderWidgetHostImpl::From(rwh);
}
@@ -289,14 +289,14 @@ RenderWidgetHostImpl* ImeAdapterAndroid::GetRenderWidgetHostImpl() {
RenderFrameHost* ImeAdapterAndroid::GetFocusedFrame() {
RenderWidgetHostImpl* rwh = GetRenderWidgetHostImpl();
if (!rwh)
- return NULL;
- if (!rwh->IsRenderView())
- return NULL;
+ return nullptr;
RenderViewHost* rvh = RenderViewHost::From(rwh);
+ if (!rvh)
+ return nullptr;
FrameTreeNode* focused_frame =
rvh->GetDelegate()->GetFrameTree()->GetFocusedFrame();
if (!focused_frame)
- return NULL;
+ return nullptr;
return focused_frame->current_frame_host();
}
@@ -304,9 +304,7 @@ RenderFrameHost* ImeAdapterAndroid::GetFocusedFrame() {
WebContents* ImeAdapterAndroid::GetWebContents() {
RenderWidgetHostImpl* rwh = GetRenderWidgetHostImpl();
if (!rwh)
- return NULL;
- if (!rwh->IsRenderView())
- return NULL;
+ return nullptr;
return WebContents::FromRenderViewHost(RenderViewHost::From(rwh));
}

Powered by Google App Engine
This is Rietveld 408576698