Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(320)

Side by Side Diff: third_party/WebKit/public/platform/Platform.h

Issue 1787973002: Replace blink::WebDiscardableMemory with base::DiscardableMemory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use StringPiece::as_string Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 namespace blink { 63 namespace blink {
64 64
65 class WebAudioBus; 65 class WebAudioBus;
66 class WebBlobRegistry; 66 class WebBlobRegistry;
67 class WebCanvasCaptureHandler; 67 class WebCanvasCaptureHandler;
68 class WebClipboard; 68 class WebClipboard;
69 class WebCompositorSupport; 69 class WebCompositorSupport;
70 class WebCookieJar; 70 class WebCookieJar;
71 class WebCrypto; 71 class WebCrypto;
72 class WebDatabaseObserver; 72 class WebDatabaseObserver;
73 class WebDiscardableMemory;
74 class WebPlatformEventListener; 73 class WebPlatformEventListener;
75 class WebFallbackThemeEngine; 74 class WebFallbackThemeEngine;
76 class WebFileSystem; 75 class WebFileSystem;
77 class WebFileUtilities; 76 class WebFileUtilities;
78 class WebFlingAnimator; 77 class WebFlingAnimator;
79 class WebGeofencingProvider; 78 class WebGeofencingProvider;
80 class WebGestureCurve; 79 class WebGestureCurve;
81 class WebGraphicsContext3DProvider; 80 class WebGraphicsContext3DProvider;
82 class WebIDBFactory; 81 class WebIDBFactory;
83 class WebInstalledApp; 82 class WebInstalledApp;
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 { 267 {
269 return WebString(); 268 return WebString();
270 } 269 }
271 270
272 // Same as above, but always returns actual value, without any caches. 271 // Same as above, but always returns actual value, without any caches.
273 virtual size_t actualMemoryUsageMB() { return 0; } 272 virtual size_t actualMemoryUsageMB() { return 0; }
274 273
275 // Return the number of of processors of the current machine. 274 // Return the number of of processors of the current machine.
276 virtual size_t numberOfProcessors() { return 0; } 275 virtual size_t numberOfProcessors() { return 0; }
277 276
278 // Allocates discardable memory. May return nullptr, even if the platform su pports
279 // discardable memory. If nonzero, however, then the WebDiscardableMmeory is
280 // returned in an locked state. You may use its underlying data() member
281 // directly, taking care to unlock it when you are ready to let it become
282 // discardable.
283 virtual WebDiscardableMemory* allocateAndLockDiscardableMemory(size_t bytes) { return nullptr; }
284
285 static const size_t noDecodedImageByteLimit = static_cast<size_t>(-1); 277 static const size_t noDecodedImageByteLimit = static_cast<size_t>(-1);
286 278
287 // Returns the maximum amount of memory a decoded image should be allowed. 279 // Returns the maximum amount of memory a decoded image should be allowed.
288 // See comments on ImageDecoder::m_maxDecodedBytes. 280 // See comments on ImageDecoder::m_maxDecodedBytes.
289 virtual size_t maxDecodedImageBytes() { return noDecodedImageByteLimit; } 281 virtual size_t maxDecodedImageBytes() { return noDecodedImageByteLimit; }
290 282
291 // Process ------------------------------------------------------------- 283 // Process -------------------------------------------------------------
292 284
293 // Returns a unique identifier for a process. This may not necessarily be 285 // Returns a unique identifier for a process. This may not necessarily be
294 // the process's process ID. 286 // the process's process ID.
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 protected: 614 protected:
623 Platform(); 615 Platform();
624 virtual ~Platform() { } 616 virtual ~Platform() { }
625 617
626 WebThread* m_mainThread; 618 WebThread* m_mainThread;
627 }; 619 };
628 620
629 } // namespace blink 621 } // namespace blink
630 622
631 #endif 623 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/public/blink_headers.gypi ('k') | third_party/WebKit/public/platform/WebDiscardableMemory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698