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

Side by Side Diff: components/html_viewer/blink_platform_impl.cc

Issue 1115363002: mojo: Use ContentHandlers to bundle multiple Applications into a module. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 "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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 shared_timer_fire_time_(0.0), 71 shared_timer_fire_time_(0.0),
72 shared_timer_fire_time_was_set_while_suspended_(false), 72 shared_timer_fire_time_was_set_while_suspended_(false),
73 shared_timer_suspended_(0) { 73 shared_timer_suspended_(0) {
74 if (app) { 74 if (app) {
75 app->ConnectToService("mojo:network_service", &network_service_); 75 app->ConnectToService("mojo:network_service", &network_service_);
76 76
77 mojo::CookieStorePtr cookie_store; 77 mojo::CookieStorePtr cookie_store;
78 network_service_->GetCookieStore(GetProxy(&cookie_store)); 78 network_service_->GetCookieStore(GetProxy(&cookie_store));
79 cookie_jar_.reset(new WebCookieJarImpl(cookie_store.Pass())); 79 cookie_jar_.reset(new WebCookieJarImpl(cookie_store.Pass()));
80 80
81 mojo::ServiceProviderPtr service_provider;
82 app->ConnectToService("mojo:core_services", &service_provider);
83 mojo::ClipboardPtr clipboard; 81 mojo::ClipboardPtr clipboard;
84 mojo::ConnectToService(service_provider.get(), &clipboard); 82 app->ConnectToService("mojo:clipboard", &clipboard);
85 clipboard_.reset(new WebClipboardImpl(clipboard.Pass())); 83 clipboard_.reset(new WebClipboardImpl(clipboard.Pass()));
86 } 84 }
87 shared_timer_.SetTaskRunner(main_thread_task_runner_); 85 shared_timer_.SetTaskRunner(main_thread_task_runner_);
88 } 86 }
89 87
90 BlinkPlatformImpl::~BlinkPlatformImpl() { 88 BlinkPlatformImpl::~BlinkPlatformImpl() {
91 } 89 }
92 90
93 blink::WebCookieJar* BlinkPlatformImpl::cookieJar() { 91 blink::WebCookieJar* BlinkPlatformImpl::cookieJar() {
94 return cookie_jar_.get(); 92 return cookie_jar_.get();
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 BlinkPlatformImpl::notificationManager() { 305 BlinkPlatformImpl::notificationManager() {
308 return &web_notification_manager_; 306 return &web_notification_manager_;
309 } 307 }
310 308
311 void BlinkPlatformImpl::UpdateWebThreadTLS(blink::WebThread* thread) { 309 void BlinkPlatformImpl::UpdateWebThreadTLS(blink::WebThread* thread) {
312 DCHECK(!current_thread_slot_.Get()); 310 DCHECK(!current_thread_slot_.Get());
313 current_thread_slot_.Set(thread); 311 current_thread_slot_.Set(thread);
314 } 312 }
315 313
316 } // namespace html_viewer 314 } // namespace html_viewer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698