| 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 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 // Record to a RAPPOR privacy-preserving metric, see: https://www.chromium.o
rg/developers/design-documents/rappor. | 415 // Record to a RAPPOR privacy-preserving metric, see: https://www.chromium.o
rg/developers/design-documents/rappor. |
| 416 // recordRappor records a sample string, while recordRapporURL records the d
omain and registry of a url. | 416 // recordRappor records a sample string, while recordRapporURL records the d
omain and registry of a url. |
| 417 virtual void recordRappor(const char* metric, const WebString& sample) { } | 417 virtual void recordRappor(const char* metric, const WebString& sample) { } |
| 418 virtual void recordRapporURL(const char* metric, const blink::WebURL& url) {
} | 418 virtual void recordRapporURL(const char* metric, const blink::WebURL& url) {
} |
| 419 | 419 |
| 420 // Registers a memory dump provider. The WebMemoryDumpProvider::onMemoryDump | 420 // Registers a memory dump provider. The WebMemoryDumpProvider::onMemoryDump |
| 421 // method will be called on the same thread that called the | 421 // method will be called on the same thread that called the |
| 422 // registerMemoryDumpProvider() method. |name| is used for debugging | 422 // registerMemoryDumpProvider() method. |name| is used for debugging |
| 423 // (duplicates are allowed) and must be a long-lived C string. | 423 // (duplicates are allowed) and must be a long-lived C string. |
| 424 // See crbug.com/458295 for design docs. | 424 // See crbug.com/458295 for design docs. |
| 425 virtual void registerMemoryDumpProvider(blink::WebMemoryDumpProvider*, const
char* name) { } | 425 BLINK_PLATFORM_EXPORT virtual void registerMemoryDumpProvider(blink::WebMemo
ryDumpProvider*, const char* name); |
| 426 | 426 |
| 427 // Must be called on the thread that called registerMemoryDumpProvider(). | 427 // Must be called on the thread that called registerMemoryDumpProvider(). |
| 428 virtual void unregisterMemoryDumpProvider(blink::WebMemoryDumpProvider*) { } | 428 BLINK_PLATFORM_EXPORT virtual void unregisterMemoryDumpProvider(blink::WebMe
moryDumpProvider*); |
| 429 | 429 |
| 430 class TraceLogEnabledStateObserver { | 430 class TraceLogEnabledStateObserver { |
| 431 public: | 431 public: |
| 432 virtual ~TraceLogEnabledStateObserver() = default; | 432 virtual ~TraceLogEnabledStateObserver() = default; |
| 433 virtual void onTraceLogEnabled() = 0; | 433 virtual void onTraceLogEnabled() = 0; |
| 434 virtual void onTraceLogDisabled() = 0; | 434 virtual void onTraceLogDisabled() = 0; |
| 435 }; | 435 }; |
| 436 | 436 |
| 437 // Register or unregister a trace log state observer. Does not take ownershi
p. | 437 // Register or unregister a trace log state observer. Does not take ownershi
p. |
| 438 virtual void addTraceLogEnabledStateObserver(TraceLogEnabledStateObserver*)
{} | 438 virtual void addTraceLogEnabledStateObserver(TraceLogEnabledStateObserver*)
{} |
| 439 virtual void removeTraceLogEnabledStateObserver(TraceLogEnabledStateObserver
*) {} | 439 virtual void removeTraceLogEnabledStateObserver(TraceLogEnabledStateObserver
*) {} |
| 440 | 440 |
| 441 // Returns a newly allocated WebProcessMemoryDump instance. | |
| 442 virtual blink::WebProcessMemoryDump* createProcessMemoryDump() { return null
ptr; } | |
| 443 | |
| 444 typedef uint64_t WebMemoryAllocatorDumpGuid; | 441 typedef uint64_t WebMemoryAllocatorDumpGuid; |
| 445 | 442 |
| 446 // Returns guid corresponding to the given string (the hash value) for | 443 // Returns guid corresponding to the given string (the hash value) for |
| 447 // creating a WebMemoryAllocatorDump. | 444 // creating a WebMemoryAllocatorDump. |
| 448 virtual WebMemoryAllocatorDumpGuid createWebMemoryAllocatorDumpGuid(const We
bString& guidStr) { return 0; } | 445 virtual WebMemoryAllocatorDumpGuid createWebMemoryAllocatorDumpGuid(const We
bString& guidStr) { return 0; } |
| 449 | 446 |
| 450 // GPU ---------------------------------------------------------------- | 447 // GPU ---------------------------------------------------------------- |
| 451 // | 448 // |
| 452 // May return null if GPU is not supported. | 449 // May return null if GPU is not supported. |
| 453 // Returns newly allocated and initialized offscreen WebGraphicsContext3D in
stance. | 450 // Returns newly allocated and initialized offscreen WebGraphicsContext3D in
stance. |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 604 protected: | 601 protected: |
| 605 BLINK_PLATFORM_EXPORT Platform(); | 602 BLINK_PLATFORM_EXPORT Platform(); |
| 606 virtual ~Platform() { } | 603 virtual ~Platform() { } |
| 607 | 604 |
| 608 WebThread* m_mainThread; | 605 WebThread* m_mainThread; |
| 609 }; | 606 }; |
| 610 | 607 |
| 611 } // namespace blink | 608 } // namespace blink |
| 612 | 609 |
| 613 #endif | 610 #endif |
| OLD | NEW |