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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
134 typedef HANDLE FileHandle; | 134 typedef HANDLE FileHandle; |
135 #else | 135 #else |
136 typedef int FileHandle; | 136 typedef int FileHandle; |
137 #endif | 137 #endif |
138 | 138 |
139 // Initialize platform and wtf. If you need to initialize the entire Blink, | 139 // Initialize platform and wtf. If you need to initialize the entire Blink, |
140 // you should use blink::initialize. | 140 // you should use blink::initialize. |
141 static void initialize(Platform*); | 141 static void initialize(Platform*); |
142 static void shutdown(); | 142 static void shutdown(); |
143 static Platform* current(); | 143 static Platform* current(); |
144 // Used to get whether message loop is ready for current thread, to help | |
145 // blink::initialize() determining whether can initialize mojo stuff or not. | |
haraken
2016/10/27 16:13:15
Add a TODO to remove this public API by ensuring a
leonhsl(Using Gerrit)
2016/10/28 05:59:06
Done.
| |
146 static bool isMessageLoopReady(); | |
144 | 147 |
145 // Used to switch the current platform only for testing. | 148 // Used to switch the current platform only for testing. |
146 static void setCurrentPlatformForTesting(Platform*); | 149 static void setCurrentPlatformForTesting(Platform*); |
147 | 150 |
148 // May return null. | 151 // May return null. |
149 virtual WebCookieJar* cookieJar() { return nullptr; } | 152 virtual WebCookieJar* cookieJar() { return nullptr; } |
150 | 153 |
151 // Must return non-null. | 154 // Must return non-null. |
152 virtual WebClipboard* clipboard() { return nullptr; } | 155 virtual WebClipboard* clipboard() { return nullptr; } |
153 | 156 |
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
679 protected: | 682 protected: |
680 Platform(); | 683 Platform(); |
681 virtual ~Platform() {} | 684 virtual ~Platform() {} |
682 | 685 |
683 WebThread* m_mainThread; | 686 WebThread* m_mainThread; |
684 }; | 687 }; |
685 | 688 |
686 } // namespace blink | 689 } // namespace blink |
687 | 690 |
688 #endif | 691 #endif |
OLD | NEW |