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

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

Issue 2588403002: TestingPlatformSupport: register Platform instance correctly (Closed)
Patch Set: new plan 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
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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 #else 132 #else
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. Since this method
143 // calls virtual methods internally, you should not call with self instance
144 // inside a Platform subclass's constructor.
haraken 2017/01/12 11:21:01 // you should not pass in a Platform object that i
Takashi Toyoshima 2017/01/12 12:13:02 Done.
143 static void setCurrentPlatformForTesting(Platform*); 145 static void setCurrentPlatformForTesting(Platform*);
144 146
145 // May return null. 147 // May return null.
146 virtual WebCookieJar* cookieJar() { return nullptr; } 148 virtual WebCookieJar* cookieJar() { return nullptr; }
147 149
148 // Must return non-null. 150 // Must return non-null.
149 virtual WebClipboard* clipboard() { return nullptr; } 151 virtual WebClipboard* clipboard() { return nullptr; }
150 152
151 // Must return non-null. 153 // Must return non-null.
152 virtual WebFileUtilities* fileUtilities() { return nullptr; } 154 virtual WebFileUtilities* fileUtilities() { return nullptr; }
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 protected: 679 protected:
678 Platform(); 680 Platform();
679 virtual ~Platform() {} 681 virtual ~Platform() {}
680 682
681 WebThread* m_mainThread; 683 WebThread* m_mainThread;
682 }; 684 };
683 685
684 } // namespace blink 686 } // namespace blink
685 687
686 #endif 688 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698