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

Side by Side Diff: ui/ozone/platform/dri/dri_window.h

Issue 469343003: [Ozone-GBM] Pumb DriWindowDelegate throughout the platform (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 6 years, 4 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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_OZONE_PLATFORM_DRI_DRI_WINDOW_H_ 5 #ifndef UI_OZONE_PLATFORM_DRI_DRI_WINDOW_H_
6 #define UI_OZONE_PLATFORM_DRI_DRI_WINDOW_H_ 6 #define UI_OZONE_PLATFORM_DRI_DRI_WINDOW_H_
7 7
8 #include "base/memory/scoped_ptr.h"
8 #include "ui/events/platform/platform_event_dispatcher.h" 9 #include "ui/events/platform/platform_event_dispatcher.h"
9 #include "ui/gfx/geometry/rect.h" 10 #include "ui/gfx/geometry/rect.h"
10 #include "ui/gfx/native_widget_types.h" 11 #include "ui/gfx/native_widget_types.h"
11 #include "ui/platform_window/platform_window.h" 12 #include "ui/platform_window/platform_window.h"
12 13
13 namespace ui { 14 namespace ui {
14 15
15 class DriSurfaceFactory; 16 class DriWindowDelegate;
16 class EventFactoryEvdev; 17 class EventFactoryEvdev;
17 18
18 class DriWindow : public PlatformWindow, 19 class DriWindow : public PlatformWindow,
19 public PlatformEventDispatcher { 20 public PlatformEventDispatcher {
20 public: 21 public:
21 DriWindow(PlatformWindowDelegate* delegate, 22 DriWindow(PlatformWindowDelegate* delegate,
22 const gfx::Rect& bounds, 23 const gfx::Rect& bounds,
23 DriSurfaceFactory* surface_factory, 24 scoped_ptr<DriWindowDelegate> dri_window_delegate,
24 EventFactoryEvdev* event_factory); 25 EventFactoryEvdev* event_factory);
25 virtual ~DriWindow(); 26 virtual ~DriWindow();
26 27
27 // PlatformWindow: 28 // PlatformWindow:
28 virtual void Show() OVERRIDE; 29 virtual void Show() OVERRIDE;
29 virtual void Hide() OVERRIDE; 30 virtual void Hide() OVERRIDE;
30 virtual void Close() OVERRIDE; 31 virtual void Close() OVERRIDE;
31 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; 32 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
32 virtual gfx::Rect GetBounds() OVERRIDE; 33 virtual gfx::Rect GetBounds() OVERRIDE;
33 virtual void SetCapture() OVERRIDE; 34 virtual void SetCapture() OVERRIDE;
34 virtual void ReleaseCapture() OVERRIDE; 35 virtual void ReleaseCapture() OVERRIDE;
35 virtual void ToggleFullscreen() OVERRIDE; 36 virtual void ToggleFullscreen() OVERRIDE;
36 virtual void Maximize() OVERRIDE; 37 virtual void Maximize() OVERRIDE;
37 virtual void Minimize() OVERRIDE; 38 virtual void Minimize() OVERRIDE;
38 virtual void Restore() OVERRIDE; 39 virtual void Restore() OVERRIDE;
39 virtual void SetCursor(PlatformCursor cursor) OVERRIDE; 40 virtual void SetCursor(PlatformCursor cursor) OVERRIDE;
40 virtual void MoveCursorTo(const gfx::Point& location) OVERRIDE; 41 virtual void MoveCursorTo(const gfx::Point& location) OVERRIDE;
41 42
42 // PlatformEventDispatcher: 43 // PlatformEventDispatcher:
43 virtual bool CanDispatchEvent(const PlatformEvent& event) OVERRIDE; 44 virtual bool CanDispatchEvent(const PlatformEvent& event) OVERRIDE;
44 virtual uint32_t DispatchEvent(const PlatformEvent& event) OVERRIDE; 45 virtual uint32_t DispatchEvent(const PlatformEvent& event) OVERRIDE;
45 46
46 private: 47 private:
47 PlatformWindowDelegate* delegate_; 48 PlatformWindowDelegate* delegate_;
48 gfx::Rect bounds_; 49 gfx::Rect bounds_;
49 gfx::AcceleratedWidget widget_; 50 gfx::AcceleratedWidget widget_;
51 scoped_ptr<DriWindowDelegate> dri_window_delegate_;
50 EventFactoryEvdev* event_factory_; 52 EventFactoryEvdev* event_factory_;
51 53
52 DISALLOW_COPY_AND_ASSIGN(DriWindow); 54 DISALLOW_COPY_AND_ASSIGN(DriWindow);
53 }; 55 };
54 56
55 } // namespace ui 57 } // namespace ui
56 58
57 #endif // UI_OZONE_PLATFORM_DRI_DRI_WINDOW_H_ 59 #endif // UI_OZONE_PLATFORM_DRI_DRI_WINDOW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698