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

Unified Diff: ui/aura/test/ui_controls_factory_ozone.cc

Issue 372743004: ozone: Fix interactive_ui_tests build (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
Index: ui/aura/test/ui_controls_factory_ozone.cc
diff --git a/ui/aura/test/ui_controls_factory_ozone.cc b/ui/aura/test/ui_controls_factory_ozone.cc
new file mode 100644
index 0000000000000000000000000000000000000000..1483b7101dc65b42418b7d94320e6f94886cc94c
--- /dev/null
+++ b/ui/aura/test/ui_controls_factory_ozone.cc
@@ -0,0 +1,87 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/bind.h"
+#include "base/logging.h"
+#include "ui/aura/test/ui_controls_factory_aura.h"
+#include "ui/aura/window_tree_host.h"
+#include "ui/base/test/ui_controls_aura.h"
+
+namespace aura {
+namespace test {
+namespace {
+
+class UIControlsOzone : public ui_controls::UIControlsAura {
+ public:
+ UIControlsOzone(WindowTreeHost* host) : host_(host) {}
sky 2014/07/09 20:17:49 explicit
+
+ virtual bool SendKeyPress(gfx::NativeWindow window,
+ ui::KeyboardCode key,
+ bool control,
+ bool shift,
+ bool alt,
+ bool command) OVERRIDE {
+ return SendKeyPressNotifyWhenDone(
+ window, key, control, shift, alt, command, base::Closure());
+ }
+ virtual bool SendKeyPressNotifyWhenDone(
+ gfx::NativeWindow window,
+ ui::KeyboardCode key,
+ bool control,
+ bool shift,
+ bool alt,
+ bool command,
+ const base::Closure& closure) OVERRIDE {
+ DCHECK(!command); // No command key on Aura
+ NOTIMPLEMENTED();
+ RunClosureAfterAllPendingUIEvents(closure);
+ return true;
+ }
+
+ virtual bool SendMouseMove(long screen_x, long screen_y) OVERRIDE {
+ return SendMouseMoveNotifyWhenDone(screen_x, screen_y, base::Closure());
+ }
+ virtual bool SendMouseMoveNotifyWhenDone(
+ long screen_x,
+ long screen_y,
+ const base::Closure& closure) OVERRIDE {
+ NOTIMPLEMENTED();
+ RunClosureAfterAllPendingUIEvents(closure);
+ return true;
+ }
+ virtual bool SendMouseEvents(ui_controls::MouseButton type,
+ int state) OVERRIDE {
+ return SendMouseEventsNotifyWhenDone(type, state, base::Closure());
+ }
+ virtual bool SendMouseEventsNotifyWhenDone(
+ ui_controls::MouseButton type,
+ int state,
+ const base::Closure& closure) OVERRIDE {
+ NOTIMPLEMENTED();
+ RunClosureAfterAllPendingUIEvents(closure);
+ return true;
+ }
+ virtual bool SendMouseClick(ui_controls::MouseButton type) OVERRIDE {
+ return SendMouseEvents(type, ui_controls::UP | ui_controls::DOWN);
+ }
+ virtual void RunClosureAfterAllPendingUIEvents(
+ const base::Closure& closure) OVERRIDE {
+ if (!closure.is_null())
+ closure.Run();
+ }
+
+ private:
+ WindowTreeHost* host_;
+
+ DISALLOW_COPY_AND_ASSIGN(UIControlsOzone);
+};
+
+} // namespace
+
+ui_controls::UIControlsAura* CreateUIControlsAura(WindowTreeHost* host) {
+ return new UIControlsOzone(host);
+}
+
+} // namespace test
+} // namespace aura
« chrome/browser/extensions/extension_commands_global_registry_apitest.cc ('K') | « ui/aura/aura.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698