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

Side by Side Diff: third_party/WebKit/Source/core/dom/ContextLifecycleObserver.h

Issue 2562303002: Add ContextLifecycleObserver::frame() (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 15 matching lines...) Expand all
26 26
27 #ifndef ContextLifecycleObserver_h 27 #ifndef ContextLifecycleObserver_h
28 #define ContextLifecycleObserver_h 28 #define ContextLifecycleObserver_h
29 29
30 #include "core/CoreExport.h" 30 #include "core/CoreExport.h"
31 #include "core/dom/ExecutionContext.h" 31 #include "core/dom/ExecutionContext.h"
32 #include "platform/LifecycleObserver.h" 32 #include "platform/LifecycleObserver.h"
33 33
34 namespace blink { 34 namespace blink {
35 35
36 class LocalFrame;
37
36 class CORE_EXPORT ContextLifecycleObserver 38 class CORE_EXPORT ContextLifecycleObserver
37 : public LifecycleObserver<ExecutionContext, ContextLifecycleObserver> { 39 : public LifecycleObserver<ExecutionContext, ContextLifecycleObserver> {
38 public: 40 public:
39 ExecutionContext* getExecutionContext() const { return lifecycleContext(); } 41 ExecutionContext* getExecutionContext() const { return lifecycleContext(); }
42 LocalFrame* frame() const;
sof 2016/12/12 06:35:26 Add a short comment stating when you can expect th
40 43
41 enum Type { 44 enum Type {
42 GenericType, 45 GenericType,
43 ActiveDOMObjectType, 46 ActiveDOMObjectType,
44 }; 47 };
45 48
46 Type observerType() const { return m_observerType; } 49 Type observerType() const { return m_observerType; }
47 50
48 protected: 51 protected:
49 explicit ContextLifecycleObserver(ExecutionContext* executionContext, 52 explicit ContextLifecycleObserver(ExecutionContext* executionContext,
50 Type type = GenericType) 53 Type type = GenericType)
51 : LifecycleObserver(executionContext), m_observerType(type) {} 54 : LifecycleObserver(executionContext), m_observerType(type) {}
52 55
53 private: 56 private:
54 Type m_observerType; 57 Type m_observerType;
55 }; 58 };
56 59
57 } // namespace blink 60 } // namespace blink
58 61
59 #endif // ContextLifecycleObserver_h 62 #endif // ContextLifecycleObserver_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/BUILD.gn ('k') | third_party/WebKit/Source/core/dom/ContextLifecycleObserver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698