| 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 "base/at_exit.h" | 7 #include "base/at_exit.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/debug_util.h" | 9 #include "base/debug_util.h" |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 return test_environment->webkit_client(); | 169 return test_environment->webkit_client(); |
| 170 } | 170 } |
| 171 | 171 |
| 172 WebPlugin* CreateWebPlugin(WebFrame* frame, | 172 WebPlugin* CreateWebPlugin(WebFrame* frame, |
| 173 const WebPluginParams& params) { | 173 const WebPluginParams& params) { |
| 174 const bool kAllowWildcard = true; | 174 const bool kAllowWildcard = true; |
| 175 WebPluginInfo info; | 175 WebPluginInfo info; |
| 176 std::string actual_mime_type; | 176 std::string actual_mime_type; |
| 177 if (!NPAPI::PluginList::Singleton()->GetPluginInfo( | 177 if (!NPAPI::PluginList::Singleton()->GetPluginInfo( |
| 178 params.url, params.mimeType.utf8(), kAllowWildcard, &info, | 178 params.url, params.mimeType.utf8(), kAllowWildcard, &info, |
| 179 &actual_mime_type)) { | 179 &actual_mime_type) || !info.enabled) { |
| 180 return NULL; | 180 return NULL; |
| 181 } | 181 } |
| 182 | 182 |
| 183 if (actual_mime_type.empty()) | 183 if (actual_mime_type.empty()) |
| 184 actual_mime_type = params.mimeType.utf8(); | 184 actual_mime_type = params.mimeType.utf8(); |
| 185 | 185 |
| 186 return new WebPluginImplWithPageDelegate( | 186 return new WebPluginImplWithPageDelegate( |
| 187 frame, params, info.path, actual_mime_type); | 187 frame, params, info.path, actual_mime_type); |
| 188 } | 188 } |
| 189 | 189 |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 FilePath dirExe; | 396 FilePath dirExe; |
| 397 if (!webkit_glue::GetExeDirectory(&dirExe)) { | 397 if (!webkit_glue::GetExeDirectory(&dirExe)) { |
| 398 DCHECK(false); | 398 DCHECK(false); |
| 399 return WebURL(); | 399 return WebURL(); |
| 400 } | 400 } |
| 401 FilePath devToolsPath = dirExe.AppendASCII("resources/inspector/devtools.html"
); | 401 FilePath devToolsPath = dirExe.AppendASCII("resources/inspector/devtools.html"
); |
| 402 return net::FilePathToFileURL(devToolsPath); | 402 return net::FilePathToFileURL(devToolsPath); |
| 403 } | 403 } |
| 404 | 404 |
| 405 } // namespace webkit_support | 405 } // namespace webkit_support |
| OLD | NEW |