| 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 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 // be on a single line for extract_actions.py to find it. Please see | 417 // be on a single line for extract_actions.py to find it. Please see |
| 418 // that script for more details. Intended use is: | 418 // that script for more details. Intended use is: |
| 419 // recordAction(UserMetricsAction("MyAction")) | 419 // recordAction(UserMetricsAction("MyAction")) |
| 420 virtual void recordAction(const UserMetricsAction&) { } | 420 virtual void recordAction(const UserMetricsAction&) { } |
| 421 | 421 |
| 422 // Registers a memory dump provider. The WebMemoryDumpProvider::onMemoryDump | 422 // Registers a memory dump provider. The WebMemoryDumpProvider::onMemoryDump |
| 423 // method will be called on the same thread that called the | 423 // method will be called on the same thread that called the |
| 424 // registerMemoryDumpProvider() method. |name| is used for debugging | 424 // registerMemoryDumpProvider() method. |name| is used for debugging |
| 425 // (duplicates are allowed) and must be a long-lived C string. | 425 // (duplicates are allowed) and must be a long-lived C string. |
| 426 // See crbug.com/458295 for design docs. | 426 // See crbug.com/458295 for design docs. |
| 427 BLINK_PLATFORM_EXPORT virtual void registerMemoryDumpProvider(blink::WebMemo
ryDumpProvider*, const char* name); | 427 virtual void registerMemoryDumpProvider(blink::WebMemoryDumpProvider*, const
char* name) { } |
| 428 | 428 |
| 429 // Must be called on the thread that called registerMemoryDumpProvider(). | 429 // Must be called on the thread that called registerMemoryDumpProvider(). |
| 430 BLINK_PLATFORM_EXPORT virtual void unregisterMemoryDumpProvider(blink::WebMe
moryDumpProvider*); | 430 virtual void unregisterMemoryDumpProvider(blink::WebMemoryDumpProvider*) { } |
| 431 | 431 |
| 432 class TraceLogEnabledStateObserver { | 432 class TraceLogEnabledStateObserver { |
| 433 public: | 433 public: |
| 434 virtual ~TraceLogEnabledStateObserver() = default; | 434 virtual ~TraceLogEnabledStateObserver() = default; |
| 435 virtual void onTraceLogEnabled() = 0; | 435 virtual void onTraceLogEnabled() = 0; |
| 436 virtual void onTraceLogDisabled() = 0; | 436 virtual void onTraceLogDisabled() = 0; |
| 437 }; | 437 }; |
| 438 | 438 |
| 439 // Register or unregister a trace log state observer. Does not take ownershi
p. | 439 // Register or unregister a trace log state observer. Does not take ownershi
p. |
| 440 virtual void addTraceLogEnabledStateObserver(TraceLogEnabledStateObserver*)
{} | 440 virtual void addTraceLogEnabledStateObserver(TraceLogEnabledStateObserver*)
{} |
| 441 virtual void removeTraceLogEnabledStateObserver(TraceLogEnabledStateObserver
*) {} | 441 virtual void removeTraceLogEnabledStateObserver(TraceLogEnabledStateObserver
*) {} |
| 442 | 442 |
| 443 // Returns a newly allocated WebProcessMemoryDump instance. |
| 444 virtual blink::WebProcessMemoryDump* createProcessMemoryDump() { return null
ptr; } |
| 445 |
| 443 typedef uint64_t WebMemoryAllocatorDumpGuid; | 446 typedef uint64_t WebMemoryAllocatorDumpGuid; |
| 444 | 447 |
| 445 // Returns guid corresponding to the given string (the hash value) for | 448 // Returns guid corresponding to the given string (the hash value) for |
| 446 // creating a WebMemoryAllocatorDump. | 449 // creating a WebMemoryAllocatorDump. |
| 447 virtual WebMemoryAllocatorDumpGuid createWebMemoryAllocatorDumpGuid(const We
bString& guidStr) { return 0; } | 450 virtual WebMemoryAllocatorDumpGuid createWebMemoryAllocatorDumpGuid(const We
bString& guidStr) { return 0; } |
| 448 | 451 |
| 449 // GPU ---------------------------------------------------------------- | 452 // GPU ---------------------------------------------------------------- |
| 450 // | 453 // |
| 451 // May return null if GPU is not supported. | 454 // May return null if GPU is not supported. |
| 452 // Returns newly allocated and initialized offscreen WebGraphicsContext3D in
stance. | 455 // Returns newly allocated and initialized offscreen WebGraphicsContext3D in
stance. |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 611 protected: | 614 protected: |
| 612 BLINK_PLATFORM_EXPORT Platform(); | 615 BLINK_PLATFORM_EXPORT Platform(); |
| 613 virtual ~Platform() { } | 616 virtual ~Platform() { } |
| 614 | 617 |
| 615 WebThread* m_mainThread; | 618 WebThread* m_mainThread; |
| 616 }; | 619 }; |
| 617 | 620 |
| 618 } // namespace blink | 621 } // namespace blink |
| 619 | 622 |
| 620 #endif | 623 #endif |
| OLD | NEW |