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

Side by Side Diff: sky/viewer/document_view.cc

Issue 701933004: Change mojo url to always use mojo:foo instead of mojo://foo (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Follow review Created 6 years, 1 month 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
« no previous file with comments | « sky/tools/webkitpy/layout_tests/port/base.py ('k') | sky/viewer/platform/platform_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "sky/viewer/document_view.h" 5 #include "sky/viewer/document_view.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/message_loop/message_loop_proxy.h" 9 #include "base/message_loop/message_loop_proxy.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 web_view_ = blink::WebView::create(this); 127 web_view_ = blink::WebView::create(this);
128 web_layer_tree_view_impl_->set_widget(web_view_); 128 web_layer_tree_view_impl_->set_widget(web_view_);
129 ConfigureSettings(web_view_->settings()); 129 ConfigureSettings(web_view_->settings());
130 web_view_->setMainFrame(blink::WebLocalFrame::create(this)); 130 web_view_->setMainFrame(blink::WebLocalFrame::create(this));
131 GURL url(response->url); 131 GURL url(response->url);
132 web_view_->mainFrame()->load(url, response->body.Pass()); 132 web_view_->mainFrame()->load(url, response->body.Pass());
133 } 133 }
134 134
135 blink::WebLayerTreeView* DocumentView::initializeLayerTreeView() { 135 blink::WebLayerTreeView* DocumentView::initializeLayerTreeView() {
136 mojo::ServiceProviderPtr surfaces_service_provider; 136 mojo::ServiceProviderPtr surfaces_service_provider;
137 shell_->ConnectToApplication("mojo://surfaces_service/", 137 shell_->ConnectToApplication("mojo:surfaces_service",
138 mojo::GetProxy(&surfaces_service_provider)); 138 mojo::GetProxy(&surfaces_service_provider));
139 mojo::InterfacePtr<mojo::SurfacesService> surfaces_service; 139 mojo::InterfacePtr<mojo::SurfacesService> surfaces_service;
140 mojo::ConnectToService(surfaces_service_provider.get(), &surfaces_service); 140 mojo::ConnectToService(surfaces_service_provider.get(), &surfaces_service);
141 141
142 mojo::ServiceProviderPtr gpu_service_provider; 142 mojo::ServiceProviderPtr gpu_service_provider;
143 // TODO(jamesr): Should be mojo://gpu_service 143 // TODO(jamesr): Should be mojo:gpu_service
144 shell_->ConnectToApplication("mojo://native_viewport_service/", 144 shell_->ConnectToApplication("mojo:native_viewport_service",
145 mojo::GetProxy(&gpu_service_provider)); 145 mojo::GetProxy(&gpu_service_provider));
146 mojo::InterfacePtr<mojo::Gpu> gpu_service; 146 mojo::InterfacePtr<mojo::Gpu> gpu_service;
147 mojo::ConnectToService(gpu_service_provider.get(), &gpu_service); 147 mojo::ConnectToService(gpu_service_provider.get(), &gpu_service);
148 web_layer_tree_view_impl_.reset(new WebLayerTreeViewImpl( 148 web_layer_tree_view_impl_.reset(new WebLayerTreeViewImpl(
149 compositor_thread_, surfaces_service.Pass(), gpu_service.Pass())); 149 compositor_thread_, surfaces_service.Pass(), gpu_service.Pass()));
150 150
151 return web_layer_tree_view_impl_.get(); 151 return web_layer_tree_view_impl_.get();
152 } 152 }
153 153
154 void DocumentView::frameDetached(blink::WebFrame* frame) { 154 void DocumentView::frameDetached(blink::WebFrame* frame) {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 211
212 void DocumentView::OnViewInputEvent( 212 void DocumentView::OnViewInputEvent(
213 mojo::View* view, const mojo::EventPtr& event) { 213 mojo::View* view, const mojo::EventPtr& event) {
214 scoped_ptr<blink::WebInputEvent> web_event = 214 scoped_ptr<blink::WebInputEvent> web_event =
215 event.To<scoped_ptr<blink::WebInputEvent> >(); 215 event.To<scoped_ptr<blink::WebInputEvent> >();
216 if (web_event) 216 if (web_event)
217 web_view_->handleInputEvent(*web_event); 217 web_view_->handleInputEvent(*web_event);
218 } 218 }
219 219
220 } // namespace sky 220 } // namespace sky
OLDNEW
« no previous file with comments | « sky/tools/webkitpy/layout_tests/port/base.py ('k') | sky/viewer/platform/platform_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698