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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 Loading... | |
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 |
OLD | NEW |