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

Side by Side Diff: content/child/blink_platform_impl.cc

Issue 877323009: Extracted media mime type checks from net/base/ into media/base/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Build fixes #1 Created 5 years, 10 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/child/blink_platform_impl.h" 5 #include "content/child/blink_platform_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 27 matching lines...) Expand all
38 #include "content/child/notifications/notification_manager.h" 38 #include "content/child/notifications/notification_manager.h"
39 #include "content/child/push_messaging/push_dispatcher.h" 39 #include "content/child/push_messaging/push_dispatcher.h"
40 #include "content/child/push_messaging/push_provider.h" 40 #include "content/child/push_messaging/push_provider.h"
41 #include "content/child/thread_safe_sender.h" 41 #include "content/child/thread_safe_sender.h"
42 #include "content/child/web_discardable_memory_impl.h" 42 #include "content/child/web_discardable_memory_impl.h"
43 #include "content/child/web_gesture_curve_impl.h" 43 #include "content/child/web_gesture_curve_impl.h"
44 #include "content/child/web_url_loader_impl.h" 44 #include "content/child/web_url_loader_impl.h"
45 #include "content/child/websocket_bridge.h" 45 #include "content/child/websocket_bridge.h"
46 #include "content/child/webthread_impl.h" 46 #include "content/child/webthread_impl.h"
47 #include "content/child/worker_task_runner.h" 47 #include "content/child/worker_task_runner.h"
48 #include "content/common/mime_util.h"
48 #include "content/public/common/content_client.h" 49 #include "content/public/common/content_client.h"
49 #include "net/base/data_url.h" 50 #include "net/base/data_url.h"
50 #include "net/base/mime_util.h"
51 #include "net/base/net_errors.h" 51 #include "net/base/net_errors.h"
52 #include "net/base/net_util.h" 52 #include "net/base/net_util.h"
53 #include "third_party/WebKit/public/platform/WebConvertableToTraceFormat.h" 53 #include "third_party/WebKit/public/platform/WebConvertableToTraceFormat.h"
54 #include "third_party/WebKit/public/platform/WebData.h" 54 #include "third_party/WebKit/public/platform/WebData.h"
55 #include "third_party/WebKit/public/platform/WebFloatPoint.h" 55 #include "third_party/WebKit/public/platform/WebFloatPoint.h"
56 #include "third_party/WebKit/public/platform/WebString.h" 56 #include "third_party/WebKit/public/platform/WebString.h"
57 #include "third_party/WebKit/public/platform/WebURL.h" 57 #include "third_party/WebKit/public/platform/WebURL.h"
58 #include "third_party/WebKit/public/platform/WebWaitableEvent.h" 58 #include "third_party/WebKit/public/platform/WebWaitableEvent.h"
59 #include "third_party/WebKit/public/web/WebSecurityOrigin.h" 59 #include "third_party/WebKit/public/web/WebSecurityOrigin.h"
60 #include "ui/base/layout.h" 60 #include "ui/base/layout.h"
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 470
471 WebString BlinkPlatformImpl::userAgent() { 471 WebString BlinkPlatformImpl::userAgent() {
472 return WebString::fromUTF8(GetContentClient()->GetUserAgent()); 472 return WebString::fromUTF8(GetContentClient()->GetUserAgent());
473 } 473 }
474 474
475 WebData BlinkPlatformImpl::parseDataURL(const WebURL& url, 475 WebData BlinkPlatformImpl::parseDataURL(const WebURL& url,
476 WebString& mimetype_out, 476 WebString& mimetype_out,
477 WebString& charset_out) { 477 WebString& charset_out) {
478 std::string mime_type, char_set, data; 478 std::string mime_type, char_set, data;
479 if (net::DataURL::Parse(url, &mime_type, &char_set, &data) 479 if (net::DataURL::Parse(url, &mime_type, &char_set, &data)
480 && net::IsSupportedMimeType(mime_type)) { 480 && content::IsSupportedMimeType(mime_type)) {
481 mimetype_out = WebString::fromUTF8(mime_type); 481 mimetype_out = WebString::fromUTF8(mime_type);
482 charset_out = WebString::fromUTF8(char_set); 482 charset_out = WebString::fromUTF8(char_set);
483 return data; 483 return data;
484 } 484 }
485 return WebData(); 485 return WebData();
486 } 486 }
487 487
488 WebURLError BlinkPlatformImpl::cancelledError( 488 WebURLError BlinkPlatformImpl::cancelledError(
489 const WebURL& unreachableURL) const { 489 const WebURL& unreachableURL) const {
490 return WebURLLoaderImpl::CreateError(unreachableURL, false, net::ERR_ABORTED); 490 return WebURLLoaderImpl::CreateError(unreachableURL, false, net::ERR_ABORTED);
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after
1257 return WebString::fromUTF8(ui::KeycodeConverter::DomCodeToCodeString( 1257 return WebString::fromUTF8(ui::KeycodeConverter::DomCodeToCodeString(
1258 static_cast<ui::DomCode>(dom_code))); 1258 static_cast<ui::DomCode>(dom_code)));
1259 } 1259 }
1260 1260
1261 int BlinkPlatformImpl::domEnumFromCodeString(const WebString& code) { 1261 int BlinkPlatformImpl::domEnumFromCodeString(const WebString& code) {
1262 return static_cast<int>(ui::KeycodeConverter::CodeStringToDomCode( 1262 return static_cast<int>(ui::KeycodeConverter::CodeStringToDomCode(
1263 code.utf8().data())); 1263 code.utf8().data()));
1264 } 1264 }
1265 1265
1266 } // namespace content 1266 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698