Chromium Code Reviews

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: kinuko's review Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
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 116 matching lines...)
127 #ifdef WIN32 127 #ifdef WIN32
128 typedef HANDLE FileHandle; 128 typedef HANDLE FileHandle;
129 #else 129 #else
130 typedef int FileHandle; 130 typedef int FileHandle;
131 #endif 131 #endif
132 132
133 BLINK_PLATFORM_EXPORT static void initialize(Platform*); 133 BLINK_PLATFORM_EXPORT static void initialize(Platform*);
134 BLINK_PLATFORM_EXPORT static void shutdown(); 134 BLINK_PLATFORM_EXPORT static void shutdown();
135 BLINK_PLATFORM_EXPORT static Platform* current(); 135 BLINK_PLATFORM_EXPORT static Platform* current();
136 136
137 // Actual implementation of the virtual member function registerMemoryDumpPr ovider.
138 BLINK_PLATFORM_EXPORT static void registerMemoryDumpProviderImpl(blink::WebM emoryDumpProvider*, const char* name);
139
140 // Actual implementation of the virtual member function unregisterMemoryDump Provider.
141 BLINK_PLATFORM_EXPORT static void unregisterMemoryDumpProviderImpl(blink::We bMemoryDumpProvider*);
kinuko 2016/02/10 01:33:22 We have number of methods that can be actually imp
hajimehoshi 2016/02/15 09:27:08 Done.
142
137 // May return null. 143 // May return null.
138 virtual WebCookieJar* cookieJar() { return nullptr; } 144 virtual WebCookieJar* cookieJar() { return nullptr; }
139 145
140 // Must return non-null. 146 // Must return non-null.
141 virtual WebClipboard* clipboard() { return nullptr; } 147 virtual WebClipboard* clipboard() { return nullptr; }
142 148
143 // Must return non-null. 149 // Must return non-null.
144 virtual WebFileUtilities* fileUtilities() { return nullptr; } 150 virtual WebFileUtilities* fileUtilities() { return nullptr; }
145 151
146 // Must return non-null. 152 // Must return non-null.
(...skipping 320 matching lines...)
467 public: 473 public:
468 virtual ~TraceLogEnabledStateObserver() = default; 474 virtual ~TraceLogEnabledStateObserver() = default;
469 virtual void onTraceLogEnabled() = 0; 475 virtual void onTraceLogEnabled() = 0;
470 virtual void onTraceLogDisabled() = 0; 476 virtual void onTraceLogDisabled() = 0;
471 }; 477 };
472 478
473 // Register or unregister a trace log state observer. Does not take ownershi p. 479 // Register or unregister a trace log state observer. Does not take ownershi p.
474 virtual void addTraceLogEnabledStateObserver(TraceLogEnabledStateObserver*) {} 480 virtual void addTraceLogEnabledStateObserver(TraceLogEnabledStateObserver*) {}
475 virtual void removeTraceLogEnabledStateObserver(TraceLogEnabledStateObserver *) {} 481 virtual void removeTraceLogEnabledStateObserver(TraceLogEnabledStateObserver *) {}
476 482
477 // Returns a newly allocated WebProcessMemoryDump instance.
478 virtual blink::WebProcessMemoryDump* createProcessMemoryDump() { return null ptr; }
479
480 typedef uint64_t WebMemoryAllocatorDumpGuid; 483 typedef uint64_t WebMemoryAllocatorDumpGuid;
481 484
482 // Returns guid corresponding to the given string (the hash value) for 485 // Returns guid corresponding to the given string (the hash value) for
483 // creating a WebMemoryAllocatorDump. 486 // creating a WebMemoryAllocatorDump.
484 virtual WebMemoryAllocatorDumpGuid createWebMemoryAllocatorDumpGuid(const We bString& guidStr) { return 0; } 487 virtual WebMemoryAllocatorDumpGuid createWebMemoryAllocatorDumpGuid(const We bString& guidStr) { return 0; }
485 488
486 // GPU ---------------------------------------------------------------- 489 // GPU ----------------------------------------------------------------
487 // 490 //
488 // May return null if GPU is not supported. 491 // May return null if GPU is not supported.
489 // Returns newly allocated and initialized offscreen WebGraphicsContext3D in stance. 492 // Returns newly allocated and initialized offscreen WebGraphicsContext3D in stance.
(...skipping 150 matching lines...)
640 protected: 643 protected:
641 BLINK_PLATFORM_EXPORT Platform(); 644 BLINK_PLATFORM_EXPORT Platform();
642 virtual ~Platform() { } 645 virtual ~Platform() { }
643 646
644 WebThread* m_mainThread; 647 WebThread* m_mainThread;
645 }; 648 };
646 649
647 } // namespace blink 650 } // namespace blink
648 651
649 #endif 652 #endif
OLDNEW

Powered by Google App Engine