OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "webkit/support/webkit_support.h" | 5 #include "webkit/support/webkit_support.h" |
6 | 6 |
| 7 #include "app/gfx/gl/gl_context.h" |
7 #include "app/gfx/gl/gl_implementation.h" | 8 #include "app/gfx/gl/gl_implementation.h" |
8 #include "base/at_exit.h" | 9 #include "base/at_exit.h" |
9 #include "base/base64.h" | 10 #include "base/base64.h" |
10 #include "base/command_line.h" | 11 #include "base/command_line.h" |
11 #include "base/debug/debugger.h" | 12 #include "base/debug/debugger.h" |
12 #include "base/file_path.h" | 13 #include "base/file_path.h" |
13 #include "base/file_util.h" | 14 #include "base/file_util.h" |
14 #include "base/i18n/icu_util.h" | 15 #include "base/i18n/icu_util.h" |
15 #include "base/logging.h" | 16 #include "base/logging.h" |
16 #include "base/message_loop.h" | 17 #include "base/message_loop.h" |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 WebKit::WebApplicationCacheHost* CreateApplicationCacheHost( | 283 WebKit::WebApplicationCacheHost* CreateApplicationCacheHost( |
283 WebFrame*, WebKit::WebApplicationCacheHostClient* client) { | 284 WebFrame*, WebKit::WebApplicationCacheHostClient* client) { |
284 return SimpleAppCacheSystem::CreateApplicationCacheHost(client); | 285 return SimpleAppCacheSystem::CreateApplicationCacheHost(client); |
285 } | 286 } |
286 | 287 |
287 WebKit::WebString GetWebKitRootDir() { | 288 WebKit::WebString GetWebKitRootDir() { |
288 FilePath path = GetWebKitRootDirFilePath(); | 289 FilePath path = GetWebKitRootDirFilePath(); |
289 return WebKit::WebString::fromUTF8(WideToUTF8(path.ToWStringHack()).c_str()); | 290 return WebKit::WebString::fromUTF8(WideToUTF8(path.ToWStringHack()).c_str()); |
290 } | 291 } |
291 | 292 |
| 293 void SetUpGLBindings(GLBindingPreferences bindingPref) { |
| 294 switch(bindingPref) { |
| 295 case GL_BINDING_DEFAULT: |
| 296 gfx::GLContext::InitializeOneOff(); |
| 297 break; |
| 298 case GL_BINDING_SOFTWARE_RENDERER: |
| 299 gfx::InitializeGLBindings(gfx::kGLImplementationOSMesaGL); |
| 300 break; |
| 301 default: |
| 302 NOTREACHED(); |
| 303 } |
| 304 } |
| 305 |
292 void RegisterMockedURL(const WebKit::WebURL& url, | 306 void RegisterMockedURL(const WebKit::WebURL& url, |
293 const WebKit::WebURLResponse& response, | 307 const WebKit::WebURLResponse& response, |
294 const WebKit::WebString& file_path) { | 308 const WebKit::WebString& file_path) { |
295 test_environment->webkit_client()->url_loader_factory()-> | 309 test_environment->webkit_client()->url_loader_factory()-> |
296 RegisterURL(url, response, file_path); | 310 RegisterURL(url, response, file_path); |
297 } | 311 } |
298 | 312 |
299 void UnregisterMockedURL(const WebKit::WebURL& url) { | 313 void UnregisterMockedURL(const WebKit::WebURL& url) { |
300 test_environment->webkit_client()->url_loader_factory()->UnregisterURL(url); | 314 test_environment->webkit_client()->url_loader_factory()->UnregisterURL(url); |
301 } | 315 } |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 | 538 |
525 // FileSystem | 539 // FileSystem |
526 void OpenFileSystem(WebFrame* frame, WebFileSystem::Type type, | 540 void OpenFileSystem(WebFrame* frame, WebFileSystem::Type type, |
527 long long size, bool create, WebFileSystemCallbacks* callbacks) { | 541 long long size, bool create, WebFileSystemCallbacks* callbacks) { |
528 SimpleFileSystem* fileSystem = static_cast<SimpleFileSystem*>( | 542 SimpleFileSystem* fileSystem = static_cast<SimpleFileSystem*>( |
529 test_environment->webkit_client()->fileSystem()); | 543 test_environment->webkit_client()->fileSystem()); |
530 fileSystem->OpenFileSystem(frame, type, size, create, callbacks); | 544 fileSystem->OpenFileSystem(frame, type, size, create, callbacks); |
531 } | 545 } |
532 | 546 |
533 } // namespace webkit_support | 547 } // namespace webkit_support |
OLD | NEW |