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

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

Issue 1232333002: Fix virtual/override/final usage in the rest of Source/core/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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
« no previous file with comments | « Source/core/frame/Navigator.h ('k') | Source/core/frame/PlatformEventController.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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 // offset is set through the GraphicsLayer <-> CC sync mechanisms. Its contents is the page's 62 // offset is set through the GraphicsLayer <-> CC sync mechanisms. Its contents is the page's
63 // main FrameView, which corresponds to the outer viewport. The inner viewport i s always contained 63 // main FrameView, which corresponds to the outer viewport. The inner viewport i s always contained
64 // in the outer viewport and can pan within it. 64 // in the outer viewport and can pan within it.
65 class CORE_EXPORT PinchViewport final : public NoBaseWillBeGarbageCollectedFinal ized<PinchViewport>, public GraphicsLayerClient, public ScrollableArea { 65 class CORE_EXPORT PinchViewport final : public NoBaseWillBeGarbageCollectedFinal ized<PinchViewport>, public GraphicsLayerClient, public ScrollableArea {
66 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(PinchViewport); 66 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(PinchViewport);
67 public: 67 public:
68 static PassOwnPtrWillBeRawPtr<PinchViewport> create(FrameHost& host) 68 static PassOwnPtrWillBeRawPtr<PinchViewport> create(FrameHost& host)
69 { 69 {
70 return adoptPtrWillBeNoop(new PinchViewport(host)); 70 return adoptPtrWillBeNoop(new PinchViewport(host));
71 } 71 }
72 virtual ~PinchViewport(); 72 ~PinchViewport() override;
73 73
74 DECLARE_VIRTUAL_TRACE(); 74 DECLARE_VIRTUAL_TRACE();
75 75
76 void attachToLayerTree(GraphicsLayer*, GraphicsLayerFactory*); 76 void attachToLayerTree(GraphicsLayer*, GraphicsLayerFactory*);
77 GraphicsLayer* rootGraphicsLayer() 77 GraphicsLayer* rootGraphicsLayer()
78 { 78 {
79 return m_rootTransformLayer.get(); 79 return m_rootTransformLayer.get();
80 } 80 }
81 GraphicsLayer* containerLayer() 81 GraphicsLayer* containerLayer()
82 { 82 {
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 IntRect viewportToRootFrame(const IntRect&) const; 157 IntRect viewportToRootFrame(const IntRect&) const;
158 FloatRect rootFrameToViewport(const FloatRect&) const; 158 FloatRect rootFrameToViewport(const FloatRect&) const;
159 IntRect rootFrameToViewport(const IntRect&) const; 159 IntRect rootFrameToViewport(const IntRect&) const;
160 160
161 FloatPoint viewportToRootFrame(const FloatPoint&) const; 161 FloatPoint viewportToRootFrame(const FloatPoint&) const;
162 FloatPoint rootFrameToViewport(const FloatPoint&) const; 162 FloatPoint rootFrameToViewport(const FloatPoint&) const;
163 IntPoint viewportToRootFrame(const IntPoint&) const; 163 IntPoint viewportToRootFrame(const IntPoint&) const;
164 IntPoint rootFrameToViewport(const IntPoint&) const; 164 IntPoint rootFrameToViewport(const IntPoint&) const;
165 165
166 // ScrollableArea implementation 166 // ScrollableArea implementation
167 virtual DoubleRect visibleContentRectDouble(IncludeScrollbarsInRect = Exclud eScrollbars) const override; 167 DoubleRect visibleContentRectDouble(IncludeScrollbarsInRect = ExcludeScrollb ars) const override;
168 virtual IntRect visibleContentRect(IncludeScrollbarsInRect = ExcludeScrollba rs) const override; 168 IntRect visibleContentRect(IncludeScrollbarsInRect = ExcludeScrollbars) cons t override;
169 virtual bool shouldUseIntegerScrollOffset() const override; 169 bool shouldUseIntegerScrollOffset() const override;
170 virtual bool isActive() const override { return false; } 170 bool isActive() const override { return false; }
171 virtual int scrollSize(ScrollbarOrientation) const override; 171 int scrollSize(ScrollbarOrientation) const override;
172 virtual bool isScrollCornerVisible() const override { return false; } 172 bool isScrollCornerVisible() const override { return false; }
173 virtual IntRect scrollCornerRect() const override { return IntRect(); } 173 IntRect scrollCornerRect() const override { return IntRect(); }
174 virtual IntPoint scrollPosition() const override { return flooredIntPoint(m_ offset); } 174 IntPoint scrollPosition() const override { return flooredIntPoint(m_offset); }
175 virtual DoublePoint scrollPositionDouble() const override { return m_offset; } 175 DoublePoint scrollPositionDouble() const override { return m_offset; }
176 virtual IntPoint minimumScrollPosition() const override; 176 IntPoint minimumScrollPosition() const override;
177 virtual IntPoint maximumScrollPosition() const override; 177 IntPoint maximumScrollPosition() const override;
178 virtual DoublePoint maximumScrollPositionDouble() const override; 178 DoublePoint maximumScrollPositionDouble() const override;
179 virtual int visibleHeight() const override { return visibleRect().height(); } 179 int visibleHeight() const override { return visibleRect().height(); }
180 virtual int visibleWidth() const override { return visibleRect().width(); } 180 int visibleWidth() const override { return visibleRect().width(); }
181 virtual IntSize contentsSize() const override; 181 IntSize contentsSize() const override;
182 virtual bool scrollbarsCanBeActive() const override { return false; } 182 bool scrollbarsCanBeActive() const override { return false; }
183 virtual IntRect scrollableAreaBoundingBox() const override; 183 IntRect scrollableAreaBoundingBox() const override;
184 virtual bool userInputScrollable(ScrollbarOrientation) const override { retu rn true; } 184 bool userInputScrollable(ScrollbarOrientation) const override { return true; }
185 virtual bool shouldPlaceVerticalScrollbarOnLeft() const override { return fa lse; } 185 bool shouldPlaceVerticalScrollbarOnLeft() const override { return false; }
186 virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&) override; 186 void invalidateScrollbarRect(Scrollbar*, const IntRect&) override;
187 virtual void invalidateScrollCornerRect(const IntRect&) override { } 187 void invalidateScrollCornerRect(const IntRect&) override { }
188 virtual void setScrollOffset(const IntPoint&, ScrollType) override; 188 void setScrollOffset(const IntPoint&, ScrollType) override;
189 virtual void setScrollOffset(const DoublePoint&, ScrollType) override; 189 void setScrollOffset(const DoublePoint&, ScrollType) override;
190 virtual GraphicsLayer* layerForContainer() const override; 190 GraphicsLayer* layerForContainer() const override;
191 virtual GraphicsLayer* layerForScrolling() const override; 191 GraphicsLayer* layerForScrolling() const override;
192 virtual GraphicsLayer* layerForHorizontalScrollbar() const override; 192 GraphicsLayer* layerForHorizontalScrollbar() const override;
193 virtual GraphicsLayer* layerForVerticalScrollbar() const override; 193 GraphicsLayer* layerForVerticalScrollbar() const override;
194 194
195 private: 195 private:
196 explicit PinchViewport(FrameHost&); 196 explicit PinchViewport(FrameHost&);
197 197
198 // GraphicsLayerClient implementation. 198 // GraphicsLayerClient implementation.
199 virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsL ayerPaintingPhase, const IntRect& inClip) override; 199 void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPain tingPhase, const IntRect& inClip) override;
200 virtual String debugName(const GraphicsLayer*) override; 200 String debugName(const GraphicsLayer*) override;
201 201
202 void setupScrollbar(WebScrollbar::Orientation); 202 void setupScrollbar(WebScrollbar::Orientation);
203 FloatPoint clampOffsetToBoundaries(const FloatPoint&); 203 FloatPoint clampOffsetToBoundaries(const FloatPoint&);
204 204
205 LocalFrame* mainFrame() const; 205 LocalFrame* mainFrame() const;
206 206
207 FrameHost& frameHost() const 207 FrameHost& frameHost() const
208 { 208 {
209 ASSERT(m_frameHost); 209 ASSERT(m_frameHost);
210 return *m_frameHost; 210 return *m_frameHost;
(...skipping 13 matching lines...) Expand all
224 // Offset of the pinch viewport from the main frame's origin, in CSS pixels. 224 // Offset of the pinch viewport from the main frame's origin, in CSS pixels.
225 FloatPoint m_offset; 225 FloatPoint m_offset;
226 float m_scale; 226 float m_scale;
227 IntSize m_size; 227 IntSize m_size;
228 float m_topControlsAdjustment; 228 float m_topControlsAdjustment;
229 }; 229 };
230 230
231 } // namespace blink 231 } // namespace blink
232 232
233 #endif // PinchViewport_h 233 #endif // PinchViewport_h
OLDNEW
« no previous file with comments | « Source/core/frame/Navigator.h ('k') | Source/core/frame/PlatformEventController.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698