Chromium Code Reviews| 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 "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 28 matching lines...) Expand all Loading... | |
| 39 #include "grit/blink_resources.h" | 39 #include "grit/blink_resources.h" |
| 40 #include "grit/webkit_resources.h" | 40 #include "grit/webkit_resources.h" |
| 41 #include "grit/webkit_strings.h" | 41 #include "grit/webkit_strings.h" |
| 42 #include "net/base/data_url.h" | 42 #include "net/base/data_url.h" |
| 43 #include "net/base/mime_util.h" | 43 #include "net/base/mime_util.h" |
| 44 #include "net/base/net_errors.h" | 44 #include "net/base/net_errors.h" |
| 45 #include "third_party/WebKit/public/platform/WebConvertableToTraceFormat.h" | 45 #include "third_party/WebKit/public/platform/WebConvertableToTraceFormat.h" |
| 46 #include "third_party/WebKit/public/platform/WebData.h" | 46 #include "third_party/WebKit/public/platform/WebData.h" |
| 47 #include "third_party/WebKit/public/platform/WebString.h" | 47 #include "third_party/WebKit/public/platform/WebString.h" |
| 48 #include "third_party/WebKit/public/platform/WebWaitableEvent.h" | 48 #include "third_party/WebKit/public/platform/WebWaitableEvent.h" |
| 49 #include "third_party/WebKit/public/web/WebInputEvent.h" | |
|
rjkroege
2014/05/30 14:43:43
my understanding is that public/web is not suppose
| |
| 50 #include "ui/base/layout.h" | 49 #include "ui/base/layout.h" |
| 51 | 50 |
| 52 #if defined(OS_ANDROID) | 51 #if defined(OS_ANDROID) |
| 53 #include "base/android/sys_utils.h" | 52 #include "base/android/sys_utils.h" |
| 54 #include "content/child/fling_animator_impl_android.h" | 53 #include "content/child/fling_animator_impl_android.h" |
| 55 #endif | 54 #endif |
| 56 | 55 |
| 57 #if !defined(NO_TCMALLOC) && defined(USE_TCMALLOC) && !defined(OS_WIN) | 56 #if !defined(NO_TCMALLOC) && defined(USE_TCMALLOC) && !defined(OS_WIN) |
| 58 #include "third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h" | 57 #include "third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h" |
| 59 #endif | 58 #endif |
| (...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 871 void BlinkPlatformImpl::stopSharedTimer() { | 870 void BlinkPlatformImpl::stopSharedTimer() { |
| 872 shared_timer_.Stop(); | 871 shared_timer_.Stop(); |
| 873 } | 872 } |
| 874 | 873 |
| 875 void BlinkPlatformImpl::callOnMainThread( | 874 void BlinkPlatformImpl::callOnMainThread( |
| 876 void (*func)(void*), void* context) { | 875 void (*func)(void*), void* context) { |
| 877 main_loop_->PostTask(FROM_HERE, base::Bind(func, context)); | 876 main_loop_->PostTask(FROM_HERE, base::Bind(func, context)); |
| 878 } | 877 } |
| 879 | 878 |
| 880 blink::WebGestureCurve* BlinkPlatformImpl::createFlingAnimationCurve( | 879 blink::WebGestureCurve* BlinkPlatformImpl::createFlingAnimationCurve( |
| 881 int device_source, | 880 blink::WebGestureDevice device_source, |
| 882 const blink::WebFloatPoint& velocity, | 881 const blink::WebFloatPoint& velocity, |
| 883 const blink::WebSize& cumulative_scroll) { | 882 const blink::WebSize& cumulative_scroll) { |
| 884 #if defined(OS_ANDROID) | 883 #if defined(OS_ANDROID) |
| 885 return FlingAnimatorImpl::CreateAndroidGestureCurve( | 884 return FlingAnimatorImpl::CreateAndroidGestureCurve( |
| 886 velocity, | 885 velocity, |
| 887 cumulative_scroll); | 886 cumulative_scroll); |
| 888 #endif | 887 #endif |
| 889 | 888 |
| 890 if (device_source == blink::WebGestureEvent::Touchscreen) | 889 if (device_source == blink::WebGestureDeviceTouchpad) |
| 891 return fling_curve_configuration_->CreateForTouchScreen(velocity, | 890 return fling_curve_configuration_->CreateForTouchScreen(velocity, |
| 892 cumulative_scroll); | 891 cumulative_scroll); |
| 893 | 892 |
| 894 return fling_curve_configuration_->CreateForTouchPad(velocity, | 893 return fling_curve_configuration_->CreateForTouchPad(velocity, |
| 895 cumulative_scroll); | 894 cumulative_scroll); |
| 896 } | 895 } |
| 897 | 896 |
| 898 void BlinkPlatformImpl::didStartWorkerRunLoop( | 897 void BlinkPlatformImpl::didStartWorkerRunLoop( |
| 899 const blink::WebWorkerRunLoop& runLoop) { | 898 const blink::WebWorkerRunLoop& runLoop) { |
| 900 WorkerTaskRunner* worker_task_runner = WorkerTaskRunner::Instance(); | 899 WorkerTaskRunner* worker_task_runner = WorkerTaskRunner::Instance(); |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1094 } | 1093 } |
| 1095 | 1094 |
| 1096 // static | 1095 // static |
| 1097 void BlinkPlatformImpl::DestroyCurrentThread(void* thread) { | 1096 void BlinkPlatformImpl::DestroyCurrentThread(void* thread) { |
| 1098 WebThreadImplForMessageLoop* impl = | 1097 WebThreadImplForMessageLoop* impl = |
| 1099 static_cast<WebThreadImplForMessageLoop*>(thread); | 1098 static_cast<WebThreadImplForMessageLoop*>(thread); |
| 1100 delete impl; | 1099 delete impl; |
| 1101 } | 1100 } |
| 1102 | 1101 |
| 1103 } // namespace content | 1102 } // namespace content |
| OLD | NEW |