| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 return 0; | 289 return 0; |
| 290 } | 290 } |
| 291 | 291 |
| 292 // Returns whether the given link hash is in the user's history. The | 292 // Returns whether the given link hash is in the user's history. The |
| 293 // hash must have been generated by calling VisitedLinkHash(). | 293 // hash must have been generated by calling VisitedLinkHash(). |
| 294 virtual bool IsLinkVisited(unsigned long long link_hash) { return false; } | 294 virtual bool IsLinkVisited(unsigned long long link_hash) { return false; } |
| 295 | 295 |
| 296 // Same as above, but always returns actual value, without any caches. | 296 // Same as above, but always returns actual value, without any caches. |
| 297 virtual size_t ActualMemoryUsageMB() { return 0; } | 297 virtual size_t ActualMemoryUsageMB() { return 0; } |
| 298 | 298 |
| 299 // Returns the number of megabytes of physical memory on the current machine. |
| 300 virtual size_t AmountOfPhysicalMemoryMB() { return 0; } |
| 301 |
| 302 // Sets the physical memory size in megabytes for testing. |
| 303 virtual void SetDevicePhysicalMemoryMBForTesting(int64_t physical_memory_mb) { |
| 304 } |
| 305 |
| 299 // Return the number of of processors of the current machine. | 306 // Return the number of of processors of the current machine. |
| 300 virtual size_t NumberOfProcessors() { return 0; } | 307 virtual size_t NumberOfProcessors() { return 0; } |
| 301 | 308 |
| 302 static const size_t kNoDecodedImageByteLimit = static_cast<size_t>(-1); | 309 static const size_t kNoDecodedImageByteLimit = static_cast<size_t>(-1); |
| 303 | 310 |
| 304 // Returns the maximum amount of memory a decoded image should be allowed. | 311 // Returns the maximum amount of memory a decoded image should be allowed. |
| 305 // See comments on ImageDecoder::m_maxDecodedBytes. | 312 // See comments on ImageDecoder::m_maxDecodedBytes. |
| 306 virtual size_t MaxDecodedImageBytes() { return kNoDecodedImageByteLimit; } | 313 virtual size_t MaxDecodedImageBytes() { return kNoDecodedImageByteLimit; } |
| 307 | 314 |
| 308 // Process ------------------------------------------------------------- | 315 // Process ------------------------------------------------------------- |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 695 protected: | 702 protected: |
| 696 Platform(); | 703 Platform(); |
| 697 virtual ~Platform() {} | 704 virtual ~Platform() {} |
| 698 | 705 |
| 699 WebThread* main_thread_; | 706 WebThread* main_thread_; |
| 700 }; | 707 }; |
| 701 | 708 |
| 702 } // namespace blink | 709 } // namespace blink |
| 703 | 710 |
| 704 #endif | 711 #endif |
| OLD | NEW |