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

Side by Side Diff: content/child/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: Merrrge agaaain. 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 "content/child/blink_platform_impl.h" 5 #include "content/child/blink_platform_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 if (message_id < 0) 853 if (message_id < 0)
854 return WebString(); 854 return WebString();
855 std::vector<base::string16> values; 855 std::vector<base::string16> values;
856 values.reserve(2); 856 values.reserve(2);
857 values.push_back(value1); 857 values.push_back(value1);
858 values.push_back(value2); 858 values.push_back(value2);
859 return base::ReplaceStringPlaceholders( 859 return base::ReplaceStringPlaceholders(
860 GetContentClient()->GetLocalizedString(message_id), values, NULL); 860 GetContentClient()->GetLocalizedString(message_id), values, NULL);
861 } 861 }
862 862
863 double BlinkPlatformImpl::currentTimeSeconds() {
864 return base::Time::Now().ToDoubleT();
865 }
866
867 double BlinkPlatformImpl::monotonicallyIncreasingTimeSeconds() {
868 return base::TimeTicks::Now().ToInternalValue() /
869 static_cast<double>(base::Time::kMicrosecondsPerSecond);
870 }
871
872 blink::WebThread* BlinkPlatformImpl::compositorThread() const { 863 blink::WebThread* BlinkPlatformImpl::compositorThread() const {
873 return compositor_thread_; 864 return compositor_thread_;
874 } 865 }
875 866
876 blink::WebGestureCurve* BlinkPlatformImpl::createFlingAnimationCurve( 867 blink::WebGestureCurve* BlinkPlatformImpl::createFlingAnimationCurve(
877 blink::WebGestureDevice device_source, 868 blink::WebGestureDevice device_source,
878 const blink::WebFloatPoint& velocity, 869 const blink::WebFloatPoint& velocity,
879 const blink::WebSize& cumulative_scroll) { 870 const blink::WebSize& cumulative_scroll) {
880 return ui::WebGestureCurveImpl::CreateFromDefaultPlatformCurve( 871 return ui::WebGestureCurveImpl::CreateFromDefaultPlatformCurve(
881 gfx::Vector2dF(velocity.x, velocity.y), 872 gfx::Vector2dF(velocity.x, velocity.y),
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
1050 return WebString::fromUTF8(ui::KeycodeConverter::DomKeyToKeyString( 1041 return WebString::fromUTF8(ui::KeycodeConverter::DomKeyToKeyString(
1051 static_cast<ui::DomKey>(dom_key))); 1042 static_cast<ui::DomKey>(dom_key)));
1052 } 1043 }
1053 1044
1054 int BlinkPlatformImpl::domKeyEnumFromString(const WebString& key_string) { 1045 int BlinkPlatformImpl::domKeyEnumFromString(const WebString& key_string) {
1055 return static_cast<int>( 1046 return static_cast<int>(
1056 ui::KeycodeConverter::KeyStringToDomKey(key_string.utf8())); 1047 ui::KeycodeConverter::KeyStringToDomKey(key_string.utf8()));
1057 } 1048 }
1058 1049
1059 } // namespace content 1050 } // namespace content
OLDNEW
« no previous file with comments | « content/child/blink_platform_impl.h ('k') | third_party/WebKit/Source/bindings/core/v8/V8GCForContextDispose.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698