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

Side by Side Diff: webkit/api/src/FrameLoaderClientImpl.cpp

Issue 351001: Revert "Eliminate mime_util dependency from WebFrameLoaderClient." (Closed)
Patch Set: Created 11 years, 1 month 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 | « webkit/api/public/WebMimeRegistry.h ('k') | webkit/glue/simple_webmimeregistry_impl.h » ('j') | 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 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 #include "MouseEvent.h" 46 #include "MouseEvent.h"
47 #include "Page.h" 47 #include "Page.h"
48 #include "PlatformString.h" 48 #include "PlatformString.h"
49 #include "PluginData.h" 49 #include "PluginData.h"
50 #include "StringExtras.h" 50 #include "StringExtras.h"
51 #include "WebForm.h" 51 #include "WebForm.h"
52 #include "WebFrameClient.h" 52 #include "WebFrameClient.h"
53 #include "WebFrameImpl.h" 53 #include "WebFrameImpl.h"
54 #include "WebKit.h" 54 #include "WebKit.h"
55 #include "WebKitClient.h" 55 #include "WebKitClient.h"
56 #include "WebMimeRegistry.h"
57 #include "WebNode.h" 56 #include "WebNode.h"
58 #include "WebPlugin.h" 57 #include "WebPlugin.h"
59 #include "WebPluginParams.h" 58 #include "WebPluginParams.h"
60 #include "WebSecurityOrigin.h" 59 #include "WebSecurityOrigin.h"
61 #include "WebURL.h" 60 #include "WebURL.h"
62 #include "WebURLError.h" 61 #include "WebURLError.h"
63 #include "WebVector.h" 62 #include "WebVector.h"
64 #include "WebViewClient.h" 63 #include "WebViewClient.h"
65 #include "WebViewImpl.h" 64 #include "WebViewImpl.h"
66 #include "WebDataSourceImpl.h" 65 #include "WebDataSourceImpl.h"
67 #include "WebPluginContainerImpl.h" 66 #include "WebPluginContainerImpl.h"
68 #include "WebPluginLoadObserver.h" 67 #include "WebPluginLoadObserver.h"
69 #include "WindowFeatures.h" 68 #include "WindowFeatures.h"
70 #include "WrappedResourceRequest.h" 69 #include "WrappedResourceRequest.h"
71 #include "WrappedResourceResponse.h" 70 #include "WrappedResourceResponse.h"
72 71
73 // FIXME: remove these 72 // FIXME: remove these
73 #include "net/base/mime_util.h"
74 #include "webkit/glue/webdevtoolsagent_impl.h" 74 #include "webkit/glue/webdevtoolsagent_impl.h"
75 75
76 using namespace WebCore; 76 using namespace WebCore;
77 77
78 namespace WebKit { 78 namespace WebKit {
79 79
80 // Domain for internal error codes. 80 // Domain for internal error codes.
81 static const char internalErrorDomain[] = "WebKit"; 81 static const char internalErrorDomain[] = "WebKit";
82 82
83 // An internal error code. Used to note a policy change error resulting from 83 // An internal error code. Used to note a policy change error resulting from
(...skipping 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after
1111 1111
1112 bool FrameLoaderClientImpl::canShowMIMEType(const String& mimeType) const 1112 bool FrameLoaderClientImpl::canShowMIMEType(const String& mimeType) const
1113 { 1113 {
1114 // This method is called to determine if the media type can be shown 1114 // This method is called to determine if the media type can be shown
1115 // "internally" (i.e. inside the browser) regardless of whether or not the 1115 // "internally" (i.e. inside the browser) regardless of whether or not the
1116 // browser or a plugin is doing the rendering. 1116 // browser or a plugin is doing the rendering.
1117 1117
1118 // mimeType strings are supposed to be ASCII, but if they are not for some 1118 // mimeType strings are supposed to be ASCII, but if they are not for some
1119 // reason, then it just means that the mime type will fail all of these "is 1119 // reason, then it just means that the mime type will fail all of these "is
1120 // supported" checks and go down the path of an unhandled mime type. 1120 // supported" checks and go down the path of an unhandled mime type.
1121 if (WebKit::webKitClient()->mimeRegistry()->supportsMIMEType(mimeType) == WebMimeRegistry::IsSupported) 1121 if (net::IsSupportedMimeType(mimeType.latin1().data()))
1122 return true; 1122 return true;
1123 1123
1124 // If Chrome is started with the --disable-plugins switch, pluginData is null. 1124 // If Chrome is started with the --disable-plugins switch, pluginData is null.
1125 PluginData* pluginData = m_webFrame->frame()->page()->pluginData(); 1125 PluginData* pluginData = m_webFrame->frame()->page()->pluginData();
1126 1126
1127 // See if the type is handled by an installed plugin, if so, we can show it. 1127 // See if the type is handled by an installed plugin, if so, we can show it.
1128 // FIXME: (http://b/1085524) This is the place to stick a preference to 1128 // FIXME: (http://b/1085524) This is the place to stick a preference to
1129 // disable full page plugins (optionally for certain types!) 1129 // disable full page plugins (optionally for certain types!)
1130 return !mimeType.isEmpty() && pluginData && pluginData->supportsMimeType(mimeType); 1130 return !mimeType.isEmpty() && pluginData && pluginData->supportsMimeType(mimeType);
1131 } 1131 }
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
1393 } 1393 }
1394 1394
1395 PassOwnPtr<WebPluginLoadObserver> FrameLoaderClientImpl::pluginLoadObserver() 1395 PassOwnPtr<WebPluginLoadObserver> FrameLoaderClientImpl::pluginLoadObserver()
1396 { 1396 {
1397 WebDataSourceImpl* ds = WebDataSourceImpl::fromDocumentLoader( 1397 WebDataSourceImpl* ds = WebDataSourceImpl::fromDocumentLoader(
1398 m_webFrame->frame()->loader()->activeDocumentLoader()); 1398 m_webFrame->frame()->loader()->activeDocumentLoader());
1399 return ds->releasePluginLoadObserver(); 1399 return ds->releasePluginLoadObserver();
1400 } 1400 }
1401 1401
1402 } // namespace WebKit 1402 } // namespace WebKit
OLDNEW
« no previous file with comments | « webkit/api/public/WebMimeRegistry.h ('k') | webkit/glue/simple_webmimeregistry_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698