OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CC_BLINK_WEB_LAYER_IMPL_H_ | 5 #ifndef CC_BLINK_WEB_LAYER_IMPL_H_ |
6 #define CC_BLINK_WEB_LAYER_IMPL_H_ | 6 #define CC_BLINK_WEB_LAYER_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
| 9 #include <utility> |
9 | 10 |
10 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
11 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
12 #include "cc/blink/cc_blink_export.h" | 13 #include "cc/blink/cc_blink_export.h" |
13 #include "cc/layers/layer_client.h" | 14 #include "cc/layers/layer_client.h" |
14 #include "third_party/WebKit/public/platform/WebCString.h" | 15 #include "third_party/WebKit/public/platform/WebCString.h" |
15 #include "third_party/WebKit/public/platform/WebColor.h" | 16 #include "third_party/WebKit/public/platform/WebColor.h" |
16 #include "third_party/WebKit/public/platform/WebCompositorAnimation.h" | 17 #include "third_party/WebKit/public/platform/WebCompositorAnimation.h" |
17 #include "third_party/WebKit/public/platform/WebDoublePoint.h" | 18 #include "third_party/WebKit/public/platform/WebDoublePoint.h" |
18 #include "third_party/WebKit/public/platform/WebFloatPoint.h" | 19 #include "third_party/WebKit/public/platform/WebFloatPoint.h" |
19 #include "third_party/WebKit/public/platform/WebLayer.h" | 20 #include "third_party/WebKit/public/platform/WebLayer.h" |
20 #include "third_party/WebKit/public/platform/WebPoint.h" | 21 #include "third_party/WebKit/public/platform/WebPoint.h" |
21 #include "third_party/WebKit/public/platform/WebRect.h" | 22 #include "third_party/WebKit/public/platform/WebRect.h" |
22 #include "third_party/WebKit/public/platform/WebSize.h" | 23 #include "third_party/WebKit/public/platform/WebSize.h" |
23 #include "third_party/WebKit/public/platform/WebString.h" | 24 #include "third_party/WebKit/public/platform/WebString.h" |
24 #include "third_party/WebKit/public/platform/WebVector.h" | 25 #include "third_party/WebKit/public/platform/WebVector.h" |
25 #include "third_party/skia/include/utils/SkMatrix44.h" | 26 #include "third_party/skia/include/utils/SkMatrix44.h" |
26 | 27 |
27 namespace blink { | 28 namespace blink { |
28 class WebFilterOperations; | 29 class WebFilterOperations; |
29 class WebLayerClient; | 30 class WebLayerClient; |
30 struct WebFloatRect; | 31 struct WebFloatRect; |
31 } | 32 } |
32 | 33 |
33 namespace base { | 34 namespace base { |
34 namespace trace_event { | 35 namespace trace_event { |
35 class ConvertableToTraceFormat; | 36 class ConvertableToTraceFormat; |
36 } | 37 } |
37 | |
38 // TODO(ssid): remove these aliases after the tracing clients are moved to the | |
39 // new trace_event namespace. See crbug.com/451032. ETA: March 2015. | |
40 namespace debug { | |
41 using ::base::trace_event::ConvertableToTraceFormat; | |
42 } | 38 } |
43 } // namespace base | |
44 | 39 |
45 namespace cc { | 40 namespace cc { |
46 class Layer; | 41 class Layer; |
47 } | 42 } |
48 | 43 |
49 namespace cc_blink { | 44 namespace cc_blink { |
50 | 45 |
51 class WebToCCAnimationDelegateAdapter; | 46 class WebToCCAnimationDelegateAdapter; |
52 | 47 |
53 class WebLayerImpl : public blink::WebLayer, public cc::LayerClient { | 48 class WebLayerImpl : public blink::WebLayer, public cc::LayerClient { |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 virtual void setShouldScrollOnMainThread(bool scroll_on_main); | 119 virtual void setShouldScrollOnMainThread(bool scroll_on_main); |
125 virtual bool shouldScrollOnMainThread() const; | 120 virtual bool shouldScrollOnMainThread() const; |
126 virtual void setNonFastScrollableRegion( | 121 virtual void setNonFastScrollableRegion( |
127 const blink::WebVector<blink::WebRect>& region); | 122 const blink::WebVector<blink::WebRect>& region); |
128 virtual blink::WebVector<blink::WebRect> nonFastScrollableRegion() const; | 123 virtual blink::WebVector<blink::WebRect> nonFastScrollableRegion() const; |
129 virtual void setTouchEventHandlerRegion( | 124 virtual void setTouchEventHandlerRegion( |
130 const blink::WebVector<blink::WebRect>& region); | 125 const blink::WebVector<blink::WebRect>& region); |
131 virtual blink::WebVector<blink::WebRect> touchEventHandlerRegion() const; | 126 virtual blink::WebVector<blink::WebRect> touchEventHandlerRegion() const; |
132 virtual void setScrollBlocksOn(blink::WebScrollBlocksOn); | 127 virtual void setScrollBlocksOn(blink::WebScrollBlocksOn); |
133 virtual blink::WebScrollBlocksOn scrollBlocksOn() const; | 128 virtual blink::WebScrollBlocksOn scrollBlocksOn() const; |
| 129 virtual void setFrameTimingRequests( |
| 130 const blink::WebVector<std::pair<int64_t, blink::WebRect>>& requests); |
134 virtual void setIsContainerForFixedPositionLayers(bool is_container); | 131 virtual void setIsContainerForFixedPositionLayers(bool is_container); |
135 virtual bool isContainerForFixedPositionLayers() const; | 132 virtual bool isContainerForFixedPositionLayers() const; |
136 virtual void setPositionConstraint( | 133 virtual void setPositionConstraint( |
137 const blink::WebLayerPositionConstraint& constraint); | 134 const blink::WebLayerPositionConstraint& constraint); |
138 virtual blink::WebLayerPositionConstraint positionConstraint() const; | 135 virtual blink::WebLayerPositionConstraint positionConstraint() const; |
139 virtual void setScrollClient(blink::WebLayerScrollClient* client); | 136 virtual void setScrollClient(blink::WebLayerScrollClient* client); |
140 virtual bool isOrphan() const; | 137 virtual bool isOrphan() const; |
141 virtual void setWebLayerClient(blink::WebLayerClient* client); | 138 virtual void setWebLayerClient(blink::WebLayerClient* client); |
142 | 139 |
143 // LayerClient implementation. | 140 // LayerClient implementation. |
144 scoped_refptr<base::debug::ConvertableToTraceFormat> TakeDebugInfo() override; | 141 scoped_refptr<base::trace_event::ConvertableToTraceFormat> TakeDebugInfo() |
| 142 override; |
145 | 143 |
146 virtual void setScrollParent(blink::WebLayer* parent); | 144 virtual void setScrollParent(blink::WebLayer* parent); |
147 virtual void setClipParent(blink::WebLayer* parent); | 145 virtual void setClipParent(blink::WebLayer* parent); |
148 | 146 |
149 protected: | 147 protected: |
150 scoped_refptr<cc::Layer> layer_; | 148 scoped_refptr<cc::Layer> layer_; |
151 blink::WebLayerClient* web_layer_client_; | 149 blink::WebLayerClient* web_layer_client_; |
152 | 150 |
153 private: | 151 private: |
154 scoped_ptr<WebToCCAnimationDelegateAdapter> animation_delegate_adapter_; | 152 scoped_ptr<WebToCCAnimationDelegateAdapter> animation_delegate_adapter_; |
155 | 153 |
156 DISALLOW_COPY_AND_ASSIGN(WebLayerImpl); | 154 DISALLOW_COPY_AND_ASSIGN(WebLayerImpl); |
157 }; | 155 }; |
158 | 156 |
159 } // namespace cc_blink | 157 } // namespace cc_blink |
160 | 158 |
161 #endif // CC_BLINK_WEB_LAYER_IMPL_H_ | 159 #endif // CC_BLINK_WEB_LAYER_IMPL_H_ |
OLD | NEW |