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

Unified Diff: webkit/compositor_bindings/WebDecorationLayerImpl.cpp

Issue 10963056: [cc] Add window decoration layers (NinePatch) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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: webkit/compositor_bindings/WebDecorationLayerImpl.cpp
diff --git a/third_party/mesa/MesaLib/src/glsl/safe_strcmp.c b/webkit/compositor_bindings/WebDecorationLayerImpl.cpp
similarity index 65%
copy from third_party/mesa/MesaLib/src/glsl/safe_strcmp.c
copy to webkit/compositor_bindings/WebDecorationLayerImpl.cpp
index 4789a92ae6dd9daf7583dfcad5c3c9d8eadf64c6..09a126b9dafcd7c516478118bb0ac4f19bd4b245 100644
--- a/third_party/mesa/MesaLib/src/glsl/safe_strcmp.c
+++ b/webkit/compositor_bindings/WebDecorationLayerImpl.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
+ * Copyright (C) 2012 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -23,15 +23,35 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "safe_strcmp.h"
+#include "config.h"
+#include "WebDecorationLayerImpl.h"
-#include <string.h>
+#include "DecorationLayerChromium.h"
+#include "WebLayerImpl.h"
-int
-safe_strcmp(const char* s1, const char* s2)
+using cc::DecorationLayerChromium;
+
+namespace WebKit {
+
+WebDecorationLayer* WebDecorationLayer::create()
+{
+ return new WebDecorationLayerImpl();
+}
+
+WebDecorationLayerImpl::WebDecorationLayerImpl()
+{
+ RefPtr<DecorationLayerChromium> layer = DecorationLayerChromium::create();
+ layer->setIsDrawable(true);
+ m_layer = adoptPtr(new WebLayerImpl(layer.release()));
+}
+
+WebDecorationLayerImpl::~WebDecorationLayerImpl()
+{
+}
+
+WebLayer* WebDecorationLayerImpl::layer()
{
- if (s1 == NULL || s2 == NULL) {
- return (s1 != s2);
- }
- return strcmp(s1, s2);
+ return m_layer.get();
}
+
+} // namespace WebKit

Powered by Google App Engine
This is Rietveld 408576698