Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(476)

Side by Side Diff: cc/trees/proxy_impl.h

Issue 1377063003: Split ThreadProxy methods to ProxyMain and ProxyImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Keep ProxyMain and ProxyImpl methods private. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/trees/proxy_common.cc ('k') | cc/trees/proxy_main.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_IMPL_H_ 5 #ifndef CC_TREES_PROXY_IMPL_H_
6 #define CC_TREES_PROXY_IMPL_H_ 6 #define CC_TREES_PROXY_IMPL_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "cc/base/cc_export.h" 9 #include "cc/base/cc_export.h"
10 #include "cc/base/completion_event.h"
10 #include "cc/input/top_controls_state.h" 11 #include "cc/input/top_controls_state.h"
12 #include "cc/output/output_surface.h"
13 #include "cc/scheduler/commit_earlyout_reason.h"
14 #include "cc/trees/proxy_common.h"
11 15
12 namespace cc { 16 namespace cc {
13
14 // TODO(khushalsagar): The impl side of ThreadProxy. It is currently defined as 17 // TODO(khushalsagar): The impl side of ThreadProxy. It is currently defined as
15 // an interface with the implementation provided by ThreadProxy and will be 18 // an interface with the implementation provided by ThreadProxy and will be
16 // made an independent class. 19 // made an independent class.
17 // The methods added to this interface should only use the CompositorThreadOnly 20 // The methods added to this interface should only use the CompositorThreadOnly
18 // variables from ThreadProxy. 21 // variables from ThreadProxy.
19 // See crbug/527200 22 // See crbug/527200
20 class CC_EXPORT ProxyImpl { 23 class CC_EXPORT ProxyImpl {
21 public: 24 private:
25 friend class ThreadedChannel;
26
22 // Callback for impl side commands received from the channel. 27 // Callback for impl side commands received from the channel.
23 virtual void SetThrottleFrameProductionOnImpl(bool throttle) = 0; 28 virtual void SetThrottleFrameProductionOnImpl(bool throttle) = 0;
24 virtual void UpdateTopControlsStateOnImpl(TopControlsState constraints, 29 virtual void UpdateTopControlsStateOnImpl(TopControlsState constraints,
25 TopControlsState current, 30 TopControlsState current,
26 bool animate) = 0; 31 bool animate) = 0;
32 virtual void InitializeOutputSurfaceOnImpl(OutputSurface* output_surface) = 0;
33 virtual void MainThreadHasStoppedFlingingOnImpl() = 0;
34 virtual void SetInputThrottledUntilCommitOnImpl(bool is_throttled) = 0;
35 virtual void SetDeferCommitsOnImpl(bool defer_commits) const = 0;
36 virtual void SetNeedsRedrawOnImpl(const gfx::Rect& damage_rect) = 0;
37 virtual void SetNeedsCommitOnImpl() = 0;
38 virtual void BeginMainFrameAbortedOnImpl(CommitEarlyOutReason reason) = 0;
39 virtual void FinishAllRenderingOnImpl(CompletionEvent* completion) = 0;
40 virtual void SetVisibleOnImpl(CompletionEvent* completion, bool visible) = 0;
41 virtual void ReleaseOutputSurfaceOnImpl(CompletionEvent* completion) = 0;
42 virtual void FinishGLOnImpl(CompletionEvent* completion) = 0;
43 virtual void MainFrameWillHappenOnImplForTesting(
44 CompletionEvent* completion,
45 bool* main_frame_will_happen) = 0;
46 virtual void StartCommitOnImpl(CompletionEvent* completion) = 0;
27 47
28 // TODO(khushalsagar): Rename as GetWeakPtr() once ThreadProxy is split. 48 // TODO(khushalsagar): Rename as GetWeakPtr() once ThreadProxy is split.
29 virtual base::WeakPtr<ProxyImpl> GetImplWeakPtr() = 0; 49 virtual base::WeakPtr<ProxyImpl> GetImplWeakPtr() = 0;
30 50
31 protected: 51 protected:
32 virtual ~ProxyImpl() {} 52 virtual ~ProxyImpl() {}
33 }; 53 };
34 54
35 } // namespace cc 55 } // namespace cc
36 56
37 #endif // CC_TREES_PROXY_IMPL_H_ 57 #endif // CC_TREES_PROXY_IMPL_H_
OLDNEW
« no previous file with comments | « cc/trees/proxy_common.cc ('k') | cc/trees/proxy_main.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698