Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/renderer/render_thread_impl.h" | 5 #include "content/renderer/render_thread_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 130 #include "third_party/WebKit/public/web/WebDocument.h" | 130 #include "third_party/WebKit/public/web/WebDocument.h" |
| 131 #include "third_party/WebKit/public/web/WebFrame.h" | 131 #include "third_party/WebKit/public/web/WebFrame.h" |
| 132 #include "third_party/WebKit/public/web/WebImageCache.h" | 132 #include "third_party/WebKit/public/web/WebImageCache.h" |
| 133 #include "third_party/WebKit/public/web/WebKit.h" | 133 #include "third_party/WebKit/public/web/WebKit.h" |
| 134 #include "third_party/WebKit/public/web/WebNetworkStateNotifier.h" | 134 #include "third_party/WebKit/public/web/WebNetworkStateNotifier.h" |
| 135 #include "third_party/WebKit/public/web/WebPopupMenu.h" | 135 #include "third_party/WebKit/public/web/WebPopupMenu.h" |
| 136 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" | 136 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" |
| 137 #include "third_party/WebKit/public/web/WebScriptController.h" | 137 #include "third_party/WebKit/public/web/WebScriptController.h" |
| 138 #include "third_party/WebKit/public/web/WebSecurityPolicy.h" | 138 #include "third_party/WebKit/public/web/WebSecurityPolicy.h" |
| 139 #include "third_party/WebKit/public/web/WebView.h" | 139 #include "third_party/WebKit/public/web/WebView.h" |
| 140 #include "third_party/icu/source/i18n/unicode/timezone.h" | |
| 140 #include "third_party/skia/include/core/SkGraphics.h" | 141 #include "third_party/skia/include/core/SkGraphics.h" |
| 141 #include "ui/base/layout.h" | 142 #include "ui/base/layout.h" |
| 142 #include "ui/base/ui_base_switches.h" | 143 #include "ui/base/ui_base_switches.h" |
| 143 #include "v8/include/v8.h" | 144 #include "v8/include/v8.h" |
| 144 | 145 |
| 145 #if defined(OS_ANDROID) | 146 #if defined(OS_ANDROID) |
| 146 #include <cpu-features.h> | 147 #include <cpu-features.h> |
| 147 #include "content/renderer/android/synchronous_compositor_factory.h" | 148 #include "content/renderer/android/synchronous_compositor_factory.h" |
| 148 #include "content/renderer/media/android/renderer_demuxer_android.h" | 149 #include "content/renderer/media/android/renderer_demuxer_android.h" |
| 149 #endif | 150 #endif |
| (...skipping 1538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1688 RenderProcessObserver, observers_, NetworkStateChanged(online)); | 1689 RenderProcessObserver, observers_, NetworkStateChanged(online)); |
| 1689 WebNetworkStateNotifier::setWebConnectionType( | 1690 WebNetworkStateNotifier::setWebConnectionType( |
| 1690 NetConnectionTypeToWebConnectionType(type)); | 1691 NetConnectionTypeToWebConnectionType(type)); |
| 1691 } | 1692 } |
| 1692 | 1693 |
| 1693 void RenderThreadImpl::OnTempCrashWithData(const GURL& data) { | 1694 void RenderThreadImpl::OnTempCrashWithData(const GURL& data) { |
| 1694 GetContentClient()->SetActiveURL(data); | 1695 GetContentClient()->SetActiveURL(data); |
| 1695 CHECK(false); | 1696 CHECK(false); |
| 1696 } | 1697 } |
| 1697 | 1698 |
| 1698 void RenderThreadImpl::OnUpdateTimezone() { | 1699 void RenderThreadImpl::OnUpdateTimezone(const std::string& zone_id) { |
| 1699 if (!blink_platform_impl_) | 1700 if (!blink_platform_impl_) |
| 1700 return; | 1701 return; |
| 1702 if (!zone_id.empty()) { | |
| 1703 icu::TimeZone *defaultZone = icu::TimeZone::createTimeZone( | |
| 1704 icu::UnicodeString::fromUTF8(zone_id)); | |
| 1705 icu::TimeZone::adoptDefault(defaultZone); | |
|
jungshik at Google
2015/04/10 00:23:44
adoptDefault() is not thread-safe. If this is call
jochen (gone - plz use gerrit)
2015/04/10 12:17:24
can we make it thread safe?
jungshik at Google
2015/04/24 22:40:53
It turned out that I was mistaken about this part.
| |
| 1706 VLOG(0) << "ICU dflt timezone is set to " << zone_id; | |
| 1707 } | |
| 1701 NotifyTimezoneChange(); | 1708 NotifyTimezoneChange(); |
| 1702 } | 1709 } |
| 1703 | 1710 |
| 1704 #if defined(OS_ANDROID) | 1711 #if defined(OS_ANDROID) |
| 1705 void RenderThreadImpl::OnSetWebKitSharedTimersSuspended(bool suspend) { | 1712 void RenderThreadImpl::OnSetWebKitSharedTimersSuspended(bool suspend) { |
| 1706 if (suspend_webkit_shared_timer_) { | 1713 if (suspend_webkit_shared_timer_) { |
| 1707 EnsureWebKitInitialized(); | 1714 EnsureWebKitInitialized(); |
| 1708 if (suspend) { | 1715 if (suspend) { |
| 1709 blink_platform_impl_->SuspendSharedTimer(); | 1716 blink_platform_impl_->SuspendSharedTimer(); |
| 1710 } else { | 1717 } else { |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1850 } | 1857 } |
| 1851 | 1858 |
| 1852 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { | 1859 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { |
| 1853 size_t erased = | 1860 size_t erased = |
| 1854 RenderThreadImpl::current()->pending_render_frame_connects_.erase( | 1861 RenderThreadImpl::current()->pending_render_frame_connects_.erase( |
| 1855 routing_id_); | 1862 routing_id_); |
| 1856 DCHECK_EQ(1u, erased); | 1863 DCHECK_EQ(1u, erased); |
| 1857 } | 1864 } |
| 1858 | 1865 |
| 1859 } // namespace content | 1866 } // namespace content |
| OLD | NEW |