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

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

Issue 1780083002: Introduce Platform::setCurrentPlatformForTesting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « third_party/WebKit/Source/platform/testing/TestingPlatformSupport.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 #ifdef WIN32 131 #ifdef WIN32
132 typedef HANDLE FileHandle; 132 typedef HANDLE FileHandle;
133 #else 133 #else
134 typedef int FileHandle; 134 typedef int FileHandle;
135 #endif 135 #endif
136 136
137 static void initialize(Platform*); 137 static void initialize(Platform*);
138 static void shutdown(); 138 static void shutdown();
139 static Platform* current(); 139 static Platform* current();
140 140
141 // Used to switch the current platform only for testing.
142 static void setCurrentPlatformForTesting(Platform*);
143
141 // May return null. 144 // May return null.
142 virtual WebCookieJar* cookieJar() { return nullptr; } 145 virtual WebCookieJar* cookieJar() { return nullptr; }
143 146
144 // Must return non-null. 147 // Must return non-null.
145 virtual WebClipboard* clipboard() { return nullptr; } 148 virtual WebClipboard* clipboard() { return nullptr; }
146 149
147 // Must return non-null. 150 // Must return non-null.
148 virtual WebFileUtilities* fileUtilities() { return nullptr; } 151 virtual WebFileUtilities* fileUtilities() { return nullptr; }
149 152
150 // Must return non-null. 153 // Must return non-null.
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 protected: 615 protected:
613 Platform(); 616 Platform();
614 virtual ~Platform() { } 617 virtual ~Platform() { }
615 618
616 WebThread* m_mainThread; 619 WebThread* m_mainThread;
617 }; 620 };
618 621
619 } // namespace blink 622 } // namespace blink
620 623
621 #endif 624 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/testing/TestingPlatformSupport.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698