Chromium Code Reviews| Index: webkit/support/webkit_support.cc |
| =================================================================== |
| --- webkit/support/webkit_support.cc (revision 116514) |
| +++ webkit/support/webkit_support.cc (working copy) |
| @@ -1,4 +1,4 @@ |
| -// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| @@ -58,6 +58,7 @@ |
| #include "webkit/plugins/webplugininfo.h" |
| #include "webkit/support/platform_support.h" |
| #include "webkit/support/simple_database_system.h" |
| +#include "webkit/support/test_media_stream_client.h" |
|
acolwell GONE FROM CHROMIUM
2012/01/06 18:09:16
nit: If you change CreateMediaPlayer() to take a M
wjia(left Chromium)
2012/01/06 22:18:59
Done.
|
| #include "webkit/support/test_webkit_platform_support.h" |
| #include "webkit/support/test_webplugin_page_delegate.h" |
| #include "webkit/tools/test_shell/simple_file_system.h" |
| @@ -302,8 +303,10 @@ |
| frame, new_params, plugins.front().path); |
| } |
| -WebKit::WebMediaPlayer* CreateMediaPlayer(WebFrame* frame, |
| - WebMediaPlayerClient* client) { |
| +WebKit::WebMediaPlayer* CreateMediaPlayer( |
| + WebFrame* frame, |
| + WebMediaPlayerClient* client, |
| + TestMediaStreamClient* test_media_stream_client) { |
| #if defined(OS_ANDROID) |
| // TODO: Implement the WebMediaPlayer that will be used for Android. |
| return NULL; |
| @@ -320,7 +323,7 @@ |
| base::WeakPtr<webkit_media::WebMediaPlayerDelegate>(), |
| collection.release(), |
| message_loop_factory.release(), |
| - NULL, |
| + test_media_stream_client, |
| new media::MediaLog())); |
| if (!result->Initialize(frame, false)) { |
| return NULL; |
| @@ -329,6 +332,12 @@ |
| #endif |
| } |
| +WebKit::WebMediaPlayer* CreateMediaPlayer( |
| + WebFrame* frame, |
| + WebMediaPlayerClient* client) { |
| + return CreateMediaPlayer(frame, client, NULL); |
| +} |
| + |
| WebKit::WebApplicationCacheHost* CreateApplicationCacheHost( |
| WebFrame*, WebKit::WebApplicationCacheHostClient* client) { |
| return SimpleAppCacheSystem::CreateApplicationCacheHost(client); |
| @@ -342,7 +351,7 @@ |
| } |
| void SetUpGLBindings(GLBindingPreferences bindingPref) { |
| - switch(bindingPref) { |
| + switch (bindingPref) { |
| case GL_BINDING_DEFAULT: |
| gfx::GLSurface::InitializeOneOff(); |
| break; |
| @@ -512,16 +521,16 @@ |
| // by webkit layout tests. |
| class ScopedTempDirectoryInternal : public ScopedTempDirectory { |
| public: |
| - virtual bool CreateUniqueTempDir() { |
| - return tempDirectory_.CreateUniqueTempDir(); |
| - } |
| + virtual bool CreateUniqueTempDir() { |
| + return tempDirectory_.CreateUniqueTempDir(); |
| + } |
| - virtual std::string path() const { |
| - return tempDirectory_.path().MaybeAsASCII(); |
| - } |
| + virtual std::string path() const { |
| + return tempDirectory_.path().MaybeAsASCII(); |
| + } |
| private: |
| - ScopedTempDir tempDirectory_; |
| + ScopedTempDir tempDirectory_; |
| }; |
| ScopedTempDirectory* CreateScopedTempDirectory() { |
| @@ -559,8 +568,9 @@ |
| code = -1004; // NSURLErrorCannotConnectToHost |
| break; |
| } |
| - } else |
| + } else { |
| DLOG(WARNING) << "Unknown error domain"; |
| + } |
| return base::StringPrintf("<NSError domain %s, code %d, failing URL \"%s\">", |
| domain.c_str(), code, error.unreachableURL.spec().data()); |