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

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

Issue 1315783003: Make classes and structures in core/frame fast-allocated. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « Source/core/frame/SubresourceIntegrity.h ('k') | Source/core/frame/UseCounter.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 TopControls_h 5 #ifndef TopControls_h
6 #define TopControls_h 6 #define TopControls_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "platform/heap/Handle.h" 9 #include "platform/heap/Handle.h"
10 #include "public/platform/WebTopControlsState.h" 10 #include "public/platform/WebTopControlsState.h"
11 #include "wtf/OwnPtr.h" 11 #include "wtf/OwnPtr.h"
12 #include "wtf/PassOwnPtr.h" 12 #include "wtf/PassOwnPtr.h"
13 13
14 namespace blink { 14 namespace blink {
15 class FrameHost; 15 class FrameHost;
16 class FloatSize; 16 class FloatSize;
17 17
18 // This class encapsulate data and logic required to show/hide top controls 18 // This class encapsulate data and logic required to show/hide top controls
19 // duplicating cc::TopControlsManager behaviour. Top controls' self-animation 19 // duplicating cc::TopControlsManager behaviour. Top controls' self-animation
20 // to completion is still handled by compositor and kicks in when scrolling is 20 // to completion is still handled by compositor and kicks in when scrolling is
21 // complete (i.e, upon ScrollEnd or FlingEnd). 21 // complete (i.e, upon ScrollEnd or FlingEnd).
22 class CORE_EXPORT TopControls final : public NoBaseWillBeGarbageCollectedFinaliz ed<TopControls> { 22 class CORE_EXPORT TopControls final : public NoBaseWillBeGarbageCollectedFinaliz ed<TopControls> {
23 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(TopControls);
23 public: 24 public:
24 static PassOwnPtrWillBeRawPtr<TopControls> create(const FrameHost& host) 25 static PassOwnPtrWillBeRawPtr<TopControls> create(const FrameHost& host)
25 { 26 {
26 return adoptPtrWillBeNoop(new TopControls(host)); 27 return adoptPtrWillBeNoop(new TopControls(host));
27 } 28 }
28 29
29 ~TopControls(); 30 ~TopControls();
30 DECLARE_TRACE(); 31 DECLARE_TRACE();
31 32
32 // The amount that the viewport was shrunk by to accommodate the top 33 // The amount that the viewport was shrunk by to accommodate the top
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 // controls height. 80 // controls height.
80 bool m_shrinkViewport; 81 bool m_shrinkViewport;
81 82
82 // Constraints on the top controls state 83 // Constraints on the top controls state
83 WebTopControlsState m_permittedState; 84 WebTopControlsState m_permittedState;
84 85
85 }; 86 };
86 } // namespace blink 87 } // namespace blink
87 88
88 #endif // TopControls_h 89 #endif // TopControls_h
OLDNEW
« no previous file with comments | « Source/core/frame/SubresourceIntegrity.h ('k') | Source/core/frame/UseCounter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698