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

Unified Diff: Source/core/page/PageLifecycleNotifier.h

Issue 19641006: Cancel vibration when frame load is committed. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 5 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/page/Page.cpp ('k') | Source/core/page/PageLifecycleObserver.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/PageLifecycleNotifier.h
diff --git a/Source/core/page/PageLifecycleNotifier.h b/Source/core/page/PageLifecycleNotifier.h
index 092760522d68eb89dc177922c10f469ee2c054ea..f57128c120c06347c7aa8cf2353df77b8e0cafb3 100644
--- a/Source/core/page/PageLifecycleNotifier.h
+++ b/Source/core/page/PageLifecycleNotifier.h
@@ -34,12 +34,14 @@
namespace WebCore {
class Page;
+class Frame;
class PageLifecycleNotifier : public LifecycleNotifier {
public:
static PassOwnPtr<PageLifecycleNotifier> create(LifecycleContext*);
void notifyPageVisibilityChanged();
+ void notifyDidCommitLoad(Frame*);
virtual void addObserver(LifecycleObserver*, LifecycleObserver::Type) OVERRIDE;
virtual void removeObserver(LifecycleObserver*, LifecycleObserver::Type) OVERRIDE;
@@ -63,6 +65,13 @@ inline void PageLifecycleNotifier::notifyPageVisibilityChanged()
(*it)->pageVisibilityChanged();
}
+inline void PageLifecycleNotifier::notifyDidCommitLoad(Frame* frame)
+{
+ TemporaryChange<IterationType> scope(this->m_iterating, IteratingOverPageObservers);
+ for (PageObserverSet::iterator it = m_pageObservers.begin(); it != m_pageObservers.end(); ++it)
+ (*it)->didCommitLoad(frame);
+}
+
} // namespace WebCore
#endif // PageLifecycleNotifier_h
« no previous file with comments | « Source/core/page/Page.cpp ('k') | Source/core/page/PageLifecycleObserver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698