1868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)// Copyright 2013 The Chromium Authors. All rights reserved. 22a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 32a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// found in the LICENSE file. 42a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 5868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)#ifndef UI_BASE_TEST_UI_CONTROLS_INTERNAL_WIN_H_ 6868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)#define UI_BASE_TEST_UI_CONTROLS_INTERNAL_WIN_H_ 72a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 82a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#include "base/callback_forward.h" 9868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)#include "ui/base/test/ui_controls.h" 102a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 112a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)namespace ui_controls { 122a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)namespace internal { 132a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 142a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// A utility functions for windows to send key or mouse events and 152a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// run the task. These functions are internal, but exported so that 162a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// aura implementation can use these utility functions. 172a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)bool SendKeyPressImpl(HWND hwnd, 182a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) ui::KeyboardCode key, 192a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) bool control, 202a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) bool shift, 212a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) bool alt, 222a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) const base::Closure& task); 235d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)bool SendMouseMoveImpl(long screen_x, long screen_y, const base::Closure& task); 242a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)bool SendMouseEventsImpl(MouseButton type, 252a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) int state, 262a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) const base::Closure& task); 272a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)void RunClosureAfterAllPendingUITasksImpl(const base::Closure& task); 282a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 292a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)} // namespace internal 302a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)} // namespace ui_controls 312a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 32868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)#endif // UI_BASE_TEST_UI_CONTROLS_INTERNAL_WIN_H_ 33