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 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 if (!webkit_glue::GetExeDirectory(&dirExe)) { | 536 if (!webkit_glue::GetExeDirectory(&dirExe)) { |
536 DCHECK(false); | 537 DCHECK(false); |
537 return WebURL(); | 538 return WebURL(); |
538 } | 539 } |
539 FilePath devToolsPath = dirExe.AppendASCII( | 540 FilePath devToolsPath = dirExe.AppendASCII( |
540 "resources/inspector/devtools.html"); | 541 "resources/inspector/devtools.html"); |
541 return net::FilePathToFileURL(devToolsPath); | 542 return net::FilePathToFileURL(devToolsPath); |
542 } | 543 } |
543 | 544 |
544 // FileSystem | 545 // FileSystem |
545 void OpenFileSystem(WebFrame*, WebFileSystem::Type type, | 546 void OpenFileSystem(WebFrame* frame, WebFileSystem::Type type, |
546 long long, bool, WebFileSystemCallbacks* callbacks) { | 547 long long size, bool create, WebFileSystemCallbacks* callbacks) { |
547 // TODO(kinuko): hook up FileSystemPathManager in a way that the code could | 548 SimpleFileSystem* fileSystem = static_cast<SimpleFileSystem*>( |
548 // be shared with test_shell. | 549 test_environment->webkit_client()->fileSystem()); |
549 if (test_environment->webkit_client()->file_system_root().empty()) { | 550 fileSystem->OpenFileSystem(frame, type, size, create, callbacks); |
550 callbacks->didFail(WebKit::WebFileErrorSecurity); | |
551 } else { | |
552 callbacks->didOpenFileSystem( | |
553 "TestShellFileSystem", | |
554 webkit_glue::FilePathToWebString( | |
555 test_environment->webkit_client()->file_system_root())); | |
556 } | |
557 } | 551 } |
558 | 552 |
559 } // namespace webkit_support | 553 } // namespace webkit_support |
OLD | NEW |