1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef UI_AURA_WINDOW_TREE_HOST_OZONE_H_
6 #define UI_AURA_WINDOW_TREE_HOST_OZONE_H_
10 #include "base/memory/scoped_ptr.h"
11 #include "ui/aura/window_tree_host.h"
12 #include "ui/events/event_source.h"
13 #include "ui/events/platform/platform_event_dispatcher.h"
14 #include "ui/gfx/insets.h"
15 #include "ui/gfx/rect.h"
19 class AURA_EXPORT WindowTreeHostOzone
: public WindowTreeHost
,
20 public ui::EventSource
,
21 public ui::PlatformEventDispatcher
{
23 explicit WindowTreeHostOzone(const gfx::Rect
& bounds
);
24 virtual ~WindowTreeHostOzone();
27 // ui::PlatformEventDispatcher:
28 virtual bool CanDispatchEvent(const ui::PlatformEvent
& event
) OVERRIDE
;
29 virtual uint32_t DispatchEvent(const ui::PlatformEvent
& event
) OVERRIDE
;
32 virtual ui::EventSource
* GetEventSource() OVERRIDE
;
33 virtual gfx::AcceleratedWidget
GetAcceleratedWidget() OVERRIDE
;
34 virtual void Show() OVERRIDE
;
35 virtual void Hide() OVERRIDE
;
36 virtual gfx::Rect
GetBounds() const OVERRIDE
;
37 virtual void SetBounds(const gfx::Rect
& bounds
) OVERRIDE
;
38 virtual gfx::Point
GetLocationOnNativeScreen() const OVERRIDE
;
39 virtual void SetCapture() OVERRIDE
;
40 virtual void ReleaseCapture() OVERRIDE
;
41 virtual void PostNativeEvent(const base::NativeEvent
& event
) OVERRIDE
;
42 virtual void OnDeviceScaleFactorChanged(float device_scale_factor
) OVERRIDE
;
43 virtual void SetCursorNative(gfx::NativeCursor cursor_type
) OVERRIDE
;
44 virtual void MoveCursorToNative(const gfx::Point
& location
) OVERRIDE
;
45 virtual void OnCursorVisibilityChangedNative(bool show
) OVERRIDE
;
47 // ui::EventSource overrides.
48 virtual ui::EventProcessor
* GetEventProcessor() OVERRIDE
;
50 gfx::AcceleratedWidget widget_
;
53 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostOzone
);
58 #endif // UI_AURA_WINDOW_TREE_HOST_OZONE_H_