summaryrefslogtreecommitdiffstats
path: root/ui/aura/window_tree_host_ozone.h
diff options
context:
space:
mode:
authorspang@chromium.org <spang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-16 23:27:06 +0000
committerspang@chromium.org <spang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-16 23:27:06 +0000
commit6fa58150d06d0bbd3fa74f7f04ebe7e911b16dff (patch)
treef768a6ef55e2e066319c2d5cc28058aa8f84b1a7 /ui/aura/window_tree_host_ozone.h
parentf0324ee10c73d7f79eb45f097cb8ab08494ecd11 (diff)
downloadchromium_src-6fa58150d06d0bbd3fa74f7f04ebe7e911b16dff.zip
chromium_src-6fa58150d06d0bbd3fa74f7f04ebe7e911b16dff.tar.gz
chromium_src-6fa58150d06d0bbd3fa74f7f04ebe7e911b16dff.tar.bz2
ozone: Port WindowTreeHostOzone on top of PlatformWindow
Most of the WindowTreeHost functionality is actually implemented by the platform window, so there's not much in WindowTreeHostOzone aside from forwarding calls to and from the platform part. Should be no functional change for in-tree platforms. To accomplish that, this adds a transitional class PlatformWindowCompat that implements PlatformWindow functions as WindowTreeHostOzone did before. As a followup, we'll convert each platform to use the new PlatformWindow natively & then remove PlatformWindowCompat. BUG=392280 TEST=built with chromeos==1 use_ozone==1 & ran all platforms. NOTRY=true TBR=ben@chromium.org Review URL: https://codereview.chromium.org/375053002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@283573 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/aura/window_tree_host_ozone.h')
-rw-r--r--ui/aura/window_tree_host_ozone.h29
1 files changed, 20 insertions, 9 deletions
diff --git a/ui/aura/window_tree_host_ozone.h b/ui/aura/window_tree_host_ozone.h
index 672f063..bfaeab7 100644
--- a/ui/aura/window_tree_host_ozone.h
+++ b/ui/aura/window_tree_host_ozone.h
@@ -5,28 +5,36 @@
#ifndef UI_AURA_WINDOW_TREE_HOST_OZONE_H_
#define UI_AURA_WINDOW_TREE_HOST_OZONE_H_
-#include <vector>
-
#include "base/memory/scoped_ptr.h"
#include "ui/aura/window_tree_host.h"
#include "ui/events/event_source.h"
-#include "ui/events/platform/platform_event_dispatcher.h"
-#include "ui/gfx/insets.h"
#include "ui/gfx/rect.h"
+#include "ui/platform_window/platform_window_delegate.h"
+
+namespace ui {
+class PlatformWindow;
+}
namespace aura {
class AURA_EXPORT WindowTreeHostOzone : public WindowTreeHost,
public ui::EventSource,
- public ui::PlatformEventDispatcher {
+ public ui::PlatformWindowDelegate {
public:
explicit WindowTreeHostOzone(const gfx::Rect& bounds);
virtual ~WindowTreeHostOzone();
private:
- // ui::PlatformEventDispatcher:
- virtual bool CanDispatchEvent(const ui::PlatformEvent& event) OVERRIDE;
- virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) OVERRIDE;
+ // ui::PlatformWindowDelegate:
+ virtual void OnBoundsChanged(const gfx::Rect&) OVERRIDE;
+ virtual void OnDamageRect(const gfx::Rect& damaged_region) OVERRIDE;
+ virtual void DispatchEvent(ui::Event* event) OVERRIDE;
+ virtual void OnCloseRequest() OVERRIDE;
+ virtual void OnClosed() OVERRIDE;
+ virtual void OnWindowStateChanged(ui::PlatformWindowState new_state) OVERRIDE;
+ virtual void OnLostCapture() OVERRIDE;
+ virtual void OnAcceleratedWidgetAvailable(
+ gfx::AcceleratedWidget widget) OVERRIDE;
// WindowTreeHost:
virtual ui::EventSource* GetEventSource() OVERRIDE;
@@ -46,8 +54,11 @@ class AURA_EXPORT WindowTreeHostOzone : public WindowTreeHost,
// ui::EventSource overrides.
virtual ui::EventProcessor* GetEventProcessor() OVERRIDE;
+ // Platform-specific part of this WindowTreeHost.
+ scoped_ptr<ui::PlatformWindow> platform_window_;
+
+ // The identifier used to create a compositing surface.
gfx::AcceleratedWidget widget_;
- gfx::Rect bounds_;
DISALLOW_COPY_AND_ASSIGN(WindowTreeHostOzone);
};