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