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

Unified Diff: chrome/browser/ui/ash/keyboard_controller_browsertest.cc

Issue 1392713002: Extract content dependency from keyboard code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . 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: chrome/browser/ui/ash/keyboard_controller_browsertest.cc
diff --git a/chrome/browser/ui/ash/keyboard_controller_browsertest.cc b/chrome/browser/ui/ash/keyboard_controller_browsertest.cc
index e8a2e9a614ea572fde8ad013bd1eb148e022fb3e..8635c41199feafe395a7d7cfab1e4d7535003093 100644
--- a/chrome/browser/ui/ash/keyboard_controller_browsertest.cc
+++ b/chrome/browser/ui/ash/keyboard_controller_browsertest.cc
@@ -9,10 +9,10 @@
#include "ui/base/ime/dummy_text_input_client.h"
#include "ui/base/ime/input_method.h"
#include "ui/base/ime/input_method_factory.h"
-#include "ui/keyboard/keyboard_constants.h"
+#include "ui/keyboard/content/keyboard_constants.h"
#include "ui/keyboard/keyboard_controller.h"
-#include "ui/keyboard/keyboard_controller_proxy.h"
#include "ui/keyboard/keyboard_switches.h"
+#include "ui/keyboard/keyboard_ui.h"
#include "ui/keyboard/keyboard_util.h"
namespace {
@@ -35,24 +35,24 @@ class VirtualKeyboardWebContentTest : public InProcessBrowserTest {
keyboard::switches::kEnableVirtualKeyboard);
}
- keyboard::KeyboardControllerProxy* proxy() {
- return keyboard::KeyboardController::GetInstance()->proxy();
+ keyboard::KeyboardUI* ui() {
+ return keyboard::KeyboardController::GetInstance()->ui();
}
protected:
void FocusEditableNodeAndShowKeyboard(const gfx::Rect& init_bounds) {
client.reset(new ui::DummyTextInputClient(ui::TEXT_INPUT_TYPE_TEXT));
- ui::InputMethod* input_method = proxy()->GetInputMethod();
+ ui::InputMethod* input_method = ui()->GetInputMethod();
input_method->SetFocusedTextInputClient(client.get());
input_method->ShowImeIfNeeded();
// Mock window.resizeTo that is expected to be called after navigate to a
// new virtual keyboard.
- proxy()->GetKeyboardWindow()->SetBounds(init_bounds);
+ ui()->GetKeyboardWindow()->SetBounds(init_bounds);
}
void FocusNonEditableNode() {
client.reset(new ui::DummyTextInputClient(ui::TEXT_INPUT_TYPE_NONE));
- ui::InputMethod* input_method = proxy()->GetInputMethod();
+ ui::InputMethod* input_method = ui()->GetInputMethod();
input_method->SetFocusedTextInputClient(client.get());
}
@@ -62,7 +62,7 @@ class VirtualKeyboardWebContentTest : public InProcessBrowserTest {
keyboard::KeyboardController::GetInstance()->Reload();
// Mock window.resizeTo that is expected to be called after navigate to a
// new virtual keyboard.
- proxy()->GetKeyboardWindow()->SetBounds(init_bounds);
+ ui()->GetKeyboardWindow()->SetBounds(init_bounds);
}
bool IsKeyboardVisible() const {
@@ -120,7 +120,7 @@ IN_PROC_BROWSER_TEST_F(VirtualKeyboardWebContentTest,
keyboard_bounds.height() + keyboard_bounds.y());
controller->SetKeyboardMode(keyboard::FLOATING);
// Move keyboard to a random place.
- proxy()->GetKeyboardWindow()->SetBounds(gfx::Rect(50, 50, 50, 50));
+ ui()->GetKeyboardWindow()->SetBounds(gfx::Rect(50, 50, 50, 50));
EXPECT_EQ(gfx::Rect(50, 50, 50, 50),
controller->GetContainerWindow()->bounds());
« no previous file with comments | « chrome/browser/ui/ash/chrome_shell_delegate.cc ('k') | chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698