OLD | NEW |
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 "components/html_viewer/blink_platform_impl.h" | 5 #include "components/html_viewer/blink_platform_impl.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 } | 113 } |
114 | 114 |
115 blink::WebString BlinkPlatformImpl::defaultLocale() { | 115 blink::WebString BlinkPlatformImpl::defaultLocale() { |
116 return blink::WebString::fromUTF8("en-US"); | 116 return blink::WebString::fromUTF8("en-US"); |
117 } | 117 } |
118 | 118 |
119 blink::WebBlobRegistry* BlinkPlatformImpl::blobRegistry() { | 119 blink::WebBlobRegistry* BlinkPlatformImpl::blobRegistry() { |
120 return &blob_registry_; | 120 return &blob_registry_; |
121 } | 121 } |
122 | 122 |
123 double BlinkPlatformImpl::currentTimeSeconds() { | |
124 return base::Time::Now().ToDoubleT(); | |
125 } | |
126 | |
127 double BlinkPlatformImpl::monotonicallyIncreasingTimeSeconds() { | |
128 return base::TimeTicks::Now().ToInternalValue() / | |
129 static_cast<double>(base::Time::kMicrosecondsPerSecond); | |
130 } | |
131 | |
132 bool BlinkPlatformImpl::isThreadedCompositingEnabled() { | 123 bool BlinkPlatformImpl::isThreadedCompositingEnabled() { |
133 return true; | 124 return true; |
134 } | 125 } |
135 | 126 |
136 blink::WebCompositorSupport* BlinkPlatformImpl::compositorSupport() { | 127 blink::WebCompositorSupport* BlinkPlatformImpl::compositorSupport() { |
137 return &compositor_support_; | 128 return &compositor_support_; |
138 } | 129 } |
139 | 130 |
140 uint32_t BlinkPlatformImpl::getUniqueIdForProcess() { | 131 uint32_t BlinkPlatformImpl::getUniqueIdForProcess() { |
141 // TODO(rickyz): Replace this with base::GetUniqueIdForProcess when that's | 132 // TODO(rickyz): Replace this with base::GetUniqueIdForProcess when that's |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 BlinkPlatformImpl::notificationManager() { | 292 BlinkPlatformImpl::notificationManager() { |
302 return &web_notification_manager_; | 293 return &web_notification_manager_; |
303 } | 294 } |
304 | 295 |
305 void BlinkPlatformImpl::UpdateWebThreadTLS(blink::WebThread* thread) { | 296 void BlinkPlatformImpl::UpdateWebThreadTLS(blink::WebThread* thread) { |
306 DCHECK(!current_thread_slot_.Get()); | 297 DCHECK(!current_thread_slot_.Get()); |
307 current_thread_slot_.Set(thread); | 298 current_thread_slot_.Set(thread); |
308 } | 299 } |
309 | 300 |
310 } // namespace html_viewer | 301 } // namespace html_viewer |
OLD | NEW |