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

Unified Diff: Source/core/workers/WorkerMessagingProxy.cpp

Issue 592183002: [WIP]Implement Blink side changes for navigator.language(s) support for workers. Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Dedicated worker languagechange event added. Still WIP. Created 6 years, 2 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/workers/WorkerLanguageTasks.cpp ('k') | Source/core/workers/WorkerNavigator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/workers/WorkerMessagingProxy.cpp
diff --git a/Source/core/workers/WorkerMessagingProxy.cpp b/Source/core/workers/WorkerMessagingProxy.cpp
index aef742dc48bceaef9d5efec621b478b2daecc96a..59f58777f4b579df1ee79c7ec419e4fdb7d1f291 100644
--- a/Source/core/workers/WorkerMessagingProxy.cpp
+++ b/Source/core/workers/WorkerMessagingProxy.cpp
@@ -37,6 +37,7 @@
#include "core/frame/FrameConsole.h"
#include "core/frame/LocalDOMWindow.h"
#include "core/frame/LocalFrame.h"
+#include "core/frame/Navigator.h"
#include "core/frame/csp/ContentSecurityPolicy.h"
#include "core/inspector/ScriptCallStack.h"
#include "core/inspector/WorkerDebuggerAgent.h"
@@ -47,8 +48,10 @@
#include "core/workers/Worker.h"
#include "core/workers/WorkerClients.h"
#include "core/workers/WorkerInspectorProxy.h"
+#include "core/workers/WorkerLanguageTasks.h"
#include "core/workers/WorkerObjectProxy.h"
#include "core/workers/WorkerThreadStartupData.h"
+#include "platform/Language.h"
#include "platform/NotImplemented.h"
#include "platform/heap/Handle.h"
#include "wtf/Functional.h"
@@ -199,6 +202,9 @@ void WorkerMessagingProxy::workerThreadCreated(PassRefPtr<DedicatedWorkerThread>
ASSERT(!m_askedToTerminate);
m_workerThread = workerThread;
+ // Before any other task, pass on ua languages vector to the thread.
+ m_workerThread->postTask(WorkerThreadSetUserPreferredLanguagesTask::create(m_executionContext->executingWindow()->navigator().languages()));
+
unsigned taskCount = m_queuedEarlyTasks.size();
ASSERT(!m_unconfirmedMessageCount);
m_unconfirmedMessageCount = taskCount;
« no previous file with comments | « Source/core/workers/WorkerLanguageTasks.cpp ('k') | Source/core/workers/WorkerNavigator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698