| 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 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 702 return ReplaceStringPlaceholders(GetLocalizedString(message_id), value, NULL); | 702 return ReplaceStringPlaceholders(GetLocalizedString(message_id), value, NULL); |
| 703 } | 703 } |
| 704 | 704 |
| 705 WebString WebKitPlatformSupportImpl::queryLocalizedString( | 705 WebString WebKitPlatformSupportImpl::queryLocalizedString( |
| 706 WebLocalizedString::Name name, | 706 WebLocalizedString::Name name, |
| 707 const WebString& value1, | 707 const WebString& value1, |
| 708 const WebString& value2) { | 708 const WebString& value2) { |
| 709 int message_id = ToMessageID(name); | 709 int message_id = ToMessageID(name); |
| 710 if (message_id < 0) | 710 if (message_id < 0) |
| 711 return WebString(); | 711 return WebString(); |
| 712 std::vector<string16> values; | 712 std::vector<base::string16> values; |
| 713 values.reserve(2); | 713 values.reserve(2); |
| 714 values.push_back(value1); | 714 values.push_back(value1); |
| 715 values.push_back(value2); | 715 values.push_back(value2); |
| 716 return ReplaceStringPlaceholders( | 716 return ReplaceStringPlaceholders( |
| 717 GetLocalizedString(message_id), values, NULL); | 717 GetLocalizedString(message_id), values, NULL); |
| 718 } | 718 } |
| 719 | 719 |
| 720 double WebKitPlatformSupportImpl::currentTime() { | 720 double WebKitPlatformSupportImpl::currentTime() { |
| 721 return base::Time::Now().ToDoubleT(); | 721 return base::Time::Now().ToDoubleT(); |
| 722 } | 722 } |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 956 return NULL; | 956 return NULL; |
| 957 scoped_ptr<WebDiscardableMemoryImpl> discardable( | 957 scoped_ptr<WebDiscardableMemoryImpl> discardable( |
| 958 new WebDiscardableMemoryImpl()); | 958 new WebDiscardableMemoryImpl()); |
| 959 if (discardable->InitializeAndLock(bytes)) | 959 if (discardable->InitializeAndLock(bytes)) |
| 960 return discardable.release(); | 960 return discardable.release(); |
| 961 return NULL; | 961 return NULL; |
| 962 } | 962 } |
| 963 | 963 |
| 964 | 964 |
| 965 } // namespace webkit_glue | 965 } // namespace webkit_glue |
| OLD | NEW |