| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this |
| 2 // source code is governed by a BSD-style license that can be found in the | 2 // source code is governed by a BSD-style license that can be found in the |
| 3 // LICENSE file. | 3 // LICENSE file. |
| 4 | 4 |
| 5 #include "webkit/glue/webkitclient_impl.h" | 5 #include "webkit/glue/webkitclient_impl.h" |
| 6 | 6 |
| 7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/platform_file.h" | 10 #include "base/platform_file.h" |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 #endif | 101 #endif |
| 102 } | 102 } |
| 103 | 103 |
| 104 WebURLLoader* WebKitClientImpl::createURLLoader() { | 104 WebURLLoader* WebKitClientImpl::createURLLoader() { |
| 105 return new WebURLLoaderImpl(); | 105 return new WebURLLoaderImpl(); |
| 106 } | 106 } |
| 107 | 107 |
| 108 void WebKitClientImpl::getPluginList(bool refresh, | 108 void WebKitClientImpl::getPluginList(bool refresh, |
| 109 WebPluginListBuilder* builder) { | 109 WebPluginListBuilder* builder) { |
| 110 std::vector<WebPluginInfo> plugins; | 110 std::vector<WebPluginInfo> plugins; |
| 111 if (!GetPlugins(refresh, &plugins)) | 111 GetPlugins(refresh, &plugins); |
| 112 return; | |
| 113 | 112 |
| 114 for (size_t i = 0; i < plugins.size(); ++i) { | 113 for (size_t i = 0; i < plugins.size(); ++i) { |
| 115 const WebPluginInfo& plugin = plugins[i]; | 114 const WebPluginInfo& plugin = plugins[i]; |
| 116 | 115 |
| 117 builder->addPlugin( | 116 builder->addPlugin( |
| 118 WideToUTF16Hack(plugin.name), | 117 WideToUTF16Hack(plugin.name), |
| 119 WideToUTF16Hack(plugin.desc), | 118 WideToUTF16Hack(plugin.desc), |
| 120 FilePathStringToWebString(plugin.path.BaseName().value())); | 119 FilePathStringToWebString(plugin.path.BaseName().value())); |
| 121 | 120 |
| 122 for (size_t j = 0; j < plugin.mime_types.size(); ++ j) { | 121 for (size_t j = 0; j < plugin.mime_types.size(); ++ j) { |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 } | 299 } |
| 301 | 300 |
| 302 bool WebKitClientImpl::makeAllDirectories( | 301 bool WebKitClientImpl::makeAllDirectories( |
| 303 const WebKit::WebString& path) { | 302 const WebKit::WebString& path) { |
| 304 DCHECK(!sandboxEnabled()); | 303 DCHECK(!sandboxEnabled()); |
| 305 FilePath::StringType file_path = webkit_glue::WebStringToFilePathString(path); | 304 FilePath::StringType file_path = webkit_glue::WebStringToFilePathString(path); |
| 306 return file_util::CreateDirectory(FilePath(file_path)); | 305 return file_util::CreateDirectory(FilePath(file_path)); |
| 307 } | 306 } |
| 308 | 307 |
| 309 } // namespace webkit_glue | 308 } // namespace webkit_glue |
| OLD | NEW |