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

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

Issue 1660383002: Refactoring: Move some classes from content/child to platform (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add PLATFORM_EXPORT; Address haraken's review 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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 // Record to a RAPPOR privacy-preserving metric, see: https://www.chromium.o rg/developers/design-documents/rappor. 407 // Record to a RAPPOR privacy-preserving metric, see: https://www.chromium.o rg/developers/design-documents/rappor.
408 // recordRappor records a sample string, while recordRapporURL records the d omain and registry of a url. 408 // recordRappor records a sample string, while recordRapporURL records the d omain and registry of a url.
409 virtual void recordRappor(const char* metric, const WebString& sample) { } 409 virtual void recordRappor(const char* metric, const WebString& sample) { }
410 virtual void recordRapporURL(const char* metric, const blink::WebURL& url) { } 410 virtual void recordRapporURL(const char* metric, const blink::WebURL& url) { }
411 411
412 // Registers a memory dump provider. The WebMemoryDumpProvider::onMemoryDump 412 // Registers a memory dump provider. The WebMemoryDumpProvider::onMemoryDump
413 // method will be called on the same thread that called the 413 // method will be called on the same thread that called the
414 // registerMemoryDumpProvider() method. |name| is used for debugging 414 // registerMemoryDumpProvider() method. |name| is used for debugging
415 // (duplicates are allowed) and must be a long-lived C string. 415 // (duplicates are allowed) and must be a long-lived C string.
416 // See crbug.com/458295 for design docs. 416 // See crbug.com/458295 for design docs.
417 virtual void registerMemoryDumpProvider(blink::WebMemoryDumpProvider*, const char* name) { } 417 BLINK_PLATFORM_EXPORT virtual void registerMemoryDumpProvider(blink::WebMemo ryDumpProvider*, const char* name);
418 418
419 // Must be called on the thread that called registerMemoryDumpProvider(). 419 // Must be called on the thread that called registerMemoryDumpProvider().
420 virtual void unregisterMemoryDumpProvider(blink::WebMemoryDumpProvider*) { } 420 BLINK_PLATFORM_EXPORT virtual void unregisterMemoryDumpProvider(blink::WebMe moryDumpProvider*);
421 421
422 class TraceLogEnabledStateObserver { 422 class TraceLogEnabledStateObserver {
423 public: 423 public:
424 virtual ~TraceLogEnabledStateObserver() = default; 424 virtual ~TraceLogEnabledStateObserver() = default;
425 virtual void onTraceLogEnabled() = 0; 425 virtual void onTraceLogEnabled() = 0;
426 virtual void onTraceLogDisabled() = 0; 426 virtual void onTraceLogDisabled() = 0;
427 }; 427 };
428 428
429 // Register or unregister a trace log state observer. Does not take ownershi p. 429 // Register or unregister a trace log state observer. Does not take ownershi p.
430 virtual void addTraceLogEnabledStateObserver(TraceLogEnabledStateObserver*) {} 430 virtual void addTraceLogEnabledStateObserver(TraceLogEnabledStateObserver*) {}
431 virtual void removeTraceLogEnabledStateObserver(TraceLogEnabledStateObserver *) {} 431 virtual void removeTraceLogEnabledStateObserver(TraceLogEnabledStateObserver *) {}
432 432
433 // Returns a newly allocated WebProcessMemoryDump instance.
434 virtual blink::WebProcessMemoryDump* createProcessMemoryDump() { return null ptr; }
435
436 typedef uint64_t WebMemoryAllocatorDumpGuid; 433 typedef uint64_t WebMemoryAllocatorDumpGuid;
437 434
438 // Returns guid corresponding to the given string (the hash value) for 435 // Returns guid corresponding to the given string (the hash value) for
439 // creating a WebMemoryAllocatorDump. 436 // creating a WebMemoryAllocatorDump.
440 virtual WebMemoryAllocatorDumpGuid createWebMemoryAllocatorDumpGuid(const We bString& guidStr) { return 0; } 437 virtual WebMemoryAllocatorDumpGuid createWebMemoryAllocatorDumpGuid(const We bString& guidStr) { return 0; }
441 438
442 // GPU ---------------------------------------------------------------- 439 // GPU ----------------------------------------------------------------
443 // 440 //
444 // May return null if GPU is not supported. 441 // May return null if GPU is not supported.
445 // Returns newly allocated and initialized offscreen WebGraphicsContext3D in stance. 442 // Returns newly allocated and initialized offscreen WebGraphicsContext3D in stance.
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 protected: 593 protected:
597 BLINK_PLATFORM_EXPORT Platform(); 594 BLINK_PLATFORM_EXPORT Platform();
598 virtual ~Platform() { } 595 virtual ~Platform() { }
599 596
600 WebThread* m_mainThread; 597 WebThread* m_mainThread;
601 }; 598 };
602 599
603 } // namespace blink 600 } // namespace blink
604 601
605 #endif 602 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698