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

Side by Side Diff: components/html_viewer/blink_platform_impl.cc

Issue 1550563002: Blink Platform: Remove time functions from Platform. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge again. Created 4 years, 10 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 "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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698