Chromium Code Reviews| 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 972 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 983 if (device_source == WebKit::WebGestureEvent::Touchscreen) | 983 if (device_source == WebKit::WebGestureEvent::Touchscreen) |
| 984 return fling_curve_configuration_->CreateForTouchScreen(velocity, | 984 return fling_curve_configuration_->CreateForTouchScreen(velocity, |
| 985 cumulative_scroll); | 985 cumulative_scroll); |
| 986 | 986 |
| 987 return fling_curve_configuration_->CreateForTouchPad(velocity, | 987 return fling_curve_configuration_->CreateForTouchPad(velocity, |
| 988 cumulative_scroll); | 988 cumulative_scroll); |
| 989 } | 989 } |
| 990 | 990 |
| 991 WebKit::WebDiscardableMemory* | 991 WebKit::WebDiscardableMemory* |
| 992 WebKitPlatformSupportImpl::allocateAndLockDiscardableMemory(size_t bytes) { | 992 WebKitPlatformSupportImpl::allocateAndLockDiscardableMemory(size_t bytes) { |
| 993 if (!base::DiscardableMemory::Supported()) | 993 if (!base::DiscardableMemoryProvider::GetInstance()) |
|
nduca
2013/06/07 04:52:18
lets seal this though behind base::DiscardableMemo
| |
| 994 return NULL; | 994 return NULL; |
| 995 scoped_ptr<WebDiscardableMemoryImpl> discardable( | 995 scoped_ptr<WebDiscardableMemoryImpl> discardable( |
| 996 new WebDiscardableMemoryImpl()); | 996 new WebDiscardableMemoryImpl()); |
| 997 if (discardable->InitializeAndLock(bytes)) | 997 if (discardable->InitializeAndLock(bytes)) |
| 998 return discardable.release(); | 998 return discardable.release(); |
| 999 return NULL; | 999 return NULL; |
| 1000 } | 1000 } |
| 1001 | 1001 |
| 1002 #if defined(OS_ANDROID) | 1002 #if defined(OS_ANDROID) |
| 1003 webkit_media::WebAudioMediaCodecRunner | 1003 webkit_media::WebAudioMediaCodecRunner |
| 1004 WebKitPlatformSupportImpl::GetWebAudioMediaCodecRunner() { | 1004 WebKitPlatformSupportImpl::GetWebAudioMediaCodecRunner() { |
| 1005 return base::Bind(&NullRunWebAudioMediaCodec); | 1005 return base::Bind(&NullRunWebAudioMediaCodec); |
| 1006 } | 1006 } |
| 1007 #endif | 1007 #endif |
| 1008 | 1008 |
| 1009 } // namespace webkit_glue | 1009 } // namespace webkit_glue |
| OLD | NEW |