Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(90)

Side by Side Diff: webkit/support/webkit_support.cc

Issue 7497030: PluginList cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix crash Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/plugins/npapi/plugin_list_unittest.cc ('k') | webkit/support/webkit_support_glue.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/base64.h" 8 #include "base/base64.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/debugger.h" 10 #include "base/debug/debugger.h"
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 } 274 }
275 275
276 WebKit::WebKitClient* GetWebKitClient() { 276 WebKit::WebKitClient* GetWebKitClient() {
277 DCHECK(test_environment); 277 DCHECK(test_environment);
278 return test_environment->webkit_client(); 278 return test_environment->webkit_client();
279 } 279 }
280 280
281 WebPlugin* CreateWebPlugin(WebFrame* frame, 281 WebPlugin* CreateWebPlugin(WebFrame* frame,
282 const WebPluginParams& params) { 282 const WebPluginParams& params) {
283 const bool kAllowWildcard = true; 283 const bool kAllowWildcard = true;
284 webkit::npapi::WebPluginInfo info; 284 std::vector<webkit::npapi::WebPluginInfo> plugins;
285 std::string actual_mime_type; 285 std::vector<std::string> mime_types;
286 if (!webkit::npapi::PluginList::Singleton()->GetPluginInfo( 286 webkit::npapi::PluginList::Singleton()->GetPluginInfoArray(
287 params.url, params.mimeType.utf8(), kAllowWildcard, &info, 287 params.url, params.mimeType.utf8(), kAllowWildcard,
288 &actual_mime_type) || !webkit::npapi::IsPluginEnabled(info)) { 288 NULL, &plugins, &mime_types);
289 if (plugins.empty())
289 return NULL; 290 return NULL;
290 }
291 291
292 return new WebPluginImplWithPageDelegate( 292 return new WebPluginImplWithPageDelegate(
293 frame, params, info.path, actual_mime_type); 293 frame, params, plugins.front().path, mime_types.front());
294 } 294 }
295 295
296 WebKit::WebMediaPlayer* CreateMediaPlayer(WebFrame* frame, 296 WebKit::WebMediaPlayer* CreateMediaPlayer(WebFrame* frame,
297 WebMediaPlayerClient* client) { 297 WebMediaPlayerClient* client) {
298 scoped_ptr<media::MessageLoopFactory> message_loop_factory( 298 scoped_ptr<media::MessageLoopFactory> message_loop_factory(
299 new media::MessageLoopFactoryImpl()); 299 new media::MessageLoopFactoryImpl());
300 300
301 scoped_ptr<media::FilterCollection> collection( 301 scoped_ptr<media::FilterCollection> collection(
302 new media::FilterCollection()); 302 new media::FilterCollection());
303 303
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 test_environment->webkit_client()->fileSystem()); 609 test_environment->webkit_client()->fileSystem());
610 fileSystem->OpenFileSystem(frame, type, size, create, callbacks); 610 fileSystem->OpenFileSystem(frame, type, size, create, callbacks);
611 } 611 }
612 612
613 // Timers 613 // Timers
614 double GetForegroundTabTimerInterval() { 614 double GetForegroundTabTimerInterval() {
615 return webkit_glue::kForegroundTabTimerInterval; 615 return webkit_glue::kForegroundTabTimerInterval;
616 } 616 }
617 617
618 } // namespace webkit_support 618 } // namespace webkit_support
OLDNEW
« no previous file with comments | « webkit/plugins/npapi/plugin_list_unittest.cc ('k') | webkit/support/webkit_support_glue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698