OLD | NEW |
---|---|
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 Loading... | |
131 #else | 131 #else |
132 typedef int FileHandle; | 132 typedef int FileHandle; |
133 #endif | 133 #endif |
134 | 134 |
135 // Initialize platform and wtf. If you need to initialize the entire Blink, | 135 // Initialize platform and wtf. If you need to initialize the entire Blink, |
136 // you should use blink::initialize. | 136 // you should use blink::initialize. |
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. | 141 // Used to switch the current platform only for testing. Since this method |
142 // calls virtual methods internally, you should not call with self instance | |
Takashi Toyoshima
2016/12/22 06:29:06
probably worth noting
| |
143 // inside a Platform subclass's constructor. | |
142 static void setCurrentPlatformForTesting(Platform*); | 144 static void setCurrentPlatformForTesting(Platform*); |
143 | 145 |
144 // May return null. | 146 // May return null. |
145 virtual WebCookieJar* cookieJar() { return nullptr; } | 147 virtual WebCookieJar* cookieJar() { return nullptr; } |
146 | 148 |
147 // Must return non-null. | 149 // Must return non-null. |
148 virtual WebClipboard* clipboard() { return nullptr; } | 150 virtual WebClipboard* clipboard() { return nullptr; } |
149 | 151 |
150 // Must return non-null. | 152 // Must return non-null. |
151 virtual WebFileUtilities* fileUtilities() { return nullptr; } | 153 virtual WebFileUtilities* fileUtilities() { return nullptr; } |
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
675 protected: | 677 protected: |
676 Platform(); | 678 Platform(); |
677 virtual ~Platform() {} | 679 virtual ~Platform() {} |
678 | 680 |
679 WebThread* m_mainThread; | 681 WebThread* m_mainThread; |
680 }; | 682 }; |
681 | 683 |
682 } // namespace blink | 684 } // namespace blink |
683 | 685 |
684 #endif | 686 #endif |
OLD | NEW |