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

Unified Diff: third_party/WebKit/Source/platform/LifecycleObserver.h

Issue 2238503002: Elide LifecycleObserver<T,O>::Context type alias. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/LifecycleObserver.h
diff --git a/third_party/WebKit/Source/platform/LifecycleObserver.h b/third_party/WebKit/Source/platform/LifecycleObserver.h
index f2d31d9ea01bd96635137a752c9c459141a32f8c..34a491f3ce15d5cc8f1fe7003c1db255639bb81d 100644
--- a/third_party/WebKit/Source/platform/LifecycleObserver.h
+++ b/third_party/WebKit/Source/platform/LifecycleObserver.h
@@ -31,11 +31,9 @@
namespace blink {
-template<typename T, typename Observer>
+template<typename Context, typename Observer>
class LifecycleObserver : public GarbageCollectedMixin {
public:
- using Context = T;
-
DEFINE_INLINE_VIRTUAL_TRACE()
{
visitor->trace(m_lifecycleContext);
@@ -63,8 +61,8 @@ private:
WeakMember<Context> m_lifecycleContext;
};
-template<typename T, typename Observer>
-inline void LifecycleObserver<T, Observer>::setContext(Context* context)
+template<typename Context, typename Observer>
+inline void LifecycleObserver<Context, Observer>::setContext(Context* context)
{
if (m_lifecycleContext)
m_lifecycleContext->removeObserver(static_cast<Observer*>(this));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698