Index: third_party/WebKit/public/platform/WebMutableState.h |
diff --git a/third_party/WebKit/public/platform/WebMutableState.h b/third_party/WebKit/public/platform/WebMutableState.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..5ba0b69ca8e08132af8266d6adc4dfe52fe004d2 |
--- /dev/null |
+++ b/third_party/WebKit/public/platform/WebMutableState.h |
@@ -0,0 +1,43 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef WebMutableState_h |
+#define WebMutableState_h |
+ |
+#include <cstdint> |
+ |
+class SkMatrix44; |
+ |
+namespace blink { |
+ |
+class WebMutableState; |
+ |
+class WebMutableStateProvider { |
esprehn
2015/11/16 20:01:04
this needs a less generic name, "mutable state" is
Ian Vollick
2015/11/18 17:20:33
Done.
|
+public: |
+ virtual ~WebMutableStateProvider() { } |
+ |
+ // The caller is expected to take ownership. |
+ virtual WebMutableState* getMutableStateFor(uint64_t elementId) = 0; |
enne (OOO)
2015/11/16 19:12:33
Raw pointers in APIs. T_T
unique_ptr support sho
danakj
2015/11/16 19:31:18
This is platform, can it just use scoped_ptr?
Ian Vollick
2015/11/18 17:20:33
This pointer ultimately ends up being owned by cor
|
+}; |
+ |
+class WebMutableState { |
esprehn
2015/11/16 20:01:04
ditto, needs a better name, also a comment.
Ian Vollick
2015/11/18 17:20:33
Done.
|
+public: |
+ virtual ~WebMutableState() { } |
+ |
+ virtual double getOpacity() const = 0; |
esprehn
2015/11/16 20:01:04
opacity(), no get* for a getter.
Ian Vollick
2015/11/18 17:20:33
Done.
|
+ virtual void setOpacity(double) = 0; |
+ |
+ virtual const SkMatrix44& getTransform() const = 0; |
esprehn
2015/11/16 20:01:04
ditto for all of these
Ian Vollick
2015/11/18 17:20:33
Done.
|
+ virtual void setTransform(const SkMatrix44&) = 0; |
+ |
+ virtual double getScrollLeft() const = 0; |
+ virtual void setScrollLeft(double) = 0; |
+ |
+ virtual double getScrollTop() const = 0; |
+ virtual void setScrollTop(double) = 0; |
+}; |
+ |
+} // namespace blink |
+ |
+#endif // WebMutableState_h |