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

Side by Side Diff: third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp

Issue 1990343002: Fix navigator.plugins and navigator.mimeTypes for OOPIFs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Undo accidental blank line Created 4 years, 7 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
« no previous file with comments | « third_party/WebKit/Source/modules/plugins/DOMPluginArray.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2011 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 // if a plugin can handle the extension. 862 // if a plugin can handle the extension.
863 mimeType = getPluginMimeTypeFromExtension(extension); 863 mimeType = getPluginMimeTypeFromExtension(extension);
864 } 864 }
865 } 865 }
866 866
867 if (mimeType.isEmpty()) 867 if (mimeType.isEmpty())
868 return ObjectContentFrame; 868 return ObjectContentFrame;
869 } 869 }
870 870
871 // If Chrome is started with the --disable-plugins switch, pluginData is 0. 871 // If Chrome is started with the --disable-plugins switch, pluginData is 0.
872 PluginData* pluginData = m_webFrame->frame()->page()->pluginData(); 872 PluginData* pluginData = m_webFrame->frame()->pluginData();
873 bool plugInSupportsMIMEType = pluginData && pluginData->supportsMimeType(mim eType); 873 bool plugInSupportsMIMEType = pluginData && pluginData->supportsMimeType(mim eType);
874 874
875 if (MIMETypeRegistry::isSupportedImageMIMEType(mimeType)) 875 if (MIMETypeRegistry::isSupportedImageMIMEType(mimeType))
876 return shouldPreferPlugInsForImages && plugInSupportsMIMEType ? ObjectCo ntentNetscapePlugin : ObjectContentImage; 876 return shouldPreferPlugInsForImages && plugInSupportsMIMEType ? ObjectCo ntentNetscapePlugin : ObjectContentImage;
877 877
878 if (plugInSupportsMIMEType) 878 if (plugInSupportsMIMEType)
879 return ObjectContentNetscapePlugin; 879 return ObjectContentNetscapePlugin;
880 880
881 if (MIMETypeRegistry::isSupportedNonImageMIMEType(mimeType)) 881 if (MIMETypeRegistry::isSupportedNonImageMIMEType(mimeType))
882 return ObjectContentFrame; 882 return ObjectContentFrame;
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
1037 } 1037 }
1038 1038
1039 WebEffectiveConnectionType FrameLoaderClientImpl::getEffectiveConnectionType() 1039 WebEffectiveConnectionType FrameLoaderClientImpl::getEffectiveConnectionType()
1040 { 1040 {
1041 if (m_webFrame->client()) 1041 if (m_webFrame->client())
1042 return m_webFrame->client()->getEffectiveConnectionType(); 1042 return m_webFrame->client()->getEffectiveConnectionType();
1043 return WebEffectiveConnectionType::TypeUnknown; 1043 return WebEffectiveConnectionType::TypeUnknown;
1044 } 1044 }
1045 1045
1046 } // namespace blink 1046 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/plugins/DOMPluginArray.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698