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

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

Issue 511253003: Made Blink aware of top controls offset (Chromium-side) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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_LAYER_TREE_HOST_CLIENT_H_ 5 #ifndef CC_TREES_LAYER_TREE_HOST_CLIENT_H_
6 #define CC_TREES_LAYER_TREE_HOST_CLIENT_H_ 6 #define CC_TREES_LAYER_TREE_HOST_CLIENT_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 11 matching lines...) Expand all
22 class LayerTreeHostClient { 22 class LayerTreeHostClient {
23 public: 23 public:
24 virtual void WillBeginMainFrame(int frame_id) = 0; 24 virtual void WillBeginMainFrame(int frame_id) = 0;
25 // Marks finishing compositing-related tasks on the main thread. In threaded 25 // Marks finishing compositing-related tasks on the main thread. In threaded
26 // mode, this corresponds to DidCommit(). 26 // mode, this corresponds to DidCommit().
27 virtual void BeginMainFrame(const BeginFrameArgs& args) = 0; 27 virtual void BeginMainFrame(const BeginFrameArgs& args) = 0;
28 virtual void DidBeginMainFrame() = 0; 28 virtual void DidBeginMainFrame() = 0;
29 virtual void Layout() = 0; 29 virtual void Layout() = 0;
30 virtual void ApplyScrollAndScale(const gfx::Vector2d& scroll_delta, 30 virtual void ApplyScrollAndScale(const gfx::Vector2d& scroll_delta,
31 float page_scale) = 0; 31 float page_scale) = 0;
32 // TODO(bokan): This method is a shim while we need to keep both
33 // virtual-viewport and ordinary pinch modes around. It will be removed in
34 // place of the above method once we remove old-style pinch.
35 virtual void SetTopControlsContentOffset(int offset) = 0;
aelias_OOO_until_Jul13 2014/08/29 04:37:01 I think if you stop baking this value into FrameVi
bokan 2014/08/29 18:02:14 Assuming this can be done impl-side then yes. See
32 // Creates an OutputSurface. If fallback is true, it should attempt to 36 // Creates an OutputSurface. If fallback is true, it should attempt to
33 // create an OutputSurface that is guaranteed to initialize correctly. 37 // create an OutputSurface that is guaranteed to initialize correctly.
34 virtual scoped_ptr<OutputSurface> CreateOutputSurface(bool fallback) = 0; 38 virtual scoped_ptr<OutputSurface> CreateOutputSurface(bool fallback) = 0;
35 virtual void DidInitializeOutputSurface() = 0; 39 virtual void DidInitializeOutputSurface() = 0;
36 virtual void WillCommit() = 0; 40 virtual void WillCommit() = 0;
37 virtual void DidCommit() = 0; 41 virtual void DidCommit() = 0;
38 virtual void DidCommitAndDrawFrame() = 0; 42 virtual void DidCommitAndDrawFrame() = 0;
39 virtual void DidCompleteSwapBuffers() = 0; 43 virtual void DidCompleteSwapBuffers() = 0;
40 44
41 // Requests that the client insert a rate limiting token in the shared main 45 // Requests that the client insert a rate limiting token in the shared main
42 // thread context's command stream that will block if the context gets too far 46 // thread context's command stream that will block if the context gets too far
43 // ahead of the compositor's command stream. Only needed if the tree contains 47 // ahead of the compositor's command stream. Only needed if the tree contains
44 // a TextureLayer that calls SetRateLimitContext(true). 48 // a TextureLayer that calls SetRateLimitContext(true).
45 virtual void RateLimitSharedMainThreadContext() {} 49 virtual void RateLimitSharedMainThreadContext() {}
46 50
47 // This hook is for testing. 51 // This hook is for testing.
48 virtual void DidFailToInitializeOutputSurface() {} 52 virtual void DidFailToInitializeOutputSurface() {}
49 53
50 protected: 54 protected:
51 virtual ~LayerTreeHostClient() {} 55 virtual ~LayerTreeHostClient() {}
52 }; 56 };
53 57
54 } // namespace cc 58 } // namespace cc
55 59
56 #endif // CC_TREES_LAYER_TREE_HOST_CLIENT_H_ 60 #endif // CC_TREES_LAYER_TREE_HOST_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698