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

Unified Diff: ui/wm/test/wm_test_helper.cc

Issue 1403293003: Introduce AndroidFocusRules and NativeWidgetAndroid (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: ui/wm/test/wm_test_helper.cc
diff --git a/ui/wm/test/wm_test_helper.cc b/ui/wm/test/wm_test_helper.cc
index 83166be9aad299bf55f6cd06a027acfae24242e0..25d3b300e5f80b37e948a2555be46a30ba157ab2 100644
--- a/ui/wm/test/wm_test_helper.cc
+++ b/ui/wm/test/wm_test_helper.cc
@@ -6,11 +6,18 @@
#include "ui/aura/client/default_capture_client.h"
#include "ui/aura/env.h"
-#include "ui/aura/test/test_focus_client.h"
#include "ui/aura/window.h"
#include "ui/wm/core/compound_event_filter.h"
#include "ui/wm/core/default_activation_client.h"
+#if defined(OS_ANDROID)
+#include "ui/wm/android/android_focus_rules.h"
+#include "ui/wm/core/base_focus_rules.h"
+#include "ui/wm/core/focus_controller.h"
+#else
+#include "ui/aura/test/test_focus_client.h"
+#endif
+
namespace wm {
WMTestHelper::WMTestHelper(const gfx::Size& default_window_size,
@@ -21,7 +28,12 @@ WMTestHelper::WMTestHelper(const gfx::Size& default_window_size,
host_->InitHost();
aura::client::SetWindowTreeClient(host_->window(), this);
+#if defined(OS_ANDROID)
+ AndroidFocusRules* focus_rules = new AndroidFocusRules();
+ focus_client_.reset(new FocusController(focus_rules));
+#else
focus_client_.reset(new aura::test::TestFocusClient);
+#endif
sadrul 2015/10/19 15:36:11 Is there a reason to want to use the FocusControll
bshe 2015/11/03 19:40:39 My understanding is that we might use this test he
aura::client::SetFocusClient(host_->window(), focus_client_.get());
root_window_event_filter_.reset(new wm::CompoundEventFilter);
« ui/wm/android/android_focus_rules.cc ('K') | « ui/wm/android/android_focus_rules.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698