Rename PopupType methods and variables to WidgetType.

The enum has changed to be WidgetType since it specifies essentially if
the widget is a Frame or a Popup.

The KeyEventRoutingKeyboardLockAndChildPopupWithoutInputGrab test goes
away as it was setting a RenderWidgetHostView to be a Frame, but then
doing InitAsPopup(), in order to make NeedsInputGrab() return false,
but these things do not happen together!

CreateViewForPopupWidget() is renamed to CreateViewForChildWidget() as
it is used to make either Frame or Popup child widgets, and is
different from CreateViewForWidget() which makes top-level widgets for
a tab.

[email protected], [email protected], [email protected]

Bug: 419087
Change-Id: Iab5856c5c934ab4204f63dd20a7b8f3d78668f84
Reviewed-on: https://chromium-review.googlesource.com/1227297
Commit-Queue: danakj <[email protected]>
Reviewed-by: Avi Drissman <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Cr-Commit-Position: refs/heads/master@{#591825}
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index bb81a69..5d4b922 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -2781,13 +2781,13 @@
 
   RenderWidgetHostViewBase* widget_view =
       static_cast<RenderWidgetHostViewBase*>(
-          view_->CreateViewForPopupWidget(widget_host));
+          view_->CreateViewForChildWidget(widget_host));
   if (!widget_view)
     return;
-  if (!is_fullscreen) {
-    // Popups should not get activated.
-    widget_view->SetPopupType(WidgetType::kPopup);
-  }
+  // Fullscreen child widgets are frames, other child widgets are popups, and
+  // popups should not get activated.
+  if (!is_fullscreen)
+    widget_view->SetWidgetType(WidgetType::kPopup);
   // Save the created widget associated with the route so we can show it later.
   pending_widget_views_[GlobalRoutingID(render_process_id, route_id)] =
       widget_view;
@@ -2851,6 +2851,7 @@
     view = GetRenderWidgetHostView();
   }
 
+  // Fullscreen child widgets are frames, other child widgets are popups.
   if (is_fullscreen) {
     DCHECK_EQ(MSG_ROUTING_NONE, fullscreen_widget_routing_id_);
     view_->StoreFocus();