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

Side by Side Diff: third_party/WebKit/Source/web/LinkHighlightImpl.h

Issue 2848513002: Introduce the abstract class WebViewBase, to decouple WebViewImpl. (Closed)
Patch Set: Fix typo. Created 3 years, 7 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 27 matching lines...) Expand all
38 #include "public/platform/WebContentLayerClient.h" 38 #include "public/platform/WebContentLayerClient.h"
39 #include "web/WebExport.h" 39 #include "web/WebExport.h"
40 40
41 namespace blink { 41 namespace blink {
42 42
43 class GraphicsLayer; 43 class GraphicsLayer;
44 class LayoutBoxModelObject; 44 class LayoutBoxModelObject;
45 class Node; 45 class Node;
46 class WebContentLayer; 46 class WebContentLayer;
47 class WebLayer; 47 class WebLayer;
48 class WebViewImpl; 48 class WebViewBase;
49 49
50 class WEB_EXPORT LinkHighlightImpl final 50 class WEB_EXPORT LinkHighlightImpl final
51 : public LinkHighlight, 51 : public LinkHighlight,
52 public WebContentLayerClient, 52 public WebContentLayerClient,
53 public CompositorAnimationDelegate, 53 public CompositorAnimationDelegate,
54 public CompositorAnimationPlayerClient { 54 public CompositorAnimationPlayerClient {
55 public: 55 public:
56 static std::unique_ptr<LinkHighlightImpl> Create(Node*, WebViewImpl*); 56 static std::unique_ptr<LinkHighlightImpl> Create(Node*, WebViewBase*);
57 ~LinkHighlightImpl() override; 57 ~LinkHighlightImpl() override;
58 58
59 WebContentLayer* ContentLayer(); 59 WebContentLayer* ContentLayer();
60 WebLayer* ClipLayer(); 60 WebLayer* ClipLayer();
61 void StartHighlightAnimationIfNeeded(); 61 void StartHighlightAnimationIfNeeded();
62 void UpdateGeometry(); 62 void UpdateGeometry();
63 63
64 // WebContentLayerClient implementation. 64 // WebContentLayerClient implementation.
65 gfx::Rect PaintableRegion() override; 65 gfx::Rect PaintableRegion() override;
66 void PaintContents(WebDisplayItemList*, 66 void PaintContents(WebDisplayItemList*,
(...skipping 10 matching lines...) Expand all
77 void ClearCurrentGraphicsLayer() override; 77 void ClearCurrentGraphicsLayer() override;
78 78
79 // CompositorAnimationPlayerClient implementation. 79 // CompositorAnimationPlayerClient implementation.
80 CompositorAnimationPlayer* CompositorPlayer() const override; 80 CompositorAnimationPlayer* CompositorPlayer() const override;
81 81
82 GraphicsLayer* CurrentGraphicsLayerForTesting() const { 82 GraphicsLayer* CurrentGraphicsLayerForTesting() const {
83 return current_graphics_layer_; 83 return current_graphics_layer_;
84 } 84 }
85 85
86 private: 86 private:
87 LinkHighlightImpl(Node*, WebViewImpl*); 87 LinkHighlightImpl(Node*, WebViewBase*);
88 88
89 void ReleaseResources(); 89 void ReleaseResources();
90 void ComputeQuads(const Node&, Vector<FloatQuad>&) const; 90 void ComputeQuads(const Node&, Vector<FloatQuad>&) const;
91 91
92 void AttachLinkHighlightToCompositingLayer( 92 void AttachLinkHighlightToCompositingLayer(
93 const LayoutBoxModelObject& paint_invalidation_container); 93 const LayoutBoxModelObject& paint_invalidation_container);
94 void ClearGraphicsLayerLinkHighlightPointer(); 94 void ClearGraphicsLayerLinkHighlightPointer();
95 // This function computes the highlight path, and returns true if it has 95 // This function computes the highlight path, and returns true if it has
96 // changed size since the last call to this function. 96 // changed size since the last call to this function.
97 bool ComputeHighlightLayerPathAndPosition(const LayoutBoxModelObject&); 97 bool ComputeHighlightLayerPathAndPosition(const LayoutBoxModelObject&);
98 98
99 std::unique_ptr<WebContentLayer> content_layer_; 99 std::unique_ptr<WebContentLayer> content_layer_;
100 std::unique_ptr<WebLayer> clip_layer_; 100 std::unique_ptr<WebLayer> clip_layer_;
101 Path path_; 101 Path path_;
102 102
103 Persistent<Node> node_; 103 Persistent<Node> node_;
104 WebViewImpl* owning_web_view_impl_; 104 WebViewBase* owning_web_view_;
105 GraphicsLayer* current_graphics_layer_; 105 GraphicsLayer* current_graphics_layer_;
106 bool is_scrolling_graphics_layer_; 106 bool is_scrolling_graphics_layer_;
107 std::unique_ptr<CompositorAnimationPlayer> compositor_player_; 107 std::unique_ptr<CompositorAnimationPlayer> compositor_player_;
108 108
109 bool geometry_needs_update_; 109 bool geometry_needs_update_;
110 bool is_animating_; 110 bool is_animating_;
111 double start_time_; 111 double start_time_;
112 }; 112 };
113 113
114 } // namespace blink 114 } // namespace blink
115 115
116 #endif // LinkHighlightImpl_h 116 #endif // LinkHighlightImpl_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/InspectorOverlayAgent.cpp ('k') | third_party/WebKit/Source/web/LinkHighlightImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698