| 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/html_document_view.h" | 5 #include "mojo/services/html_viewer/html_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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 | 147 |
| 148 web_view_->mainFrame()->loadRequest(web_request); | 148 web_view_->mainFrame()->loadRequest(web_request); |
| 149 } | 149 } |
| 150 | 150 |
| 151 blink::WebStorageNamespace* HTMLDocumentView::createSessionStorageNamespace() { | 151 blink::WebStorageNamespace* HTMLDocumentView::createSessionStorageNamespace() { |
| 152 return new WebStorageNamespaceImpl(); | 152 return new WebStorageNamespaceImpl(); |
| 153 } | 153 } |
| 154 | 154 |
| 155 void HTMLDocumentView::initializeLayerTreeView() { | 155 void HTMLDocumentView::initializeLayerTreeView() { |
| 156 ServiceProviderPtr surfaces_service_provider; | 156 ServiceProviderPtr surfaces_service_provider; |
| 157 shell_->ConnectToApplication("mojo:mojo_surfaces_service", | 157 shell_->ConnectToApplication("mojo:surfaces_service", |
| 158 GetProxy(&surfaces_service_provider)); | 158 GetProxy(&surfaces_service_provider)); |
| 159 SurfacesServicePtr surfaces_service; | 159 SurfacesServicePtr surfaces_service; |
| 160 ConnectToService(surfaces_service_provider.get(), &surfaces_service); | 160 ConnectToService(surfaces_service_provider.get(), &surfaces_service); |
| 161 | 161 |
| 162 ServiceProviderPtr gpu_service_provider; | 162 ServiceProviderPtr gpu_service_provider; |
| 163 // TODO(jamesr): Should be mojo:mojo_gpu_service | 163 // TODO(jamesr): Should be mojo:gpu_service |
| 164 shell_->ConnectToApplication("mojo:mojo_native_viewport_service", | 164 shell_->ConnectToApplication("mojo:native_viewport_service", |
| 165 GetProxy(&gpu_service_provider)); | 165 GetProxy(&gpu_service_provider)); |
| 166 GpuPtr gpu_service; | 166 GpuPtr gpu_service; |
| 167 ConnectToService(gpu_service_provider.get(), &gpu_service); | 167 ConnectToService(gpu_service_provider.get(), &gpu_service); |
| 168 web_layer_tree_view_impl_.reset(new WebLayerTreeViewImpl( | 168 web_layer_tree_view_impl_.reset(new WebLayerTreeViewImpl( |
| 169 compositor_thread_, surfaces_service.Pass(), gpu_service.Pass())); | 169 compositor_thread_, surfaces_service.Pass(), gpu_service.Pass())); |
| 170 } | 170 } |
| 171 | 171 |
| 172 blink::WebLayerTreeView* HTMLDocumentView::layerTreeView() { | 172 blink::WebLayerTreeView* HTMLDocumentView::layerTreeView() { |
| 173 return web_layer_tree_view_impl_.get(); | 173 return web_layer_tree_view_impl_.get(); |
| 174 } | 174 } |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 } | 251 } |
| 252 | 252 |
| 253 void HTMLDocumentView::OnViewInputEvent(View* view, const EventPtr& event) { | 253 void HTMLDocumentView::OnViewInputEvent(View* view, const EventPtr& event) { |
| 254 scoped_ptr<blink::WebInputEvent> web_event = | 254 scoped_ptr<blink::WebInputEvent> web_event = |
| 255 event.To<scoped_ptr<blink::WebInputEvent> >(); | 255 event.To<scoped_ptr<blink::WebInputEvent> >(); |
| 256 if (web_event) | 256 if (web_event) |
| 257 web_view_->handleInputEvent(*web_event); | 257 web_view_->handleInputEvent(*web_event); |
| 258 } | 258 } |
| 259 | 259 |
| 260 } // namespace mojo | 260 } // namespace mojo |
| OLD | NEW |