Make sure webrtc::VideoSourceInterface is released on the main render thread.
[chromium-blink-merge.git] / content / public / browser / android / compositor_client.h
blobd835de199d7fa58adb8722e9956602b28b2c575c
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 CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_CLIENT_H_
6 #define CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_CLIENT_H_
8 #include "content/common/content_export.h"
10 namespace content {
12 class CONTENT_EXPORT CompositorClient {
13 public:
14 // Tells the client that it should schedule a composite.
15 virtual void ScheduleComposite() = 0;
17 // The compositor has completed swapping a frame.
18 virtual void OnSwapBuffersCompleted() {}
20 // The compositor will eventually swap a frame.
21 virtual void OnSwapBuffersPosted() {}
23 // Tells the client that GL resources were lost and need to be reinitialized.
24 virtual void DidLoseResources() {}
26 // Tells the client that UI resources were lost and need to be reinitialized.
27 virtual void DidLoseUIResources() {}
29 // Mark the UI Resources as being invalid for use.
30 virtual void UIResourcesAreInvalid() {}
32 protected:
33 CompositorClient() {}
34 virtual ~CompositorClient() {}
36 private:
37 DISALLOW_COPY_AND_ASSIGN(CompositorClient);
40 } // namespace content
42 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_CLIENT_H_