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

Unified Diff: ui/compositor/layer.h

Issue 10832355: Prepare ui/compositor for WebLayer type change (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
Index: ui/compositor/layer.h
diff --git a/ui/compositor/layer.h b/ui/compositor/layer.h
index 4eb39cf88cace356c276882c5d7f9fa52a07c5c6..a999de8e6dfc7ccc8b0767d705b4127a6d2d161d 100644
--- a/ui/compositor/layer.h
+++ b/ui/compositor/layer.h
@@ -14,6 +14,9 @@
#include "base/message_loop.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebContentLayerClient.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebLayer.h"
+#include "third_party/WebKit/Source/Platform/chromium/public/WebContentLayer.h"
+#include "third_party/WebKit/Source/Platform/chromium/public/WebSolidColorLayer.h"
+#include "third_party/WebKit/Source/Platform/chromium/public/WebExternalTextureLayer.h"
#include "third_party/skia/include/core/SkColor.h"
#include "third_party/skia/include/core/SkRegion.h"
#include "ui/compositor/compositor.h"
@@ -258,7 +261,11 @@ class COMPOSITOR_EXPORT Layer
WebKit::WebRect& opaque);
#endif
+#if defined(WEBLAYER_IS_PURE_VIRTUAL)
+ WebKit::WebLayer* web_layer() { return web_layer_; }
+#else
WebKit::WebLayer web_layer() { return web_layer_; }
+#endif
float device_scale_factor() const { return device_scale_factor_; }
@@ -373,7 +380,16 @@ class COMPOSITOR_EXPORT Layer
scoped_ptr<LayerAnimator> animator_;
+#if defined(WEBLAYER_IS_PURE_VIRTUAL)
+ // Ownership of the layer is held through one of the strongly typed layer
+ // pointers, depending on which sort of layer this is.
+ scoped_ptr<WebKit::WebContentLayer> content_layer_;
+ scoped_ptr<WebKit::WebExternalTextureLayer> texture_layer_;
+ scoped_ptr<WebKit::WebSolidColorLayer> solid_color_layer_;
+ WebKit::WebLayer* web_layer_;
+#else
WebKit::WebLayer web_layer_;
+#endif
bool web_layer_is_accelerated_;
bool show_debug_borders_;
« no previous file with comments | « ui/compositor/compositor.cc ('k') | ui/compositor/layer.cc » ('j') | ui/compositor/layer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698