[refactor] More post-NSS WebCrypto cleanups (utility functions).
[chromium-blink-merge.git] / cc / scheduler / video_frame_controller.h
blob0307cd5e4023023dc720a969a74dc13fdd66ea6f
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 CC_SCHEDULER_VIDEO_FRAME_CONTROLLER_H_
6 #define CC_SCHEDULER_VIDEO_FRAME_CONTROLLER_H_
8 #include "cc/base/cc_export.h"
9 #include "cc/output/begin_frame_args.h"
11 namespace cc {
13 class VideoFrameController;
15 class CC_EXPORT VideoFrameControllerClient {
16 public:
17 virtual void AddVideoFrameController(VideoFrameController* controller) = 0;
18 virtual void RemoveVideoFrameController(VideoFrameController* controller) = 0;
20 protected:
21 virtual ~VideoFrameControllerClient() {}
24 // TODO(sunnyps): Consider making this a BeginFrameObserver some day.
25 class CC_EXPORT VideoFrameController {
26 public:
27 virtual void OnBeginFrame(const BeginFrameArgs& args) = 0;
29 // Called upon completion of LayerTreeHostImpl::DidDrawAllLayers(), regardless
30 // of whether the controller issued a SetNeedsRedraw(). May be used to
31 // determine when SetNeedsRedraw() is called but the draw is aborted.
32 virtual void DidDrawFrame() = 0;
34 protected:
35 virtual ~VideoFrameController() {}
38 } // namespace cc
40 #endif // CC_SCHEDULER_VIDEO_FRAME_CONTROLLER_H_