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

Unified Diff: athena/test/athena_test_helper.cc

Issue 414903002: Introduce 'grab_inputs' property for athena container. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 years, 5 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
« no previous file with comments | « athena/test/DEPS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/test/athena_test_helper.cc
diff --git a/athena/test/athena_test_helper.cc b/athena/test/athena_test_helper.cc
index 682e209a14c5e0d46656989e0d4af9787b28c2d6..9adacc01568c9bf6c617c7c1f4556919768f4b7a 100644
--- a/athena/test/athena_test_helper.cc
+++ b/athena/test/athena_test_helper.cc
@@ -5,6 +5,7 @@
#include "athena/test/athena_test_helper.h"
#include "athena/main/athena_launcher.h"
+#include "athena/screen/public/screen_manager.h"
#include "athena/test/sample_activity_factory.h"
#include "athena/test/test_app_model_builder.h"
#include "base/command_line.h"
@@ -21,7 +22,7 @@
#include "ui/base/ime/input_method_initializer.h"
#include "ui/compositor/scoped_animation_duration_scale_mode.h"
#include "ui/gfx/screen.h"
-#include "ui/wm/core/default_activation_client.h"
+#include "ui/wm/core/focus_controller.h"
#include "ui/wm/core/input_method_event_filter.h"
#if defined(USE_X11)
@@ -72,11 +73,12 @@ void AthenaTestHelper::SetUp(ui::ContextFactory* context_factory) {
input_method_filter_->SetInputMethodPropertyInRootWindow(
root_window());
- // TODO(oshima): Switch to athena implementation.
- focus_client_.reset(new aura::test::TestFocusClient);
- aura::client::SetFocusClient(root_window(),
- focus_client_.get());
- new ::wm::DefaultActivationClient(root_window());
+ wm::FocusController* focus_controller =
+ new wm::FocusController(ScreenManager::CreateFocusRules());
+ aura::client::SetFocusClient(root_window(), focus_controller);
+ root_window()->AddPreTargetHandler(focus_controller);
+ aura::client::SetActivationClient(root_window(), focus_controller);
+ focus_client_.reset(focus_controller);
root_window()->Show();
// Ensure width != height so tests won't confuse them.
« no previous file with comments | « athena/test/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698