OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 CC_TREES_PROXY_MAIN_H_ | 5 #ifndef CC_TREES_PROXY_MAIN_H_ |
6 #define CC_TREES_PROXY_MAIN_H_ | 6 #define CC_TREES_PROXY_MAIN_H_ |
7 | 7 |
8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
| 9 #include "cc/animation/animation_events.h" |
9 #include "cc/base/cc_export.h" | 10 #include "cc/base/cc_export.h" |
| 11 #include "cc/debug/frame_timing_tracker.h" |
| 12 #include "cc/output/renderer_capabilities.h" |
| 13 #include "cc/trees/proxy_common.h" |
10 | 14 |
11 namespace cc { | 15 namespace cc { |
12 class ThreadedChannel; | 16 class ThreadedChannel; |
13 | 17 |
14 // TODO(khushalsagar): The main side of ThreadProxy. It is currently defined as | 18 // TODO(khushalsagar): The main side of ThreadProxy. It is currently defined as |
15 // an interface with the implementation provided by ThreadProxy and will be | 19 // an interface with the implementation provided by ThreadProxy and will be |
16 // made an independent class. | 20 // made an independent class. |
17 // The methods added to this interface should only use the MainThreadOnly or | 21 // The methods added to this interface should only use the MainThreadOnly or |
18 // BlockedMainThread variables from ThreadProxy. | 22 // BlockedMainThread variables from ThreadProxy. |
19 // See crbug/527200. | 23 // See crbug/527200. |
20 class CC_EXPORT ProxyMain { | 24 class CC_EXPORT ProxyMain { |
21 public: | 25 public: |
22 // TODO(khushalsagar): Make this ChannelMain*. When ProxyMain and | 26 // TODO(khushalsagar): Make this ChannelMain*. When ProxyMain and |
23 // ProxyImpl are split, ProxyImpl will be passed a reference to ChannelImpl | 27 // ProxyImpl are split, ProxyImpl will be passed a reference to ChannelImpl |
24 // at creation. Right now we just set it directly from ThreadedChannel | 28 // at creation. Right now we just set it directly from ThreadedChannel |
25 // when the impl side is initialized. | 29 // when the impl side is initialized. |
26 virtual void SetChannel(scoped_ptr<ThreadedChannel> threaded_channel) = 0; | 30 virtual void SetChannel(scoped_ptr<ThreadedChannel> threaded_channel) = 0; |
27 | 31 |
28 // Callback for main side commands received from the Channel. | 32 // Callback for main side commands received from the Channel. |
29 virtual void DidCompleteSwapBuffers() = 0; | 33 virtual void DidCompleteSwapBuffers() = 0; |
| 34 virtual void SetRendererCapabilitiesMainCopy( |
| 35 const RendererCapabilities& capabilities) = 0; |
| 36 virtual void BeginMainFrameNotExpectedSoon() = 0; |
| 37 virtual void DidCommitAndDrawFrame() = 0; |
| 38 virtual void SetAnimationEvents(scoped_ptr<AnimationEventsVector> queue) = 0; |
| 39 virtual void DidLoseOutputSurface() = 0; |
| 40 virtual void RequestNewOutputSurface() = 0; |
| 41 virtual void DidInitializeOutputSurface( |
| 42 bool success, |
| 43 const RendererCapabilities& capabilities) = 0; |
| 44 virtual void DidCompletePageScaleAnimation() = 0; |
| 45 virtual void PostFrameTimingEventsOnMain( |
| 46 scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events, |
| 47 scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) = 0; |
| 48 virtual void BeginMainFrame( |
| 49 scoped_ptr<BeginMainFrameAndCommitState> begin_main_frame_state) = 0; |
30 | 50 |
31 // TODO(khushalsagar): Rename as GetWeakPtr() once ThreadProxy is split. | 51 // TODO(khushalsagar): Rename as GetWeakPtr() once ThreadProxy is split. |
32 virtual base::WeakPtr<ProxyMain> GetMainWeakPtr() = 0; | 52 virtual base::WeakPtr<ProxyMain> GetMainWeakPtr() = 0; |
33 | 53 |
34 protected: | 54 protected: |
35 virtual ~ProxyMain() {} | 55 virtual ~ProxyMain() {} |
36 }; | 56 }; |
37 | 57 |
38 } // namespace cc | 58 } // namespace cc |
39 | 59 |
40 #endif // CC_TREES_PROXY_MAIN_H_ | 60 #endif // CC_TREES_PROXY_MAIN_H_ |
OLD | NEW |