| 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 "mojo/services/html_viewer/blink_platform_impl.h" | 5 #include "mojo/services/html_viewer/blink_platform_impl.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 | 8 |
| 9 #include "base/rand_util.h" | 9 #include "base/rand_util.h" |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 | 49 |
| 50 } // namespace | 50 } // namespace |
| 51 | 51 |
| 52 BlinkPlatformImpl::BlinkPlatformImpl(ApplicationImpl* app) | 52 BlinkPlatformImpl::BlinkPlatformImpl(ApplicationImpl* app) |
| 53 : main_loop_(base::MessageLoop::current()), | 53 : main_loop_(base::MessageLoop::current()), |
| 54 shared_timer_func_(NULL), | 54 shared_timer_func_(NULL), |
| 55 shared_timer_fire_time_(0.0), | 55 shared_timer_fire_time_(0.0), |
| 56 shared_timer_fire_time_was_set_while_suspended_(false), | 56 shared_timer_fire_time_was_set_while_suspended_(false), |
| 57 shared_timer_suspended_(0), | 57 shared_timer_suspended_(0), |
| 58 current_thread_slot_(&DestroyCurrentThread) { | 58 current_thread_slot_(&DestroyCurrentThread) { |
| 59 app->ConnectToService("mojo:mojo_network_service", &network_service_); | 59 app->ConnectToService("mojo:network_service", &network_service_); |
| 60 | 60 |
| 61 CookieStorePtr cookie_store; | 61 CookieStorePtr cookie_store; |
| 62 network_service_->GetCookieStore(GetProxy(&cookie_store)); | 62 network_service_->GetCookieStore(GetProxy(&cookie_store)); |
| 63 cookie_jar_.reset(new WebCookieJarImpl(cookie_store.Pass())); | 63 cookie_jar_.reset(new WebCookieJarImpl(cookie_store.Pass())); |
| 64 | 64 |
| 65 ClipboardPtr clipboard; | 65 ClipboardPtr clipboard; |
| 66 app->ConnectToService("mojo:mojo_clipboard", &clipboard); | 66 app->ConnectToService("mojo:clipboard", &clipboard); |
| 67 clipboard_.reset(new WebClipboardImpl(clipboard.Pass())); | 67 clipboard_.reset(new WebClipboardImpl(clipboard.Pass())); |
| 68 } | 68 } |
| 69 | 69 |
| 70 BlinkPlatformImpl::~BlinkPlatformImpl() { | 70 BlinkPlatformImpl::~BlinkPlatformImpl() { |
| 71 } | 71 } |
| 72 | 72 |
| 73 blink::WebCookieJar* BlinkPlatformImpl::cookieJar() { | 73 blink::WebCookieJar* BlinkPlatformImpl::cookieJar() { |
| 74 return cookie_jar_.get(); | 74 return cookie_jar_.get(); |
| 75 } | 75 } |
| 76 | 76 |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 } | 242 } |
| 243 | 243 |
| 244 // static | 244 // static |
| 245 void BlinkPlatformImpl::DestroyCurrentThread(void* thread) { | 245 void BlinkPlatformImpl::DestroyCurrentThread(void* thread) { |
| 246 WebThreadImplForMessageLoop* impl = | 246 WebThreadImplForMessageLoop* impl = |
| 247 static_cast<WebThreadImplForMessageLoop*>(thread); | 247 static_cast<WebThreadImplForMessageLoop*>(thread); |
| 248 delete impl; | 248 delete impl; |
| 249 } | 249 } |
| 250 | 250 |
| 251 } // namespace mojo | 251 } // namespace mojo |
| OLD | NEW |