Exclude TrayIMETest.PerformActionOnDetailedView under valgrind, where it crashes.
[chromium-blink-merge.git] / ui / gfx / vsync_provider.h
blob90464bcbf6841ec89840fcca970756338ff39b21
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
3 // found in the LICENSE file.
5 #ifndef UI_GFX_VSYNC_PROVIDER_H_
6 #define UI_GFX_VSYNC_PROVIDER_H_
8 #include "base/callback.h"
9 #include "base/time/time.h"
10 #include "ui/gfx/gfx_export.h"
12 namespace gfx {
14 class GFX_EXPORT VSyncProvider {
15 public:
16 virtual ~VSyncProvider() {}
18 typedef base::Callback<
19 void(const base::TimeTicks timebase, const base::TimeDelta interval)>
20 UpdateVSyncCallback;
22 // Get the time of the most recent screen refresh, along with the time
23 // between consecutive refreshes. The callback is called as soon as
24 // the data is available: it could be immediately from this method,
25 // later via a PostTask to the current MessageLoop, or never (if we have
26 // no data source). We provide the strong guarantee that the callback will
27 // not be called once the instance of this class is destroyed.
28 virtual void GetVSyncParameters(const UpdateVSyncCallback& callback) = 0;
31 } // namespace gfx
33 #endif // UI_GFX_VSYNC_PROVIDER_H_