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

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: Fix compile error Created 4 years, 4 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 #include "content/child/background_sync/background_sync_provider.h" 42 #include "content/child/background_sync/background_sync_provider.h"
43 #include "content/child/child_thread_impl.h" 43 #include "content/child/child_thread_impl.h"
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/push_messaging/push_dispatcher.h" 47 #include "content/child/push_messaging/push_dispatcher.h"
48 #include "content/child/push_messaging/push_provider.h" 48 #include "content/child/push_messaging/push_provider.h"
49 #include "content/child/thread_safe_sender.h" 49 #include "content/child/thread_safe_sender.h"
50 #include "content/child/web_url_loader_impl.h" 50 #include "content/child/web_url_loader_impl.h"
51 #include "content/child/web_url_request_util.h" 51 #include "content/child/web_url_request_util.h"
52 #include "content/child/websocket_bridge.h"
53 #include "content/child/worker_thread_registry.h" 52 #include "content/child/worker_thread_registry.h"
54 #include "content/public/common/content_client.h" 53 #include "content/public/common/content_client.h"
55 #include "net/base/data_url.h" 54 #include "net/base/data_url.h"
56 #include "net/base/net_errors.h" 55 #include "net/base/net_errors.h"
57 #include "third_party/WebKit/public/platform/WebData.h" 56 #include "third_party/WebKit/public/platform/WebData.h"
58 #include "third_party/WebKit/public/platform/WebFloatPoint.h" 57 #include "third_party/WebKit/public/platform/WebFloatPoint.h"
59 #include "third_party/WebKit/public/platform/WebSecurityOrigin.h" 58 #include "third_party/WebKit/public/platform/WebSecurityOrigin.h"
60 #include "third_party/WebKit/public/platform/WebString.h" 59 #include "third_party/WebKit/public/platform/WebString.h"
61 #include "third_party/WebKit/public/platform/WebURL.h" 60 #include "third_party/WebKit/public/platform/WebURL.h"
62 #include "ui/base/layout.h" 61 #include "ui/base/layout.h"
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 void BlinkPlatformImpl::UpdateWebThreadTLS(blink::WebThread* thread, 402 void BlinkPlatformImpl::UpdateWebThreadTLS(blink::WebThread* thread,
404 base::WaitableEvent* event) { 403 base::WaitableEvent* event) {
405 DCHECK(!current_thread_slot_.Get()); 404 DCHECK(!current_thread_slot_.Get());
406 current_thread_slot_.Set(thread); 405 current_thread_slot_.Set(thread);
407 event->Signal(); 406 event->Signal();
408 } 407 }
409 408
410 BlinkPlatformImpl::~BlinkPlatformImpl() { 409 BlinkPlatformImpl::~BlinkPlatformImpl() {
411 } 410 }
412 411
413 blink::WebSocketHandle* BlinkPlatformImpl::createWebSocketHandle() {
414 return new WebSocketBridge;
415 }
416
417 WebString BlinkPlatformImpl::userAgent() { 412 WebString BlinkPlatformImpl::userAgent() {
418 return blink::WebString::fromUTF8(GetContentClient()->GetUserAgent()); 413 return blink::WebString::fromUTF8(GetContentClient()->GetUserAgent());
419 } 414 }
420 415
421 WebData BlinkPlatformImpl::parseDataURL(const WebURL& url, 416 WebData BlinkPlatformImpl::parseDataURL(const WebURL& url,
422 WebString& mimetype_out, 417 WebString& mimetype_out,
423 WebString& charset_out) { 418 WebString& charset_out) {
424 std::string mime_type, char_set, data; 419 std::string mime_type, char_set, data;
425 if (net::DataURL::Parse(url, &mime_type, &char_set, &data) && 420 if (net::DataURL::Parse(url, &mime_type, &char_set, &data) &&
426 mime_util::IsSupportedMimeType(mime_type)) { 421 mime_util::IsSupportedMimeType(mime_type)) {
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
988 return WebString::fromUTF8(ui::KeycodeConverter::DomKeyToKeyString( 983 return WebString::fromUTF8(ui::KeycodeConverter::DomKeyToKeyString(
989 static_cast<ui::DomKey>(dom_key))); 984 static_cast<ui::DomKey>(dom_key)));
990 } 985 }
991 986
992 int BlinkPlatformImpl::domKeyEnumFromString(const WebString& key_string) { 987 int BlinkPlatformImpl::domKeyEnumFromString(const WebString& key_string) {
993 return static_cast<int>( 988 return static_cast<int>(
994 ui::KeycodeConverter::KeyStringToDomKey(key_string.utf8())); 989 ui::KeycodeConverter::KeyStringToDomKey(key_string.utf8()));
995 } 990 }
996 991
997 } // namespace content 992 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698