| 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_context.h" |
| 8 #include "app/gfx/gl/gl_implementation.h" | 8 #include "app/gfx/gl/gl_implementation.h" |
| 9 #include "base/at_exit.h" | 9 #include "base/at_exit.h" |
| 10 #include "base/base64.h" | 10 #include "base/base64.h" |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 } | 282 } |
| 283 return result.release(); | 283 return result.release(); |
| 284 } | 284 } |
| 285 | 285 |
| 286 WebKit::WebApplicationCacheHost* CreateApplicationCacheHost( | 286 WebKit::WebApplicationCacheHost* CreateApplicationCacheHost( |
| 287 WebFrame*, WebKit::WebApplicationCacheHostClient* client) { | 287 WebFrame*, WebKit::WebApplicationCacheHostClient* client) { |
| 288 return SimpleAppCacheSystem::CreateApplicationCacheHost(client); | 288 return SimpleAppCacheSystem::CreateApplicationCacheHost(client); |
| 289 } | 289 } |
| 290 | 290 |
| 291 WebKit::WebString GetWebKitRootDir() { | 291 WebKit::WebString GetWebKitRootDir() { |
| 292 FilePath path = GetWebKitRootDirFilePath(); | 292 // In theory you cannot safely convert a path to a string, but this code |
| 293 return WebKit::WebString::fromUTF8(WideToUTF8(path.ToWStringHack()).c_str()); | 293 // is only used by tests. |
| 294 return GetWebKitRootDirFilePath().LossyDisplayName(); |
| 294 } | 295 } |
| 295 | 296 |
| 296 void SetUpGLBindings(GLBindingPreferences bindingPref) { | 297 void SetUpGLBindings(GLBindingPreferences bindingPref) { |
| 297 switch(bindingPref) { | 298 switch(bindingPref) { |
| 298 case GL_BINDING_DEFAULT: | 299 case GL_BINDING_DEFAULT: |
| 299 gfx::GLContext::InitializeOneOff(); | 300 gfx::GLContext::InitializeOneOff(); |
| 300 break; | 301 break; |
| 301 case GL_BINDING_SOFTWARE_RENDERER: | 302 case GL_BINDING_SOFTWARE_RENDERER: |
| 302 gfx::InitializeGLBindings(gfx::kGLImplementationOSMesaGL); | 303 gfx::InitializeGLBindings(gfx::kGLImplementationOSMesaGL); |
| 303 break; | 304 break; |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 542 | 543 |
| 543 // FileSystem | 544 // FileSystem |
| 544 void OpenFileSystem(WebFrame* frame, WebFileSystem::Type type, | 545 void OpenFileSystem(WebFrame* frame, WebFileSystem::Type type, |
| 545 long long size, bool create, WebFileSystemCallbacks* callbacks) { | 546 long long size, bool create, WebFileSystemCallbacks* callbacks) { |
| 546 SimpleFileSystem* fileSystem = static_cast<SimpleFileSystem*>( | 547 SimpleFileSystem* fileSystem = static_cast<SimpleFileSystem*>( |
| 547 test_environment->webkit_client()->fileSystem()); | 548 test_environment->webkit_client()->fileSystem()); |
| 548 fileSystem->OpenFileSystem(frame, type, size, create, callbacks); | 549 fileSystem->OpenFileSystem(frame, type, size, create, callbacks); |
| 549 } | 550 } |
| 550 | 551 |
| 551 } // namespace webkit_support | 552 } // namespace webkit_support |
| OLD | NEW |