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

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

Issue 556073003: [Ozone-DRI] Do proper bounds checks when moving the cursor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@restore-cursor
Patch Set: . Created 6 years, 3 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
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 "base/memory/scoped_ptr.h"
9 #include "ui/events/platform/platform_event_dispatcher.h" 9 #include "ui/events/platform/platform_event_dispatcher.h"
10 #include "ui/gfx/geometry/rect.h" 10 #include "ui/gfx/geometry/rect.h"
11 #include "ui/gfx/native_widget_types.h" 11 #include "ui/gfx/native_widget_types.h"
12 #include "ui/platform_window/platform_window.h" 12 #include "ui/platform_window/platform_window.h"
13 13
14 namespace ui { 14 namespace ui {
15 15
16 class DriCursor; 16 class DriCursor;
17 class DriWindowDelegate; 17 class DriWindowDelegate;
18 class DriWindowDelegateManager;
18 class DriWindowManager; 19 class DriWindowManager;
19 class EventFactoryEvdev; 20 class EventFactoryEvdev;
20 21
21 class DriWindow : public PlatformWindow, 22 class DriWindow : public PlatformWindow,
22 public PlatformEventDispatcher { 23 public PlatformEventDispatcher {
23 public: 24 public:
24 DriWindow(PlatformWindowDelegate* delegate, 25 DriWindow(PlatformWindowDelegate* delegate,
25 const gfx::Rect& bounds, 26 const gfx::Rect& bounds,
26 scoped_ptr<DriWindowDelegate> dri_window_delegate, 27 scoped_ptr<DriWindowDelegate> dri_window_delegate,
27 EventFactoryEvdev* event_factory, 28 EventFactoryEvdev* event_factory,
29 DriWindowDelegateManager* window_delegate_manager,
28 DriWindowManager* window_manager, 30 DriWindowManager* window_manager,
29 DriCursor* cursor); 31 DriCursor* cursor);
30 virtual ~DriWindow(); 32 virtual ~DriWindow();
31 33
32 void Initialize(); 34 void Initialize();
33 35
34 // PlatformWindow: 36 // PlatformWindow:
35 virtual void Show() OVERRIDE; 37 virtual void Show() OVERRIDE;
36 virtual void Hide() OVERRIDE; 38 virtual void Hide() OVERRIDE;
37 virtual void Close() OVERRIDE; 39 virtual void Close() OVERRIDE;
(...skipping 11 matching lines...) Expand all
49 // PlatformEventDispatcher: 51 // PlatformEventDispatcher:
50 virtual bool CanDispatchEvent(const PlatformEvent& event) OVERRIDE; 52 virtual bool CanDispatchEvent(const PlatformEvent& event) OVERRIDE;
51 virtual uint32_t DispatchEvent(const PlatformEvent& event) OVERRIDE; 53 virtual uint32_t DispatchEvent(const PlatformEvent& event) OVERRIDE;
52 54
53 private: 55 private:
54 PlatformWindowDelegate* delegate_; 56 PlatformWindowDelegate* delegate_;
55 gfx::Rect bounds_; 57 gfx::Rect bounds_;
56 gfx::AcceleratedWidget widget_; 58 gfx::AcceleratedWidget widget_;
57 DriWindowDelegate* dri_window_delegate_; 59 DriWindowDelegate* dri_window_delegate_;
58 EventFactoryEvdev* event_factory_; 60 EventFactoryEvdev* event_factory_;
61 DriWindowDelegateManager* window_delegate_manager_;
59 DriWindowManager* window_manager_; 62 DriWindowManager* window_manager_;
60 DriCursor* cursor_; 63 DriCursor* cursor_;
61 64
62 DISALLOW_COPY_AND_ASSIGN(DriWindow); 65 DISALLOW_COPY_AND_ASSIGN(DriWindow);
63 }; 66 };
64 67
65 } // namespace ui 68 } // namespace ui
66 69
67 #endif // UI_OZONE_PLATFORM_DRI_DRI_WINDOW_H_ 70 #endif // UI_OZONE_PLATFORM_DRI_DRI_WINDOW_H_
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/dri_surface_factory_unittest.cc ('k') | ui/ozone/platform/dri/dri_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698