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

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

Issue 2588403002: TestingPlatformSupport: register Platform instance correctly (Closed)
Patch Set: review #32 Created 3 years, 11 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/weborigin/OriginAccessEntryTest.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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 typedef int FileHandle; 133 typedef int FileHandle;
134 #endif 134 #endif
135 135
136 // Initialize platform and wtf. If you need to initialize the entire Blink, 136 // Initialize platform and wtf. If you need to initialize the entire Blink,
137 // you should use blink::initialize. 137 // you should use blink::initialize.
138 static void initialize(Platform*); 138 static void initialize(Platform*);
139 static void shutdown(); 139 static void shutdown();
140 static Platform* current(); 140 static Platform* current();
141 141
142 // Used to switch the current platform only for testing. 142 // Used to switch the current platform only for testing.
143 // You should not pass in a Platform object that is not fully instantiated.
143 static void setCurrentPlatformForTesting(Platform*); 144 static void setCurrentPlatformForTesting(Platform*);
144 145
145 // May return null. 146 // May return null.
146 virtual WebCookieJar* cookieJar() { return nullptr; } 147 virtual WebCookieJar* cookieJar() { return nullptr; }
147 148
148 // Must return non-null. 149 // Must return non-null.
149 virtual WebClipboard* clipboard() { return nullptr; } 150 virtual WebClipboard* clipboard() { return nullptr; }
150 151
151 // Must return non-null. 152 // Must return non-null.
152 virtual WebFileUtilities* fileUtilities() { return nullptr; } 153 virtual WebFileUtilities* fileUtilities() { return nullptr; }
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 protected: 678 protected:
678 Platform(); 679 Platform();
679 virtual ~Platform() {} 680 virtual ~Platform() {}
680 681
681 WebThread* m_mainThread; 682 WebThread* m_mainThread;
682 }; 683 };
683 684
684 } // namespace blink 685 } // namespace blink
685 686
686 #endif 687 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/weborigin/OriginAccessEntryTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698