Rename keyboard to contents where appropriate

Currently "keyboard" is used for both the container window and the web
contents in it, which is confusing.
To avoid the confusion, this CL renames some "keyboard" to "contents"
or "Keyboard" to "Contents"

Bug: 739069
Test: try

Change-Id: I8d94626f4a25bca69e328e583cde2b3239dd9367
Reviewed-on: https://chromium-review.googlesource.com/558180
Commit-Queue: Keigo Oka <[email protected]>
Reviewed-by: Yuichiro Hanada <[email protected]>
Reviewed-by: Mitsuru Oshima <[email protected]>
Reviewed-by: Keigo Oka <[email protected]>
Cr-Commit-Position: refs/heads/master@{#486093}
diff --git a/ash/root_window_controller_unittest.cc b/ash/root_window_controller_unittest.cc
index 706b57f..6695dbb 100644
--- a/ash/root_window_controller_unittest.cc
+++ b/ash/root_window_controller_unittest.cc
@@ -911,10 +911,10 @@
   ASSERT_TRUE(keyboard_container);
   keyboard_container->Show();
 
-  aura::Window* keyboard_window =
-      keyboard::KeyboardController::GetInstance()->ui()->GetKeyboardWindow();
-  keyboard_window->SetBounds(gfx::Rect());
-  keyboard_window->Show();
+  aura::Window* contents_window =
+      keyboard::KeyboardController::GetInstance()->ui()->GetContentsWindow();
+  contents_window->SetBounds(gfx::Rect());
+  contents_window->Show();
 
   // Make sure no pending mouse events in the queue.
   RunAllPendingInMessageLoop();
@@ -922,7 +922,7 @@
   ui::test::TestEventHandler handler;
   root_window->AddPreTargetHandler(&handler);
 
-  ui::test::EventGenerator event_generator(root_window, keyboard_window);
+  ui::test::EventGenerator event_generator(root_window, contents_window);
   event_generator.ClickLeftButton();
   int expected_mouse_presses = 1;
   EXPECT_EQ(expected_mouse_presses, handler.num_mouse_events() / 2);
@@ -965,10 +965,10 @@
   keyboard_container->Show();
   keyboard::KeyboardController* controller =
       keyboard::KeyboardController::GetInstance();
-  aura::Window* keyboard_window = controller->ui()->GetKeyboardWindow();
-  keyboard_window->SetBounds(keyboard::FullWidthKeyboardBoundsFromRootBounds(
+  aura::Window* contents_window = controller->ui()->GetContentsWindow();
+  contents_window->SetBounds(keyboard::FullWidthKeyboardBoundsFromRootBounds(
       root_window->bounds(), 100));
-  keyboard_window->Show();
+  contents_window->Show();
 
   gfx::Rect before =
       display::Screen::GetScreen()->GetPrimaryDisplay().work_area();
@@ -999,16 +999,16 @@
   ASSERT_TRUE(keyboard_container);
   keyboard_container->Show();
 
-  aura::Window* keyboard_window =
-      keyboard::KeyboardController::GetInstance()->ui()->GetKeyboardWindow();
-  keyboard_window->SetBounds(keyboard::FullWidthKeyboardBoundsFromRootBounds(
+  aura::Window* contents_window =
+      keyboard::KeyboardController::GetInstance()->ui()->GetContentsWindow();
+  contents_window->SetBounds(keyboard::FullWidthKeyboardBoundsFromRootBounds(
       root_window->bounds(), 100));
 
   ui::test::TestEventHandler handler;
   root_window->AddPreTargetHandler(&handler);
   ui::test::EventGenerator root_window_event_generator(root_window);
   ui::test::EventGenerator keyboard_event_generator(root_window,
-                                                    keyboard_window);
+                                                    contents_window);
 
   views::Widget* modal_widget = CreateModalWidget(gfx::Rect(300, 10, 100, 100));
 
@@ -1048,10 +1048,10 @@
   keyboard_container->Show();
 
   const int keyboard_height = 100;
-  aura::Window* keyboard_window = ui->GetKeyboardWindow();
-  keyboard_window->SetBounds(keyboard::FullWidthKeyboardBoundsFromRootBounds(
+  aura::Window* contents_window = ui->GetContentsWindow();
+  contents_window->SetBounds(keyboard::FullWidthKeyboardBoundsFromRootBounds(
       root_window->bounds(), keyboard_height));
-  keyboard_window->Show();
+  contents_window->Show();
 
   ui->EnsureCaretInWorkArea();
   ASSERT_EQ(root_window->bounds().width(),
@@ -1094,10 +1094,10 @@
       primary_root_window, kShellWindowId_VirtualKeyboardContainer);
   ASSERT_TRUE(keyboard_container);
   keyboard_container->Show();
-  aura::Window* keyboard_window = ui->GetKeyboardWindow();
-  keyboard_window->SetBounds(keyboard::FullWidthKeyboardBoundsFromRootBounds(
+  aura::Window* contents_window = ui->GetContentsWindow();
+  contents_window->SetBounds(keyboard::FullWidthKeyboardBoundsFromRootBounds(
       primary_root_window->bounds(), keyboard_height));
-  keyboard_window->Show();
+  contents_window->Show();
 
   ui->EnsureCaretInWorkArea();
   EXPECT_TRUE(primary_root_window->GetBoundsInScreen().Contains(
@@ -1110,7 +1110,7 @@
   // Move the keyboard into the secondary display and check that the keyboard
   // doesn't cover the window on the primary screen.
   keyboard_controller->ShowKeyboardInDisplay(secondary_display_id);
-  keyboard_window->SetBounds(keyboard::FullWidthKeyboardBoundsFromRootBounds(
+  contents_window->SetBounds(keyboard::FullWidthKeyboardBoundsFromRootBounds(
       secondary_root_window->bounds(), keyboard_height));
 
   ui->EnsureCaretInWorkArea();
@@ -1140,11 +1140,11 @@
   keyboard_container->Show();
 
   const int keyboard_height = 200;
-  aura::Window* keyboard_window = ui->GetKeyboardWindow();
+  aura::Window* contents_window = ui->GetContentsWindow();
   gfx::Rect keyboard_bounds = keyboard::FullWidthKeyboardBoundsFromRootBounds(
       root_window->bounds(), keyboard_height);
-  keyboard_window->SetBounds(keyboard_bounds);
-  keyboard_window->Show();
+  contents_window->SetBounds(keyboard_bounds);
+  contents_window->Show();
 
   ui::test::EventGenerator generator(root_window);
 
@@ -1217,7 +1217,7 @@
   keyboard::KeyboardController* keyboard_controller =
       keyboard::KeyboardController::GetInstance();
   keyboard_controller->ShowKeyboard(false);
-  keyboard_controller->ui()->GetKeyboardWindow()->SetBounds(
+  keyboard_controller->ui()->GetContentsWindow()->SetBounds(
       gfx::Rect(0, 400, 800, 200));
   EXPECT_EQ("0,400 800x200", keyboard_container->bounds().ToString());