diff options
author | Kristian Monsen <kristianm@google.com> | 2010-03-23 09:37:55 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-03-23 09:37:55 -0700 |
commit | bd150a788daef4180dc4d1afea9d7517b6721eff (patch) | |
tree | ca614efce6ac7349e08c7b61bda92b2ee0fb9a3f /WebKit | |
parent | 7d7e576868fe78bf1b95968ad5d6ddc395c65ec9 (diff) | |
parent | 3bc49c8c3d13a6745cc535c7e6a57da60bb83a09 (diff) | |
download | external_webkit-bd150a788daef4180dc4d1afea9d7517b6721eff.zip external_webkit-bd150a788daef4180dc4d1afea9d7517b6721eff.tar.gz external_webkit-bd150a788daef4180dc4d1afea9d7517b6721eff.tar.bz2 |
Merge "Only replaced flash content if youtube app is installed. Fix for bug 2521517."
Diffstat (limited to 'WebKit')
-rw-r--r-- | WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp index 10cd0b3..6e42d47 100644 --- a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp +++ b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp @@ -46,6 +46,7 @@ #include "IconDatabase.h" #include "MIMETypeRegistry.h" #include "NotImplemented.h" +#include "PackageNotifier.h" #include "Page.h" #include "PlatformBridge.h" #include "PlatformGraphicsContext.h" @@ -995,6 +996,10 @@ static bool isYouTubeUrl(const KURL& url, const String& mimeType) && equalIgnoringCase(mimeType, "application/x-shockwave-flash"); } +static bool isYouTubeInstalled() { + return WebCore::packageNotifier().isPackageInstalled("com.google.android.youtube"); +} + WTF::PassRefPtr<Widget> FrameLoaderClientAndroid::createPlugin( const IntSize& size, HTMLPlugInElement* element, @@ -1004,7 +1009,7 @@ WTF::PassRefPtr<Widget> FrameLoaderClientAndroid::createPlugin( const String& mimeType, bool loadManually) { // Create an iframe for youtube urls. - if (isYouTubeUrl(url, mimeType)) { + if (isYouTubeUrl(url, mimeType) && isYouTubeInstalled()) { WTF::RefPtr<Frame> frame = createFrame(blankURL(), String(), element, String(), false, 0, 0); if (frame) { |