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

Side by Side Diff: webkit/renderer/compositor_bindings/web_layer_impl.h

Issue 16903005: Add layer name into frame viewer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase code Created 7 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
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_LAYER_IMPL_H_ 5 #ifndef WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_LAYER_IMPL_H_
6 #define WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_LAYER_IMPL_H_ 6 #define WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_LAYER_IMPL_H_
7 7
8 #include <string>
9
8 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "cc/layers/layer.h"
10 #include "third_party/WebKit/public/platform/WebAnimation.h" 13 #include "third_party/WebKit/public/platform/WebAnimation.h"
14 #include "third_party/WebKit/public/platform/WebCString.h"
11 #include "third_party/WebKit/public/platform/WebColor.h" 15 #include "third_party/WebKit/public/platform/WebColor.h"
12 #include "third_party/WebKit/public/platform/WebCompositingReasons.h" 16 #include "third_party/WebKit/public/platform/WebCompositingReasons.h"
13 #include "third_party/WebKit/public/platform/WebFloatPoint.h" 17 #include "third_party/WebKit/public/platform/WebFloatPoint.h"
14 #include "third_party/WebKit/public/platform/WebLayer.h" 18 #include "third_party/WebKit/public/platform/WebLayer.h"
15 #include "third_party/WebKit/public/platform/WebPoint.h" 19 #include "third_party/WebKit/public/platform/WebPoint.h"
16 #include "third_party/WebKit/public/platform/WebRect.h" 20 #include "third_party/WebKit/public/platform/WebRect.h"
17 #include "third_party/WebKit/public/platform/WebSize.h" 21 #include "third_party/WebKit/public/platform/WebSize.h"
18 #include "third_party/WebKit/public/platform/WebString.h" 22 #include "third_party/WebKit/public/platform/WebString.h"
19 #include "third_party/WebKit/public/platform/WebVector.h" 23 #include "third_party/WebKit/public/platform/WebVector.h"
20 #include "third_party/skia/include/utils/SkMatrix44.h" 24 #include "third_party/skia/include/utils/SkMatrix44.h"
21 #include "webkit/renderer/compositor_bindings/webkit_compositor_bindings_export. h" 25 #include "webkit/renderer/compositor_bindings/webkit_compositor_bindings_export. h"
22 26
23 namespace cc { class Layer; } 27 namespace cc {
28 class Layer;
29 class LayerClient;
30 }
24 31
25 // TODO(senorblanco): Remove this once WebKit changes have landed. 32 // TODO(senorblanco): Remove this once WebKit changes have landed.
26 class SkImageFilter; 33 class SkImageFilter;
27 34
28 namespace WebKit { 35 namespace WebKit {
29 class WebFilterOperations; 36 class WebFilterOperations;
30 struct WebFloatRect; 37 struct WebFloatRect;
31 } 38 }
32 39
33 namespace webkit { 40 namespace webkit {
34 41
35 class WebToCCAnimationDelegateAdapter; 42 class WebToCCAnimationDelegateAdapter;
36 43
37 class WebLayerImpl : public WebKit::WebLayer { 44 class WebLayerImpl : public WebKit::WebLayer, public cc::LayerClient {
38 public: 45 public:
39 WEBKIT_COMPOSITOR_BINDINGS_EXPORT WebLayerImpl(); 46 WEBKIT_COMPOSITOR_BINDINGS_EXPORT WebLayerImpl();
40 WEBKIT_COMPOSITOR_BINDINGS_EXPORT explicit WebLayerImpl( 47 WEBKIT_COMPOSITOR_BINDINGS_EXPORT explicit WebLayerImpl(
41 scoped_refptr<cc::Layer>); 48 scoped_refptr<cc::Layer>);
42 virtual ~WebLayerImpl(); 49 virtual ~WebLayerImpl();
43 50
44 WEBKIT_COMPOSITOR_BINDINGS_EXPORT cc::Layer* layer() const; 51 WEBKIT_COMPOSITOR_BINDINGS_EXPORT cc::Layer* layer() const;
45 52
46 // WebLayer implementation. 53 // WebLayer implementation.
47 virtual int id() const; 54 virtual int id() const;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 virtual void setTouchEventHandlerRegion( 117 virtual void setTouchEventHandlerRegion(
111 const WebKit::WebVector<WebKit::WebRect>& region); 118 const WebKit::WebVector<WebKit::WebRect>& region);
112 virtual WebKit::WebVector<WebKit::WebRect> touchEventHandlerRegion() const; 119 virtual WebKit::WebVector<WebKit::WebRect> touchEventHandlerRegion() const;
113 virtual void setIsContainerForFixedPositionLayers(bool is_container); 120 virtual void setIsContainerForFixedPositionLayers(bool is_container);
114 virtual bool isContainerForFixedPositionLayers() const; 121 virtual bool isContainerForFixedPositionLayers() const;
115 virtual void setPositionConstraint( 122 virtual void setPositionConstraint(
116 const WebKit::WebLayerPositionConstraint& constraint); 123 const WebKit::WebLayerPositionConstraint& constraint);
117 virtual WebKit::WebLayerPositionConstraint positionConstraint() const; 124 virtual WebKit::WebLayerPositionConstraint positionConstraint() const;
118 virtual void setScrollClient(WebKit::WebLayerScrollClient* client); 125 virtual void setScrollClient(WebKit::WebLayerScrollClient* client);
119 virtual bool isOrphan() const; 126 virtual bool isOrphan() const;
127 virtual void setWebLayerClient(WebKit::WebLayerClient* client);
128
129 // LayerClient implementation.
130 virtual std::string DebugName() OVERRIDE;
120 131
121 protected: 132 protected:
122 scoped_refptr<cc::Layer> layer_; 133 scoped_refptr<cc::Layer> layer_;
134 WebKit::WebLayerClient* web_layer_client_;
123 135
124 private: 136 private:
125 scoped_ptr<WebToCCAnimationDelegateAdapter> animation_delegate_adapter_; 137 scoped_ptr<WebToCCAnimationDelegateAdapter> animation_delegate_adapter_;
126 138
127 DISALLOW_COPY_AND_ASSIGN(WebLayerImpl); 139 DISALLOW_COPY_AND_ASSIGN(WebLayerImpl);
128 }; 140 };
129 141
130 } // namespace webkit 142 } // namespace webkit
131 143
132 #endif // WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_LAYER_IMPL_H_ 144 #endif // WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_LAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698