OLD | NEW |
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_IMPL_DRI_VSYNC_PROVIDER_H_ | 5 #ifndef UI_OZONE_PLATFORM_IMPL_DRI_VSYNC_PROVIDER_H_ |
6 #define UI_OZONE_PLATFORM_IMPL_DRI_VSYNC_PROVIDER_H_ | 6 #define UI_OZONE_PLATFORM_IMPL_DRI_VSYNC_PROVIDER_H_ |
7 | 7 |
8 #include "base/memory/weak_ptr.h" | |
9 #include "ui/gfx/vsync_provider.h" | 8 #include "ui/gfx/vsync_provider.h" |
10 | 9 |
11 namespace ui { | 10 namespace ui { |
12 | 11 |
13 class HardwareDisplayController; | 12 class DriWindowDelegate; |
14 | 13 |
15 class DriVSyncProvider : public gfx::VSyncProvider { | 14 class DriVSyncProvider : public gfx::VSyncProvider { |
16 public: | 15 public: |
17 DriVSyncProvider(const base::WeakPtr<HardwareDisplayController>& controller); | 16 DriVSyncProvider(DriWindowDelegate* window_delegate); |
18 virtual ~DriVSyncProvider(); | 17 virtual ~DriVSyncProvider(); |
19 | 18 |
20 virtual void GetVSyncParameters(const UpdateVSyncCallback& callback) OVERRIDE; | 19 virtual void GetVSyncParameters(const UpdateVSyncCallback& callback) OVERRIDE; |
21 | 20 |
22 private: | 21 private: |
23 base::WeakPtr<HardwareDisplayController> controller_; | 22 DriWindowDelegate* window_delegate_; // Not owned. |
24 | 23 |
25 DISALLOW_COPY_AND_ASSIGN(DriVSyncProvider); | 24 DISALLOW_COPY_AND_ASSIGN(DriVSyncProvider); |
26 }; | 25 }; |
27 | 26 |
28 } // namespace ui | 27 } // namespace ui |
29 | 28 |
30 #endif // UI_OZONE_PLATFORM_IMPL_DRI_VSYNC_PROVIDER_H_ | 29 #endif // UI_OZONE_PLATFORM_IMPL_DRI_VSYNC_PROVIDER_H_ |
OLD | NEW |