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

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

Issue 2119973002: Port WebSockets to Mojo IPC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused code Created 4 years, 5 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 <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 #include "content/child/content_child_helpers.h" 44 #include "content/child/content_child_helpers.h"
45 #include "content/child/notifications/notification_dispatcher.h" 45 #include "content/child/notifications/notification_dispatcher.h"
46 #include "content/child/notifications/notification_manager.h" 46 #include "content/child/notifications/notification_manager.h"
47 #include "content/child/permissions/permission_dispatcher.h" 47 #include "content/child/permissions/permission_dispatcher.h"
48 #include "content/child/permissions/permission_dispatcher_thread_proxy.h" 48 #include "content/child/permissions/permission_dispatcher_thread_proxy.h"
49 #include "content/child/push_messaging/push_dispatcher.h" 49 #include "content/child/push_messaging/push_dispatcher.h"
50 #include "content/child/push_messaging/push_provider.h" 50 #include "content/child/push_messaging/push_provider.h"
51 #include "content/child/thread_safe_sender.h" 51 #include "content/child/thread_safe_sender.h"
52 #include "content/child/web_url_loader_impl.h" 52 #include "content/child/web_url_loader_impl.h"
53 #include "content/child/web_url_request_util.h" 53 #include "content/child/web_url_request_util.h"
54 #include "content/child/websocket_bridge.h"
55 #include "content/child/worker_thread_registry.h" 54 #include "content/child/worker_thread_registry.h"
56 #include "content/public/common/content_client.h" 55 #include "content/public/common/content_client.h"
57 #include "net/base/data_url.h" 56 #include "net/base/data_url.h"
58 #include "net/base/net_errors.h" 57 #include "net/base/net_errors.h"
59 #include "third_party/WebKit/public/platform/WebData.h" 58 #include "third_party/WebKit/public/platform/WebData.h"
60 #include "third_party/WebKit/public/platform/WebFloatPoint.h" 59 #include "third_party/WebKit/public/platform/WebFloatPoint.h"
61 #include "third_party/WebKit/public/platform/WebSecurityOrigin.h" 60 #include "third_party/WebKit/public/platform/WebSecurityOrigin.h"
62 #include "third_party/WebKit/public/platform/WebString.h" 61 #include "third_party/WebKit/public/platform/WebString.h"
63 #include "third_party/WebKit/public/platform/WebURL.h" 62 #include "third_party/WebKit/public/platform/WebURL.h"
64 #include "ui/base/layout.h" 63 #include "ui/base/layout.h"
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 void BlinkPlatformImpl::UpdateWebThreadTLS(blink::WebThread* thread, 406 void BlinkPlatformImpl::UpdateWebThreadTLS(blink::WebThread* thread,
408 base::WaitableEvent* event) { 407 base::WaitableEvent* event) {
409 DCHECK(!current_thread_slot_.Get()); 408 DCHECK(!current_thread_slot_.Get());
410 current_thread_slot_.Set(thread); 409 current_thread_slot_.Set(thread);
411 event->Signal(); 410 event->Signal();
412 } 411 }
413 412
414 BlinkPlatformImpl::~BlinkPlatformImpl() { 413 BlinkPlatformImpl::~BlinkPlatformImpl() {
415 } 414 }
416 415
417 blink::WebSocketHandle* BlinkPlatformImpl::createWebSocketHandle() {
418 return new WebSocketBridge;
419 }
420
421 WebString BlinkPlatformImpl::userAgent() { 416 WebString BlinkPlatformImpl::userAgent() {
422 return blink::WebString::fromUTF8(GetContentClient()->GetUserAgent()); 417 return blink::WebString::fromUTF8(GetContentClient()->GetUserAgent());
423 } 418 }
424 419
425 WebData BlinkPlatformImpl::parseDataURL(const WebURL& url, 420 WebData BlinkPlatformImpl::parseDataURL(const WebURL& url,
426 WebString& mimetype_out, 421 WebString& mimetype_out,
427 WebString& charset_out) { 422 WebString& charset_out) {
428 std::string mime_type, char_set, data; 423 std::string mime_type, char_set, data;
429 if (net::DataURL::Parse(url, &mime_type, &char_set, &data) && 424 if (net::DataURL::Parse(url, &mime_type, &char_set, &data) &&
430 mime_util::IsSupportedMimeType(mime_type)) { 425 mime_util::IsSupportedMimeType(mime_type)) {
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
1003 return WebString::fromUTF8(ui::KeycodeConverter::DomKeyToKeyString( 998 return WebString::fromUTF8(ui::KeycodeConverter::DomKeyToKeyString(
1004 static_cast<ui::DomKey>(dom_key))); 999 static_cast<ui::DomKey>(dom_key)));
1005 } 1000 }
1006 1001
1007 int BlinkPlatformImpl::domKeyEnumFromString(const WebString& key_string) { 1002 int BlinkPlatformImpl::domKeyEnumFromString(const WebString& key_string) {
1008 return static_cast<int>( 1003 return static_cast<int>(
1009 ui::KeycodeConverter::KeyStringToDomKey(key_string.utf8())); 1004 ui::KeycodeConverter::KeyStringToDomKey(key_string.utf8()));
1010 } 1005 }
1011 1006
1012 } // namespace content 1007 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698