| OLD | NEW |
| 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 "components/html_viewer/blink_platform_impl.h" | 5 #include "components/html_viewer/blink_platform_impl.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/rand_util.h" | 10 #include "base/rand_util.h" |
| 11 #include "base/stl_util.h" | 11 #include "base/stl_util.h" |
| 12 #include "base/synchronization/waitable_event.h" | 12 #include "base/synchronization/waitable_event.h" |
| 13 #include "base/thread_task_runner_handle.h" | 13 #include "base/thread_task_runner_handle.h" |
| 14 #include "base/threading/platform_thread.h" | 14 #include "base/threading/platform_thread.h" |
| 15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
| 16 #include "components/html_viewer/blink_resource_constants.h" | 16 #include "components/html_viewer/blink_resource_constants.h" |
| 17 #include "components/html_viewer/web_clipboard_impl.h" | 17 #include "components/html_viewer/web_clipboard_impl.h" |
| 18 #include "components/html_viewer/web_cookie_jar_impl.h" | 18 #include "components/html_viewer/web_cookie_jar_impl.h" |
| 19 #include "components/html_viewer/web_message_port_channel_impl.h" | |
| 20 #include "components/html_viewer/web_socket_handle_impl.h" | 19 #include "components/html_viewer/web_socket_handle_impl.h" |
| 21 #include "components/html_viewer/web_url_loader_impl.h" | 20 #include "components/html_viewer/web_url_loader_impl.h" |
| 21 #include "components/message_port/web_message_port_channel_impl.h" |
| 22 #include "components/mime_util/mime_util.h" | 22 #include "components/mime_util/mime_util.h" |
| 23 #include "components/scheduler/child/webthread_impl_for_worker_scheduler.h" | 23 #include "components/scheduler/child/webthread_impl_for_worker_scheduler.h" |
| 24 #include "components/scheduler/renderer/renderer_scheduler.h" | 24 #include "components/scheduler/renderer/renderer_scheduler.h" |
| 25 #include "components/scheduler/renderer/webthread_impl_for_renderer_scheduler.h" | 25 #include "components/scheduler/renderer/webthread_impl_for_renderer_scheduler.h" |
| 26 #include "mojo/application/public/cpp/application_impl.h" | 26 #include "mojo/application/public/cpp/application_impl.h" |
| 27 #include "mojo/application/public/cpp/connect.h" | 27 #include "mojo/application/public/cpp/connect.h" |
| 28 #include "mojo/common/user_agent.h" | 28 #include "mojo/common/user_agent.h" |
| 29 #include "net/base/data_url.h" | 29 #include "net/base/data_url.h" |
| 30 #include "net/base/ip_address_number.h" | 30 #include "net/base/ip_address_number.h" |
| 31 #include "net/base/net_errors.h" | 31 #include "net/base/net_errors.h" |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 return true; | 172 return true; |
| 173 } | 173 } |
| 174 | 174 |
| 175 blink::WebCompositorSupport* BlinkPlatformImpl::compositorSupport() { | 175 blink::WebCompositorSupport* BlinkPlatformImpl::compositorSupport() { |
| 176 return &compositor_support_; | 176 return &compositor_support_; |
| 177 } | 177 } |
| 178 | 178 |
| 179 void BlinkPlatformImpl::createMessageChannel( | 179 void BlinkPlatformImpl::createMessageChannel( |
| 180 blink::WebMessagePortChannel** channel1, | 180 blink::WebMessagePortChannel** channel1, |
| 181 blink::WebMessagePortChannel** channel2) { | 181 blink::WebMessagePortChannel** channel2) { |
| 182 WebMessagePortChannelImpl::CreatePair(channel1, channel2); | 182 message_port::WebMessagePortChannelImpl::CreatePair(channel1, channel2); |
| 183 } | 183 } |
| 184 | 184 |
| 185 blink::WebScrollbarBehavior* BlinkPlatformImpl::scrollbarBehavior() { | 185 blink::WebScrollbarBehavior* BlinkPlatformImpl::scrollbarBehavior() { |
| 186 return &scrollbar_behavior_; | 186 return &scrollbar_behavior_; |
| 187 } | 187 } |
| 188 | 188 |
| 189 const unsigned char* BlinkPlatformImpl::getTraceCategoryEnabledFlag( | 189 const unsigned char* BlinkPlatformImpl::getTraceCategoryEnabledFlag( |
| 190 const char* category_name) { | 190 const char* category_name) { |
| 191 static const unsigned char buf[] = "*"; | 191 static const unsigned char buf[] = "*"; |
| 192 return buf; | 192 return buf; |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 BlinkPlatformImpl::notificationManager() { | 309 BlinkPlatformImpl::notificationManager() { |
| 310 return &web_notification_manager_; | 310 return &web_notification_manager_; |
| 311 } | 311 } |
| 312 | 312 |
| 313 void BlinkPlatformImpl::UpdateWebThreadTLS(blink::WebThread* thread) { | 313 void BlinkPlatformImpl::UpdateWebThreadTLS(blink::WebThread* thread) { |
| 314 DCHECK(!current_thread_slot_.Get()); | 314 DCHECK(!current_thread_slot_.Get()); |
| 315 current_thread_slot_.Set(thread); | 315 current_thread_slot_.Set(thread); |
| 316 } | 316 } |
| 317 | 317 |
| 318 } // namespace html_viewer | 318 } // namespace html_viewer |
| OLD | NEW |