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_implementation.h" | 7 #include "app/gfx/gl/gl_implementation.h" |
8 #include "base/at_exit.h" | 8 #include "base/at_exit.h" |
9 #include "base/base64.h" | 9 #include "base/base64.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 #include "webkit/glue/plugins/webplugin_impl.h" | 41 #include "webkit/glue/plugins/webplugin_impl.h" |
42 #include "webkit/glue/plugins/webplugin_page_delegate.h" | 42 #include "webkit/glue/plugins/webplugin_page_delegate.h" |
43 #include "webkit/glue/plugins/webplugininfo.h" | 43 #include "webkit/glue/plugins/webplugininfo.h" |
44 #include "webkit/glue/webkit_glue.h" | 44 #include "webkit/glue/webkit_glue.h" |
45 #include "webkit/glue/webkitclient_impl.h" | 45 #include "webkit/glue/webkitclient_impl.h" |
46 #include "webkit/glue/webmediaplayer_impl.h" | 46 #include "webkit/glue/webmediaplayer_impl.h" |
47 #include "webkit/support/platform_support.h" | 47 #include "webkit/support/platform_support.h" |
48 #include "webkit/support/test_webplugin_page_delegate.h" | 48 #include "webkit/support/test_webplugin_page_delegate.h" |
49 #include "webkit/support/test_webkit_client.h" | 49 #include "webkit/support/test_webkit_client.h" |
50 #include "webkit/tools/test_shell/simple_database_system.h" | 50 #include "webkit/tools/test_shell/simple_database_system.h" |
| 51 #include "webkit/tools/test_shell/simple_file_system.h" |
51 #include "webkit/tools/test_shell/simple_resource_loader_bridge.h" | 52 #include "webkit/tools/test_shell/simple_resource_loader_bridge.h" |
52 | 53 |
53 using WebKit::WebCString; | 54 using WebKit::WebCString; |
54 using WebKit::WebDevToolsAgentClient; | 55 using WebKit::WebDevToolsAgentClient; |
55 using WebKit::WebFileSystem; | 56 using WebKit::WebFileSystem; |
56 using WebKit::WebFileSystemCallbacks; | 57 using WebKit::WebFileSystemCallbacks; |
57 using WebKit::WebFrame; | 58 using WebKit::WebFrame; |
58 using WebKit::WebMediaPlayerClient; | 59 using WebKit::WebMediaPlayerClient; |
59 using WebKit::WebPlugin; | 60 using WebKit::WebPlugin; |
60 using WebKit::WebPluginParams; | 61 using WebKit::WebPluginParams; |
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
536 if (!webkit_glue::GetExeDirectory(&dirExe)) { | 537 if (!webkit_glue::GetExeDirectory(&dirExe)) { |
537 DCHECK(false); | 538 DCHECK(false); |
538 return WebURL(); | 539 return WebURL(); |
539 } | 540 } |
540 FilePath devToolsPath = dirExe.AppendASCII( | 541 FilePath devToolsPath = dirExe.AppendASCII( |
541 "resources/inspector/devtools.html"); | 542 "resources/inspector/devtools.html"); |
542 return net::FilePathToFileURL(devToolsPath); | 543 return net::FilePathToFileURL(devToolsPath); |
543 } | 544 } |
544 | 545 |
545 // FileSystem | 546 // FileSystem |
546 void OpenFileSystem(WebFrame*, WebFileSystem::Type type, | 547 void OpenFileSystem(WebFrame* frame, WebFileSystem::Type type, |
547 long long, bool, WebFileSystemCallbacks* callbacks) { | 548 long long size, bool create, WebFileSystemCallbacks* callbacks) { |
548 // TODO(kinuko): hook up FileSystemPathManager in a way that the code could | 549 SimpleFileSystem* fileSystem = static_cast<SimpleFileSystem*>( |
549 // be shared with test_shell. | 550 test_environment->webkit_client()->fileSystem()); |
550 if (test_environment->webkit_client()->file_system_root().empty()) { | 551 fileSystem->OpenFileSystem(frame, type, size, create, callbacks); |
551 callbacks->didFail(WebKit::WebFileErrorSecurity); | |
552 } else { | |
553 callbacks->didOpenFileSystem( | |
554 "TestShellFileSystem", | |
555 webkit_glue::FilePathToWebString( | |
556 test_environment->webkit_client()->file_system_root())); | |
557 } | |
558 } | 552 } |
559 | 553 |
560 } // namespace webkit_support | 554 } // namespace webkit_support |
OLD | NEW |