OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 class WebScriptController { | 44 class WebScriptController { |
45 public: | 45 public: |
46 // Registers a v8 extension to be available on webpages. The three forms | 46 // Registers a v8 extension to be available on webpages. The three forms |
47 // offer various restrictions on what types of contexts the extension is | 47 // offer various restrictions on what types of contexts the extension is |
48 // loaded into. If a scheme is provided, only pages whose URL has the given | 48 // loaded into. If a scheme is provided, only pages whose URL has the given |
49 // scheme will match. If extensionGroup is provided, the extension will only | 49 // scheme will match. If extensionGroup is provided, the extension will only |
50 // be loaded into scripts run via WebFrame::ExecuteInNewWorld with the | 50 // be loaded into scripts run via WebFrame::ExecuteInNewWorld with the |
51 // matching group. | 51 // matching group. |
52 // Will only affect v8 contexts initialized after this call. Takes ownership | 52 // Will only affect v8 contexts initialized after this call. Takes ownership |
53 // of the v8::Extension object passed. | 53 // of the v8::Extension object passed. |
| 54 // FIXME: remove the latter 2 versions in phase 3 of multipart checkin: |
| 55 // https://bugs.webkit.org/show_bug.cgi?id=45721 |
54 WEBKIT_API static void registerExtension(v8::Extension*); | 56 WEBKIT_API static void registerExtension(v8::Extension*); |
55 WEBKIT_API static void registerExtension(v8::Extension*, | 57 WEBKIT_API static void registerExtension(v8::Extension*, |
56 const WebString& schemeRestriction)
; | 58 const WebString& schemeRestriction)
; |
57 WEBKIT_API static void registerExtension(v8::Extension*, int extensionGroup)
; | 59 WEBKIT_API static void registerExtension(v8::Extension*, int extensionGroup)
; |
58 | 60 |
59 // Enables special settings which are only applicable if V8 is executed | 61 // Enables special settings which are only applicable if V8 is executed |
60 // in the single thread which must be the main thread. | 62 // in the single thread which must be the main thread. |
61 // FIXME: make a try to dynamically detect when this condition is broken | 63 // FIXME: make a try to dynamically detect when this condition is broken |
62 // and automatically switch off single thread mode. | 64 // and automatically switch off single thread mode. |
63 WEBKIT_API static void enableV8SingleThreadMode(); | 65 WEBKIT_API static void enableV8SingleThreadMode(); |
64 | 66 |
65 // Process any pending JavaScript console messages. | 67 // Process any pending JavaScript console messages. |
66 WEBKIT_API static void flushConsoleMessages(); | 68 WEBKIT_API static void flushConsoleMessages(); |
67 | 69 |
68 private: | 70 private: |
69 WebScriptController(); | 71 WebScriptController(); |
70 }; | 72 }; |
71 | 73 |
72 } // namespace WebKit | 74 } // namespace WebKit |
73 | 75 |
74 #endif | 76 #endif |
OLD | NEW |