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" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 | 67 |
68 BlinkPlatformImpl::BlinkPlatformImpl( | 68 BlinkPlatformImpl::BlinkPlatformImpl( |
69 mojo::ApplicationImpl* app, | 69 mojo::ApplicationImpl* app, |
70 scheduler::RendererScheduler* renderer_scheduler) | 70 scheduler::RendererScheduler* renderer_scheduler) |
71 : main_thread_task_runner_(renderer_scheduler->DefaultTaskRunner()), | 71 : main_thread_task_runner_(renderer_scheduler->DefaultTaskRunner()), |
72 main_thread_(new scheduler::WebThreadImplForRendererScheduler( | 72 main_thread_(new scheduler::WebThreadImplForRendererScheduler( |
73 renderer_scheduler)) { | 73 renderer_scheduler)) { |
74 if (app) { | 74 if (app) { |
75 mojo::URLRequestPtr request(mojo::URLRequest::New()); | 75 mojo::URLRequestPtr request(mojo::URLRequest::New()); |
76 request->url = mojo::String::From("mojo:network_service"); | 76 request->url = mojo::String::From("mojo:network_service"); |
77 mojo::ApplicationConnection* connection = | 77 scoped_ptr<mojo::ApplicationConnection> connection = |
78 app->ConnectToApplication(request.Pass()); | 78 app->ConnectToApplication(request.Pass()); |
79 connection->ConnectToService(&network_service_); | 79 connection->ConnectToService(&network_service_); |
80 connection->ConnectToService(&url_loader_factory_); | 80 connection->ConnectToService(&url_loader_factory_); |
81 | 81 |
82 mojo::CookieStorePtr cookie_store; | 82 mojo::CookieStorePtr cookie_store; |
83 network_service_->GetCookieStore(GetProxy(&cookie_store)); | 83 network_service_->GetCookieStore(GetProxy(&cookie_store)); |
84 cookie_jar_.reset(new WebCookieJarImpl(cookie_store.Pass())); | 84 cookie_jar_.reset(new WebCookieJarImpl(cookie_store.Pass())); |
85 | 85 |
86 mojo::ClipboardPtr clipboard; | 86 mojo::ClipboardPtr clipboard; |
87 mojo::URLRequestPtr request2(mojo::URLRequest::New()); | 87 mojo::URLRequestPtr request2(mojo::URLRequest::New()); |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 BlinkPlatformImpl::notificationManager() { | 280 BlinkPlatformImpl::notificationManager() { |
281 return &web_notification_manager_; | 281 return &web_notification_manager_; |
282 } | 282 } |
283 | 283 |
284 void BlinkPlatformImpl::UpdateWebThreadTLS(blink::WebThread* thread) { | 284 void BlinkPlatformImpl::UpdateWebThreadTLS(blink::WebThread* thread) { |
285 DCHECK(!current_thread_slot_.Get()); | 285 DCHECK(!current_thread_slot_.Get()); |
286 current_thread_slot_.Set(thread); | 286 current_thread_slot_.Set(thread); |
287 } | 287 } |
288 | 288 |
289 } // namespace html_viewer | 289 } // namespace html_viewer |
OLD | NEW |