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

Unified Diff: Source/core/style/StyleObserver.h

Issue 1323243002: WIP - Rough draft of style observation in style of apply hooks. Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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
« no previous file with comments | « Source/core/dom/Element.cpp ('k') | Source/core/style/StyleObserver.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/style/StyleObserver.h
diff --git a/Source/core/style/StyleObserver.h b/Source/core/style/StyleObserver.h
new file mode 100644
index 0000000000000000000000000000000000000000..9b8f3d5472c497f858dba8765c3929d1064494b2
--- /dev/null
+++ b/Source/core/style/StyleObserver.h
@@ -0,0 +1,29 @@
+// 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 StyleObserver_h
+#define StyleObserver_h
+
+#include "wtf/WeakPtr.h"
+
+namespace blink {
+
+class ComputedStyle;
+class Element;
+
+class StyleObserver {
+public:
+ StyleObserver();
+ virtual ~StyleObserver();
+ virtual void onStyleChanged(const Element*, const ComputedStyle* oldStyle, const ComputedStyle* newStyle) = 0;
+
+ WeakPtr<StyleObserver> createWeakPtr();
+
+private:
+ WeakPtrFactory<StyleObserver> m_weakPtrFactory;
+};
+
+} // namespace blink
+
+#endif // StyleObserver_h
« no previous file with comments | « Source/core/dom/Element.cpp ('k') | Source/core/style/StyleObserver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698