Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Side by Side Diff: ui/aura/window_tree_host_ozone.h

Issue 275263002: [wip] ozonex: X11 backend for ozone. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/aura/DEPS ('k') | ui/aura/window_tree_host_ozone.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_AURA_WINDOW_TREE_HOST_OZONE_H_ 5 #ifndef UI_AURA_WINDOW_TREE_HOST_OZONE_H_
6 #define UI_AURA_WINDOW_TREE_HOST_OZONE_H_ 6 #define UI_AURA_WINDOW_TREE_HOST_OZONE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "ui/aura/window_tree_host.h" 11 #include "ui/aura/window_tree_host.h"
12 #include "ui/events/event_source.h" 12 #include "ui/events/event_source.h"
13 #include "ui/events/platform/platform_event_dispatcher.h"
14 #include "ui/gfx/insets.h" 13 #include "ui/gfx/insets.h"
15 #include "ui/gfx/rect.h" 14 #include "ui/gfx/rect.h"
15 #include "ui/platform_window/platform_window_delegate.h"
16 16
17 namespace aura { 17 namespace aura {
18 18
19 class AURA_EXPORT WindowTreeHostOzone : public WindowTreeHost, 19 class AURA_EXPORT WindowTreeHostOzone : public WindowTreeHost,
20 public ui::EventSource, 20 public ui::EventSource,
21 public ui::PlatformEventDispatcher { 21 public ui::PlatformWindowDelegate {
22 public: 22 public:
23 explicit WindowTreeHostOzone(const gfx::Rect& bounds); 23 explicit WindowTreeHostOzone(const gfx::Rect& bounds);
24 virtual ~WindowTreeHostOzone(); 24 virtual ~WindowTreeHostOzone();
25 25
26 private: 26 private:
27 // ui::PlatformEventDispatcher:
28 virtual bool CanDispatchEvent(const ui::PlatformEvent& event) OVERRIDE;
29 virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) OVERRIDE;
30
31 // WindowTreeHost: 27 // WindowTreeHost:
32 virtual ui::EventSource* GetEventSource() OVERRIDE; 28 virtual ui::EventSource* GetEventSource() OVERRIDE;
33 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; 29 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
34 virtual void Show() OVERRIDE; 30 virtual void Show() OVERRIDE;
35 virtual void Hide() OVERRIDE; 31 virtual void Hide() OVERRIDE;
36 virtual gfx::Rect GetBounds() const OVERRIDE; 32 virtual gfx::Rect GetBounds() const OVERRIDE;
37 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; 33 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
38 virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE; 34 virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE;
39 virtual void SetCapture() OVERRIDE; 35 virtual void SetCapture() OVERRIDE;
40 virtual void ReleaseCapture() OVERRIDE; 36 virtual void ReleaseCapture() OVERRIDE;
41 virtual void PostNativeEvent(const base::NativeEvent& event) OVERRIDE; 37 virtual void PostNativeEvent(const base::NativeEvent& event) OVERRIDE;
42 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE; 38 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE;
43 virtual void SetCursorNative(gfx::NativeCursor cursor_type) OVERRIDE; 39 virtual void SetCursorNative(gfx::NativeCursor cursor_type) OVERRIDE;
44 virtual void MoveCursorToNative(const gfx::Point& location) OVERRIDE; 40 virtual void MoveCursorToNative(const gfx::Point& location) OVERRIDE;
45 virtual void OnCursorVisibilityChangedNative(bool show) OVERRIDE; 41 virtual void OnCursorVisibilityChangedNative(bool show) OVERRIDE;
46 42
47 // ui::EventSource overrides. 43 // ui::EventSource overrides.
48 virtual ui::EventProcessor* GetEventProcessor() OVERRIDE; 44 virtual ui::EventProcessor* GetEventProcessor() OVERRIDE;
49 45
46 // ui::PlatformWindowDelegate:
47 virtual void OnBoundsChanged(const gfx::Rect& new_bounds) OVERRIDE;
48 virtual void OnDamageRect(const gfx::Rect& damaged_region) OVERRIDE;
49 virtual void DispatchEvent(ui::Event* event) OVERRIDE;
50 virtual void OnCloseRequest() OVERRIDE;
51 virtual void OnClosed() OVERRIDE;
52 virtual void OnWindowStateChanged(ui::PlatformWindowState new_state) OVERRIDE;
53 virtual void OnLostCapture() OVERRIDE;
54
50 gfx::AcceleratedWidget widget_; 55 gfx::AcceleratedWidget widget_;
51 gfx::Rect bounds_; 56 gfx::Rect bounds_;
52 57
53 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostOzone); 58 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostOzone);
54 }; 59 };
55 60
56 } // namespace aura 61 } // namespace aura
57 62
58 #endif // UI_AURA_WINDOW_TREE_HOST_OZONE_H_ 63 #endif // UI_AURA_WINDOW_TREE_HOST_OZONE_H_
OLDNEW
« no previous file with comments | « ui/aura/DEPS ('k') | ui/aura/window_tree_host_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698