Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(261)

Side by Side Diff: webkit/api/src/WebKit.cpp

Issue 275026: Move scripting / v8 related methods out of WebKit.h, second try (Closed)
Patch Set: rebase Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webkit/api/public/WebScriptController.h ('k') | webkit/api/src/WebScriptController.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 21 matching lines...) Expand all
32 #include "WebKit.h" 32 #include "WebKit.h"
33 33
34 #include "WebMediaPlayerClientImpl.h" 34 #include "WebMediaPlayerClientImpl.h"
35 #include "WebString.h" 35 #include "WebString.h"
36 36
37 #include "AtomicString.h" 37 #include "AtomicString.h"
38 #include "DOMTimer.h" 38 #include "DOMTimer.h"
39 #include "FrameLoader.h" 39 #include "FrameLoader.h"
40 #include "Page.h" 40 #include "Page.h"
41 #include "TextEncoding.h" 41 #include "TextEncoding.h"
42 #include "V8Binding.h"
43 #include "V8Proxy.h"
44 #include "WorkerContextExecutionProxy.h" 42 #include "WorkerContextExecutionProxy.h"
45 #include <wtf/Assertions.h> 43 #include <wtf/Assertions.h>
46 #include <wtf/Threading.h> 44 #include <wtf/Threading.h>
47 45
48 namespace WebKit { 46 namespace WebKit {
49 47
50 static WebKitClient* s_webKitClient = 0; 48 static WebKitClient* s_webKitClient = 0;
51 static bool s_layoutTestMode = false; 49 static bool s_layoutTestMode = false;
52 static bool s_databasesEnabled = false; 50 static bool s_databasesEnabled = false;
53 51
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 void registerURLSchemeAsLocal(const WebString& scheme) 98 void registerURLSchemeAsLocal(const WebString& scheme)
101 { 99 {
102 WebCore::SecurityOrigin::registerURLSchemeAsLocal(scheme); 100 WebCore::SecurityOrigin::registerURLSchemeAsLocal(scheme);
103 } 101 }
104 102
105 void registerURLSchemeAsNoAccess(const WebString& scheme) 103 void registerURLSchemeAsNoAccess(const WebString& scheme)
106 { 104 {
107 WebCore::SecurityOrigin::registerURLSchemeAsNoAccess(scheme); 105 WebCore::SecurityOrigin::registerURLSchemeAsNoAccess(scheme);
108 } 106 }
109 107
110 void registerExtension(v8::Extension* extension)
111 {
112 WebCore::V8Proxy::registerExtension(extension, WebString());
113 }
114
115 void registerExtension(v8::Extension* extension,
116 const WebString& schemeRestriction)
117 {
118 WebCore::V8Proxy::registerExtension(extension, schemeRestriction);
119 }
120
121 void registerExtension(v8::Extension* extension, int extensionGroup)
122 {
123 WebCore::V8Proxy::registerExtension(extension, extensionGroup);
124 }
125
126 void flushConsoleMessages()
127 {
128 WebCore::V8Proxy::processConsoleMessages();
129 }
130
131 void enableMediaPlayer() 108 void enableMediaPlayer()
132 { 109 {
133 #if ENABLE(VIDEO) 110 #if ENABLE(VIDEO)
134 WebMediaPlayerClientImpl::setIsEnabled(true); 111 WebMediaPlayerClientImpl::setIsEnabled(true);
135 #endif 112 #endif
136 } 113 }
137 114
138 void resetPluginCache(bool reloadPages) 115 void resetPluginCache(bool reloadPages)
139 { 116 {
140 WebCore::Page::refreshPlugins(reloadPages); 117 WebCore::Page::refreshPlugins(reloadPages);
141 } 118 }
142 119
143 void enableDatabases() 120 void enableDatabases()
144 { 121 {
145 #if ENABLE(DATABASE) 122 #if ENABLE(DATABASE)
146 s_databasesEnabled = true; 123 s_databasesEnabled = true;
147 #endif 124 #endif
148 } 125 }
149 126
150 bool databasesEnabled() 127 bool databasesEnabled()
151 { 128 {
152 return s_databasesEnabled; 129 return s_databasesEnabled;
153 } 130 }
154 131
155 void enableV8SingleThreadMode()
156 {
157 WebCore::enableStringImplCache();
158 }
159
160 void whiteListAccessFromOrigin(const WebURL& sourceOrigin, 132 void whiteListAccessFromOrigin(const WebURL& sourceOrigin,
161 const WebString& destinationProtocol, 133 const WebString& destinationProtocol,
162 const WebString& destinationHost, 134 const WebString& destinationHost,
163 bool allowDestinationSubdomains) 135 bool allowDestinationSubdomains)
164 { 136 {
165 WebCore::SecurityOrigin::whiteListAccessFromOrigin( 137 WebCore::SecurityOrigin::whiteListAccessFromOrigin(
166 *WebCore::SecurityOrigin::create(sourceOrigin), destinationProtocol, 138 *WebCore::SecurityOrigin::create(sourceOrigin), destinationProtocol,
167 destinationHost, allowDestinationSubdomains); 139 destinationHost, allowDestinationSubdomains);
168 } 140 }
169 141
170 void resetOriginAccessWhiteLists() 142 void resetOriginAccessWhiteLists()
171 { 143 {
172 WebCore::SecurityOrigin::resetOriginAccessWhiteLists(); 144 WebCore::SecurityOrigin::resetOriginAccessWhiteLists();
173 } 145 }
174 146
175 } // namespace WebKit 147 } // namespace WebKit
OLDNEW
« no previous file with comments | « webkit/api/public/WebScriptController.h ('k') | webkit/api/src/WebScriptController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698