| 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 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 GlobalState* global_state, | 73 GlobalState* global_state, |
| 74 mojo::Shell* shell, | 74 mojo::Shell* shell, |
| 75 scheduler::RendererScheduler* renderer_scheduler) | 75 scheduler::RendererScheduler* renderer_scheduler) |
| 76 : global_state_(global_state), | 76 : global_state_(global_state), |
| 77 shell_(shell), | 77 shell_(shell), |
| 78 main_thread_task_runner_(renderer_scheduler->DefaultTaskRunner()), | 78 main_thread_task_runner_(renderer_scheduler->DefaultTaskRunner()), |
| 79 main_thread_(renderer_scheduler->CreateMainThread()) { | 79 main_thread_(renderer_scheduler->CreateMainThread()) { |
| 80 if (shell) { | 80 if (shell) { |
| 81 scoped_ptr<mojo::Connection> connection = | 81 scoped_ptr<mojo::Connection> connection = |
| 82 shell->Connect("mojo:network_service"); | 82 shell->Connect("mojo:network_service"); |
| 83 connection->ConnectToService(&web_socket_factory_); | 83 connection->GetInterface(&web_socket_factory_); |
| 84 connection->ConnectToService(&url_loader_factory_); | 84 connection->GetInterface(&url_loader_factory_); |
| 85 | 85 |
| 86 mojo::CookieStorePtr cookie_store; | 86 mojo::CookieStorePtr cookie_store; |
| 87 connection->ConnectToService(&cookie_store); | 87 connection->GetInterface(&cookie_store); |
| 88 cookie_jar_.reset(new WebCookieJarImpl(std::move(cookie_store))); | 88 cookie_jar_.reset(new WebCookieJarImpl(std::move(cookie_store))); |
| 89 | 89 |
| 90 mojo::ClipboardPtr clipboard; | 90 mojo::ClipboardPtr clipboard; |
| 91 shell->ConnectToService("mojo:clipboard", &clipboard); | 91 shell->ConnectToService("mojo:clipboard", &clipboard); |
| 92 clipboard_.reset(new WebClipboardImpl(std::move(clipboard))); | 92 clipboard_.reset(new WebClipboardImpl(std::move(clipboard))); |
| 93 } | 93 } |
| 94 } | 94 } |
| 95 | 95 |
| 96 BlinkPlatformImpl::~BlinkPlatformImpl() { | 96 BlinkPlatformImpl::~BlinkPlatformImpl() { |
| 97 } | 97 } |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 BlinkPlatformImpl::notificationManager() { | 301 BlinkPlatformImpl::notificationManager() { |
| 302 return &web_notification_manager_; | 302 return &web_notification_manager_; |
| 303 } | 303 } |
| 304 | 304 |
| 305 void BlinkPlatformImpl::UpdateWebThreadTLS(blink::WebThread* thread) { | 305 void BlinkPlatformImpl::UpdateWebThreadTLS(blink::WebThread* thread) { |
| 306 DCHECK(!current_thread_slot_.Get()); | 306 DCHECK(!current_thread_slot_.Get()); |
| 307 current_thread_slot_.Set(thread); | 307 current_thread_slot_.Set(thread); |
| 308 } | 308 } |
| 309 | 309 |
| 310 } // namespace html_viewer | 310 } // namespace html_viewer |
| OLD | NEW |