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

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameView.h

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments from Kent; merge. Created 4 years, 6 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 /* 1 /*
2 Copyright (C) 1997 Martin Jones (mjones@kde.org) 2 Copyright (C) 1997 Martin Jones (mjones@kde.org)
3 (C) 1998 Waldo Bastian (bastian@kde.org) 3 (C) 1998 Waldo Bastian (bastian@kde.org)
4 (C) 1998, 1999 Torben Weis (weis@kde.org) 4 (C) 1998, 1999 Torben Weis (weis@kde.org)
5 (C) 1999 Lars Knoll (knoll@kde.org) 5 (C) 1999 Lars Knoll (knoll@kde.org)
6 (C) 1999 Antti Koivisto (koivisto@kde.org) 6 (C) 1999 Antti Koivisto (koivisto@kde.org)
7 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. 7 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
8 8
9 This library is free software; you can redistribute it and/or 9 This library is free software; you can redistribute it and/or
10 modify it under the terms of the GNU Library General Public 10 modify it under the terms of the GNU Library General Public
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 #include "platform/graphics/paint/ClipPaintPropertyNode.h" 42 #include "platform/graphics/paint/ClipPaintPropertyNode.h"
43 #include "platform/graphics/paint/TransformPaintPropertyNode.h" 43 #include "platform/graphics/paint/TransformPaintPropertyNode.h"
44 #include "platform/scroll/ScrollTypes.h" 44 #include "platform/scroll/ScrollTypes.h"
45 #include "platform/scroll/Scrollbar.h" 45 #include "platform/scroll/Scrollbar.h"
46 #include "public/platform/WebDisplayMode.h" 46 #include "public/platform/WebDisplayMode.h"
47 #include "public/platform/WebRect.h" 47 #include "public/platform/WebRect.h"
48 #include "wtf/Allocator.h" 48 #include "wtf/Allocator.h"
49 #include "wtf/Forward.h" 49 #include "wtf/Forward.h"
50 #include "wtf/HashSet.h" 50 #include "wtf/HashSet.h"
51 #include "wtf/ListHashSet.h" 51 #include "wtf/ListHashSet.h"
52 #include "wtf/OwnPtr.h"
53 #include "wtf/TemporaryChange.h" 52 #include "wtf/TemporaryChange.h"
54 #include "wtf/text/WTFString.h" 53 #include "wtf/text/WTFString.h"
54 #include <memory>
55 55
56 namespace blink { 56 namespace blink {
57 57
58 class AXObjectCache; 58 class AXObjectCache;
59 class CancellableTaskFactory; 59 class CancellableTaskFactory;
60 class ComputedStyle; 60 class ComputedStyle;
61 class DocumentLifecycle; 61 class DocumentLifecycle;
62 class Cursor; 62 class Cursor;
63 class Element; 63 class Element;
64 class FloatSize; 64 class FloatSize;
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 void adjustScrollPositionFromUpdateScrollbars(); 747 void adjustScrollPositionFromUpdateScrollbars();
748 bool visualViewportSuppliesScrollbars() const; 748 bool visualViewportSuppliesScrollbars() const;
749 749
750 IntRect rectToCopyOnScroll() const; 750 IntRect rectToCopyOnScroll() const;
751 751
752 bool isFrameViewScrollbar(const Widget* child) const { return horizontalScro llbar() == child || verticalScrollbar() == child; } 752 bool isFrameViewScrollbar(const Widget* child) const { return horizontalScro llbar() == child || verticalScrollbar() == child; }
753 753
754 ScrollingCoordinator* scrollingCoordinator() const; 754 ScrollingCoordinator* scrollingCoordinator() const;
755 755
756 void prepareLayoutAnalyzer(); 756 void prepareLayoutAnalyzer();
757 PassOwnPtr<TracedValue> analyzerCounters(); 757 std::unique_ptr<TracedValue> analyzerCounters();
758 758
759 // LayoutObject for the viewport-defining element (see Document::viewportDef iningElement). 759 // LayoutObject for the viewport-defining element (see Document::viewportDef iningElement).
760 LayoutObject* viewportLayoutObject(); 760 LayoutObject* viewportLayoutObject();
761 761
762 void collectAnnotatedRegions(LayoutObject&, Vector<AnnotatedRegionValue>&) c onst; 762 void collectAnnotatedRegions(LayoutObject&, Vector<AnnotatedRegionValue>&) c onst;
763 763
764 template <typename Function> void forAllNonThrottledFrameViews(const Functio n&); 764 template <typename Function> void forAllNonThrottledFrameViews(const Functio n&);
765 765
766 void setNeedsUpdateViewportIntersection(); 766 void setNeedsUpdateViewportIntersection();
767 void updateViewportIntersectionsForSubtree(LifeCycleUpdateOption); 767 void updateViewportIntersectionsForSubtree(LifeCycleUpdateOption);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 bool m_hasPendingLayout; 799 bool m_hasPendingLayout;
800 LayoutSubtreeRootList m_layoutSubtreeRootList; 800 LayoutSubtreeRootList m_layoutSubtreeRootList;
801 DepthOrderedLayoutObjectList m_orthogonalWritingModeRootList; 801 DepthOrderedLayoutObjectList m_orthogonalWritingModeRootList;
802 802
803 bool m_layoutSchedulingEnabled; 803 bool m_layoutSchedulingEnabled;
804 bool m_inSynchronousPostLayout; 804 bool m_inSynchronousPostLayout;
805 int m_layoutCount; 805 int m_layoutCount;
806 unsigned m_nestedLayoutCount; 806 unsigned m_nestedLayoutCount;
807 Timer<FrameView> m_postLayoutTasksTimer; 807 Timer<FrameView> m_postLayoutTasksTimer;
808 Timer<FrameView> m_updateWidgetsTimer; 808 Timer<FrameView> m_updateWidgetsTimer;
809 OwnPtr<CancellableTaskFactory> m_renderThrottlingObserverNotificationFactory ; 809 std::unique_ptr<CancellableTaskFactory> m_renderThrottlingObserverNotificati onFactory;
810 810
811 bool m_firstLayout; 811 bool m_firstLayout;
812 bool m_isTransparent; 812 bool m_isTransparent;
813 Color m_baseBackgroundColor; 813 Color m_baseBackgroundColor;
814 IntSize m_lastViewportSize; 814 IntSize m_lastViewportSize;
815 float m_lastZoomFactor; 815 float m_lastZoomFactor;
816 816
817 AtomicString m_mediaType; 817 AtomicString m_mediaType;
818 AtomicString m_mediaTypeWhenNotPrinting; 818 AtomicString m_mediaTypeWhenNotPrinting;
819 819
820 bool m_safeToPropagateScrollToParent; 820 bool m_safeToPropagateScrollToParent;
821 821
822 bool m_isTrackingPaintInvalidations; // Used for testing. 822 bool m_isTrackingPaintInvalidations; // Used for testing.
823 823
824 unsigned m_visuallyNonEmptyCharacterCount; 824 unsigned m_visuallyNonEmptyCharacterCount;
825 unsigned m_visuallyNonEmptyPixelCount; 825 unsigned m_visuallyNonEmptyPixelCount;
826 bool m_isVisuallyNonEmpty; 826 bool m_isVisuallyNonEmpty;
827 827
828 Member<Node> m_fragmentAnchor; 828 Member<Node> m_fragmentAnchor;
829 829
830 // layoutObject to hold our custom scroll corner. 830 // layoutObject to hold our custom scroll corner.
831 LayoutScrollbarPart* m_scrollCorner; 831 LayoutScrollbarPart* m_scrollCorner;
832 832
833 Member<ScrollableAreaSet> m_scrollableAreas; 833 Member<ScrollableAreaSet> m_scrollableAreas;
834 Member<ScrollableAreaSet> m_animatingScrollableAreas; 834 Member<ScrollableAreaSet> m_animatingScrollableAreas;
835 OwnPtr<ResizerAreaSet> m_resizerAreas; 835 std::unique_ptr<ResizerAreaSet> m_resizerAreas;
836 OwnPtr<ViewportConstrainedObjectSet> m_viewportConstrainedObjects; 836 std::unique_ptr<ViewportConstrainedObjectSet> m_viewportConstrainedObjects;
837 unsigned m_stickyPositionObjectCount; 837 unsigned m_stickyPositionObjectCount;
838 ViewportConstrainedObjectSet m_backgroundAttachmentFixedObjects; 838 ViewportConstrainedObjectSet m_backgroundAttachmentFixedObjects;
839 Member<FrameViewAutoSizeInfo> m_autoSizeInfo; 839 Member<FrameViewAutoSizeInfo> m_autoSizeInfo;
840 840
841 IntSize m_inputEventsOffsetForEmulation; 841 IntSize m_inputEventsOffsetForEmulation;
842 float m_inputEventsScaleFactorForEmulation; 842 float m_inputEventsScaleFactorForEmulation;
843 843
844 IntSize m_layoutSize; 844 IntSize m_layoutSize;
845 bool m_layoutSizeFixedToFrameSize; 845 bool m_layoutSizeFixedToFrameSize;
846 846
(...skipping 24 matching lines...) Expand all
871 871
872 DoubleSize m_pendingScrollDelta; 872 DoubleSize m_pendingScrollDelta;
873 DoublePoint m_scrollPosition; 873 DoublePoint m_scrollPosition;
874 IntSize m_contentsSize; 874 IntSize m_contentsSize;
875 875
876 int m_scrollbarsAvoidingResizer; 876 int m_scrollbarsAvoidingResizer;
877 bool m_scrollbarsSuppressed; 877 bool m_scrollbarsSuppressed;
878 878
879 bool m_inUpdateScrollbars; 879 bool m_inUpdateScrollbars;
880 880
881 OwnPtr<LayoutAnalyzer> m_analyzer; 881 std::unique_ptr<LayoutAnalyzer> m_analyzer;
882 882
883 // Mark if something has changed in the mapping from Frame to GraphicsLayer 883 // Mark if something has changed in the mapping from Frame to GraphicsLayer
884 // and the Frame Timing regions should be recalculated. 884 // and the Frame Timing regions should be recalculated.
885 bool m_frameTimingRequestsDirty; 885 bool m_frameTimingRequestsDirty;
886 886
887 // Exists only on root frame. 887 // Exists only on root frame.
888 // TODO(bokan): crbug.com/484188. We should specialize FrameView for the 888 // TODO(bokan): crbug.com/484188. We should specialize FrameView for the
889 // main frame. 889 // main frame.
890 Member<ScrollableArea> m_viewportScrollableArea; 890 Member<ScrollableArea> m_viewportScrollableArea;
891 891
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
941 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) 941 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold)
942 setIsVisuallyNonEmpty(); 942 setIsVisuallyNonEmpty();
943 } 943 }
944 944
945 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView()); 945 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView());
946 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF rameView(), scrollableArea.isFrameView()); 946 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF rameView(), scrollableArea.isFrameView());
947 947
948 } // namespace blink 948 } // namespace blink
949 949
950 #endif // FrameView_h 950 #endif // FrameView_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698