Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
|
vmpstr
2016/01/11 21:50:15
2016
Khushal
2016/01/13 02:07:12
Done.
| |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CC_TREES_REMOTE_CHANNEL_MAIN_H_ | |
| 6 #define CC_TREES_REMOTE_CHANNEL_MAIN_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "cc/base/cc_export.h" | |
| 10 #include "cc/trees/channel_main.h" | |
| 11 #include "cc/trees/remote_proto_channel.h" | |
| 12 #include "cc/trees/task_runner_provider.h" | |
| 13 | |
| 14 namespace cc { | |
| 15 class ProxyMain; | |
| 16 | |
| 17 namespace proto { | |
| 18 class CompositorMessage; | |
| 19 } | |
| 20 | |
| 21 class CC_EXPORT RemoteChannelMain : public ChannelMain, | |
| 22 public RemoteProtoChannel::ProtoReceiver { | |
| 23 public: | |
| 24 static scoped_ptr<RemoteChannelMain> Create( | |
| 25 RemoteProtoChannel* remote_proto_channel, | |
| 26 ProxyMain* proxy_main, | |
| 27 TaskRunnerProvider* task_runner_provider); | |
| 28 | |
| 29 ~RemoteChannelMain() override; | |
| 30 | |
| 31 // ChannelMain implementation | |
| 32 void SetThrottleFrameProductionOnImpl(bool throttle) override; | |
| 33 void UpdateTopControlsStateOnImpl(TopControlsState constraints, | |
| 34 TopControlsState current, | |
| 35 bool animate) override; | |
| 36 void InitializeOutputSurfaceOnImpl(OutputSurface* output_surface) override; | |
| 37 void MainThreadHasStoppedFlingingOnImpl() override; | |
| 38 void SetInputThrottledUntilCommitOnImpl(bool is_throttled) override; | |
| 39 void SetDeferCommitsOnImpl(bool defer_commits) override; | |
| 40 void FinishAllRenderingOnImpl(CompletionEvent* completion) override; | |
| 41 void SetVisibleOnImpl(bool visible) override; | |
| 42 void ReleaseOutputSurfaceOnImpl(CompletionEvent* completion) override; | |
| 43 void MainFrameWillHappenOnImplForTesting( | |
| 44 CompletionEvent* completion, | |
| 45 bool* main_frame_will_happen) override; | |
| 46 void SetNeedsRedrawOnImpl(const gfx::Rect& damage_rect) override; | |
| 47 void SetNeedsCommitOnImpl() override; | |
| 48 void BeginMainFrameAbortedOnImpl( | |
| 49 CommitEarlyOutReason reason, | |
| 50 base::TimeTicks main_thread_start_time) override; | |
| 51 void StartCommitOnImpl(CompletionEvent* completion, | |
| 52 LayerTreeHost* layer_tree_host, | |
| 53 base::TimeTicks main_thread_start_time, | |
| 54 bool hold_commit_for_activation) override; | |
| 55 void SynchronouslyInitializeImpl( | |
| 56 LayerTreeHost* layer_tree_host, | |
| 57 scoped_ptr<BeginFrameSource> external_begin_frame_source) override; | |
| 58 void SynchronouslyCloseImpl() override; | |
| 59 | |
| 60 // RemoteProtoChannel::ProtoReceiver implementation | |
| 61 void OnProtoReceived(scoped_ptr<proto::CompositorMessage> proto) override; | |
| 62 | |
| 63 protected: | |
| 64 RemoteChannelMain(RemoteProtoChannel* remote_proto_channel, | |
| 65 ProxyMain* proxy_main, | |
| 66 TaskRunnerProvider* task_runner_provider); | |
| 67 | |
| 68 private: | |
| 69 void SendMessageProto(const proto::CompositorMessage& proto); | |
| 70 | |
| 71 RemoteProtoChannel* remote_proto_channel_; | |
| 72 ProxyMain* proxy_main_; | |
| 73 TaskRunnerProvider* task_runner_provider_; | |
| 74 | |
| 75 bool initialized_; | |
| 76 | |
| 77 DISALLOW_COPY_AND_ASSIGN(RemoteChannelMain); | |
| 78 }; | |
| 79 | |
| 80 } // namespace cc | |
| 81 | |
| 82 #endif // CC_TREES_REMOTE_CHANNEL_MAIN_H_ | |
| OLD | NEW |