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

Side by Side Diff: content/browser/shared_worker/shared_worker_service_impl.cc

Issue 592043005: [WIP]Implement Chromium side changes for navigator.language(s) support for workers. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: languagechange event plumbing for shared worker. Stil 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/shared_worker/shared_worker_service_impl.h" 5 #include "content/browser/shared_worker/shared_worker_service_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <iterator> 8 #include <iterator>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 void SharedWorkerServiceImpl::ChangeUpdateWorkerDependencyFuncForTesting( 655 void SharedWorkerServiceImpl::ChangeUpdateWorkerDependencyFuncForTesting(
656 UpdateWorkerDependencyFunc new_func) { 656 UpdateWorkerDependencyFunc new_func) {
657 update_worker_dependency_ = new_func; 657 update_worker_dependency_ = new_func;
658 } 658 }
659 659
660 void SharedWorkerServiceImpl::ChangeTryIncrementWorkerRefCountFuncForTesting( 660 void SharedWorkerServiceImpl::ChangeTryIncrementWorkerRefCountFuncForTesting(
661 bool (*new_func)(int)) { 661 bool (*new_func)(int)) {
662 s_try_increment_worker_ref_count_ = new_func; 662 s_try_increment_worker_ref_count_ = new_func;
663 } 663 }
664 664
665 void SharedWorkerServiceImpl::AcceptLanguageChanged(
666 const base::string16& languages) {
667 for (WorkerHostMap::const_iterator iter = worker_hosts_.begin();
668 iter != worker_hosts_.end();
669 ++iter) {
670 iter->second->AcceptLanguageChanged(languages);
671 }
672 }
673
665 } // namespace content 674 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/shared_worker/shared_worker_service_impl.h ('k') | content/common/worker_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698