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 "webkit/glue/webkitplatformsupport_impl.h" | 5 #include "webkit/glue/webkitplatformsupport_impl.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
999 if (device_source == WebKit::WebGestureEvent::Touchscreen) | 999 if (device_source == WebKit::WebGestureEvent::Touchscreen) |
1000 return fling_curve_configuration_->CreateForTouchScreen(velocity, | 1000 return fling_curve_configuration_->CreateForTouchScreen(velocity, |
1001 cumulative_scroll); | 1001 cumulative_scroll); |
1002 | 1002 |
1003 return fling_curve_configuration_->CreateForTouchPad(velocity, | 1003 return fling_curve_configuration_->CreateForTouchPad(velocity, |
1004 cumulative_scroll); | 1004 cumulative_scroll); |
1005 } | 1005 } |
1006 | 1006 |
1007 WebKit::WebDiscardableMemory* | 1007 WebKit::WebDiscardableMemory* |
1008 WebKitPlatformSupportImpl::allocateAndLockDiscardableMemory(size_t bytes) { | 1008 WebKitPlatformSupportImpl::allocateAndLockDiscardableMemory(size_t bytes) { |
1009 if (!base::DiscardableMemory::Supported()) | |
1010 return NULL; | |
1011 scoped_ptr<WebDiscardableMemoryImpl> discardable( | 1009 scoped_ptr<WebDiscardableMemoryImpl> discardable( |
1012 new WebDiscardableMemoryImpl()); | 1010 new WebDiscardableMemoryImpl()); |
1013 if (discardable->InitializeAndLock(bytes)) | 1011 if (discardable->InitializeAndLock(bytes)) |
1014 return discardable.release(); | 1012 return discardable.release(); |
1015 return NULL; | 1013 return NULL; |
1016 } | 1014 } |
1017 | 1015 |
1018 #if defined(OS_ANDROID) | 1016 #if defined(OS_ANDROID) |
1019 webkit_media::WebAudioMediaCodecRunner | 1017 webkit_media::WebAudioMediaCodecRunner |
1020 WebKitPlatformSupportImpl::GetWebAudioMediaCodecRunner() { | 1018 WebKitPlatformSupportImpl::GetWebAudioMediaCodecRunner() { |
1021 return base::Bind(&NullRunWebAudioMediaCodec); | 1019 return base::Bind(&NullRunWebAudioMediaCodec); |
1022 } | 1020 } |
1023 #endif | 1021 #endif |
1024 | 1022 |
1025 } // namespace webkit_glue | 1023 } // namespace webkit_glue |
OLD | NEW |