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

Side by Side Diff: Source/core/frame/TopControls.h

Issue 952813002: InlinedVisitor: Migrate frame to use inlined tracing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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 | Annotate | Revision Log
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 TopControls_h 5 #ifndef TopControls_h
6 #define TopControls_h 6 #define TopControls_h
7 7
8 #include "platform/heap/Handle.h" 8 #include "platform/heap/Handle.h"
9 #include "public/platform/WebTopControlsState.h" 9 #include "public/platform/WebTopControlsState.h"
10 #include "wtf/OwnPtr.h" 10 #include "wtf/OwnPtr.h"
11 #include "wtf/PassOwnPtr.h" 11 #include "wtf/PassOwnPtr.h"
12 12
13 namespace blink { 13 namespace blink {
14 class FrameHost; 14 class FrameHost;
15 class FloatSize; 15 class FloatSize;
16 16
17 // This class encapsulate data and logic required to show/hide top controls 17 // This class encapsulate data and logic required to show/hide top controls
18 // duplicating cc::TopControlsManager behaviour. Top controls' self-animation 18 // duplicating cc::TopControlsManager behaviour. Top controls' self-animation
19 // to completion is still handled by compositor and kicks in when scrolling is 19 // to completion is still handled by compositor and kicks in when scrolling is
20 // complete (i.e, upon ScrollEnd or FlingEnd). 20 // complete (i.e, upon ScrollEnd or FlingEnd).
21 class TopControls final : public NoBaseWillBeGarbageCollectedFinalized<TopContro ls> { 21 class TopControls final : public NoBaseWillBeGarbageCollectedFinalized<TopContro ls> {
22 public: 22 public:
23 static PassOwnPtrWillBeRawPtr<TopControls> create(const FrameHost& host) 23 static PassOwnPtrWillBeRawPtr<TopControls> create(const FrameHost& host)
24 { 24 {
25 return adoptPtrWillBeNoop(new TopControls(host)); 25 return adoptPtrWillBeNoop(new TopControls(host));
26 } 26 }
27 27
28 ~TopControls(); 28 ~TopControls();
29 void trace(Visitor*); 29 DECLARE_TRACE();
30 30
31 // The amount that the viewport was shrunk by to accommodate the top 31 // The amount that the viewport was shrunk by to accommodate the top
32 // controls. 32 // controls.
33 float layoutHeight(); 33 float layoutHeight();
34 // The amount that top controls are currently shown. 34 // The amount that top controls are currently shown.
35 float contentOffset(); 35 float contentOffset();
36 36
37 float height() const { return m_height; } 37 float height() const { return m_height; }
38 bool shrinkViewport() const { return m_shrinkViewport; } 38 bool shrinkViewport() const { return m_shrinkViewport; }
39 void setHeight(float height, bool shrinkViewport); 39 void setHeight(float height, bool shrinkViewport);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 // controls height. 78 // controls height.
79 bool m_shrinkViewport; 79 bool m_shrinkViewport;
80 80
81 // Constraints on the top controls state 81 // Constraints on the top controls state
82 WebTopControlsState m_permittedState; 82 WebTopControlsState m_permittedState;
83 83
84 }; 84 };
85 } // namespace blink 85 } // namespace blink
86 86
87 #endif // TopControls_h 87 #endif // TopControls_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698