1 // Copyright 2014 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_OZONE_COMMON_WINDOW_PLATFORM_WINDOW_COMPAT_H_
6 #define UI_OZONE_COMMON_WINDOW_PLATFORM_WINDOW_COMPAT_H_
8 #include "ui/base/cursor/cursor.h"
9 #include "ui/events/platform/platform_event_dispatcher.h"
10 #include "ui/gfx/geometry/rect.h"
11 #include "ui/gfx/native_widget_types.h"
12 #include "ui/ozone/ozone_export.h"
13 #include "ui/platform_window/platform_window.h"
22 class PlatformWindowDelegate
;
24 // This is just transitional code. Will be removed shortly.
25 class OZONE_EXPORT PlatformWindowCompat
: public PlatformWindow
,
26 public ui::PlatformEventDispatcher
{
28 PlatformWindowCompat(PlatformWindowDelegate
* delegate
,
29 const gfx::Rect
& bounds
);
30 virtual ~PlatformWindowCompat();
32 // ui::PlatformEventDispatcher:
33 virtual bool CanDispatchEvent(const ui::PlatformEvent
& event
) OVERRIDE
;
34 virtual uint32_t DispatchEvent(const ui::PlatformEvent
& event
) OVERRIDE
;
37 virtual gfx::Rect
GetBounds() OVERRIDE
;
38 virtual void SetBounds(const gfx::Rect
& bounds
) OVERRIDE
;
39 virtual void Show() OVERRIDE
;
40 virtual void Hide() OVERRIDE
;
41 virtual void Close() OVERRIDE
;
42 virtual void SetCapture() OVERRIDE
;
43 virtual void ReleaseCapture() OVERRIDE
;
44 virtual void ToggleFullscreen() OVERRIDE
;
45 virtual void Maximize() OVERRIDE
;
46 virtual void Minimize() OVERRIDE
;
47 virtual void Restore() OVERRIDE
;
50 PlatformWindowDelegate
* delegate_
;
51 gfx::AcceleratedWidget widget_
;
54 DISALLOW_COPY_AND_ASSIGN(PlatformWindowCompat
);
59 #endif // UI_OZONE_COMMON_WINDOW_PLATFORM_WINDOW_COMPAT_H_