#ifndef ASH_HOST_ASH_WINDOW_TREE_HOST_H_
#define ASH_HOST_ASH_WINDOW_TREE_HOST_H_
#include <memory>
#include "ash/ash_export.h"
#include "ui/display/display.h"
namespace aura {
class WindowTreeHost;
}
namespace gfx {
class Insets;
class Rect;
}
namespace ui {
class LocatedEvent;
}
namespace ash {
struct AshWindowTreeHostInitParams;
class RootWindowTransformer;
class ASH_EXPORT AshWindowTreeHost {
public:
AshWindowTreeHost();
virtual ~AshWindowTreeHost();
static std::unique_ptr<AshWindowTreeHost> Create(
const AshWindowTreeHostInitParams& init_params);
virtual void ConfineCursorToRootWindow() = 0;
virtual void ConfineCursorToBoundsInRoot(const gfx::Rect& bounds_in_root) = 0;
virtual gfx::Rect GetLastCursorConfineBoundsInPixels() const = 0;
virtual void SetRootWindowTransformer(
std::unique_ptr<RootWindowTransformer> transformer) = 0;
virtual gfx::Insets GetHostInsets() const = 0;
virtual aura::WindowTreeHost* AsWindowTreeHost() = 0;
virtual void PrepareForShutdown() {}
virtual void RegisterMirroringHost(AshWindowTreeHost* mirroring_ash_host) {}
virtual void UpdateCursorConfig() = 0;
virtual void ClearCursorConfig() = 0;
virtual void UpdateRootWindowSize() = 0;
protected:
bool allow_confine_cursor() const { return allow_confine_cursor_; }
void TranslateLocatedEvent(ui::LocatedEvent* event);
private:
const bool allow_confine_cursor_;
};
}
#endif