| 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 // Call when spawning a new thread. |
| 143 static void initializeThread(); |
| 144 |
| 142 // Used to switch the current platform only for testing. | 145 // Used to switch the current platform only for testing. |
| 143 // You should not pass in a Platform object that is not fully instantiated. | 146 // You should not pass in a Platform object that is not fully instantiated. |
| 144 static void setCurrentPlatformForTesting(Platform*); | 147 static void setCurrentPlatformForTesting(Platform*); |
| 145 | 148 |
| 146 // May return null. | 149 // May return null. |
| 147 virtual WebCookieJar* cookieJar() { return nullptr; } | 150 virtual WebCookieJar* cookieJar() { return nullptr; } |
| 148 | 151 |
| 149 // Must return non-null. | 152 // Must return non-null. |
| 150 virtual WebClipboard* clipboard() { return nullptr; } | 153 virtual WebClipboard* clipboard() { return nullptr; } |
| 151 | 154 |
| (...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 672 protected: | 675 protected: |
| 673 Platform(); | 676 Platform(); |
| 674 virtual ~Platform() {} | 677 virtual ~Platform() {} |
| 675 | 678 |
| 676 WebThread* m_mainThread; | 679 WebThread* m_mainThread; |
| 677 }; | 680 }; |
| 678 | 681 |
| 679 } // namespace blink | 682 } // namespace blink |
| 680 | 683 |
| 681 #endif | 684 #endif |
| OLD | NEW |