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

Unified Diff: Source/core/page/Page.cpp

Issue 284793003: Implement languagechange event, fired when accept languages changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase and add tests Created 6 years, 7 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.h ('k') | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/Page.cpp
diff --git a/Source/core/page/Page.cpp b/Source/core/page/Page.cpp
index d2cbc0d8e4f6ee0c6fe3d5fd05f9c4b982a4f767..69e6994589f8b1eb3709670fb90bb923f99b5075 100644
--- a/Source/core/page/Page.cpp
+++ b/Source/core/page/Page.cpp
@@ -531,6 +531,17 @@ void Page::didCommitLoad(LocalFrame* frame)
}
}
+void Page::acceptLanguagesChanged()
+{
+ Vector< RefPtr<LocalFrame> > frames;
+
+ for (LocalFrame* frame = mainFrame(); frame; frame = frame->tree().traverseNext())
+ frames.append(frame);
+
+ for (unsigned i = 0; i < frames.size(); ++i)
+ frames[i]->domWindow()->dispatchEvent(Event::create(EventTypeNames::languagechange));
+}
+
PageLifecycleNotifier& Page::lifecycleNotifier()
{
return static_cast<PageLifecycleNotifier&>(LifecycleContext<Page>::lifecycleNotifier());
« no previous file with comments | « Source/core/page/Page.h ('k') | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698