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 "sky/viewer/content_handler_impl.h" | 5 #include "sky/viewer/content_handler_impl.h" |
6 | 6 |
7 #include "sky/viewer/document_view.h" | 7 #include "sky/viewer/document_view.h" |
8 | 8 |
9 namespace sky { | 9 namespace sky { |
10 | 10 |
11 ContentHandlerImpl::ContentHandlerImpl( | 11 ContentHandlerImpl::ContentHandlerImpl( |
12 mojo::Shell* shell, | |
13 scoped_refptr<base::MessageLoopProxy> compositor_thread) | 12 scoped_refptr<base::MessageLoopProxy> compositor_thread) |
14 : shell_(shell), | 13 : compositor_thread_(compositor_thread) { |
15 compositor_thread_(compositor_thread) { | |
16 } | 14 } |
17 | 15 |
18 ContentHandlerImpl::~ContentHandlerImpl() { | 16 ContentHandlerImpl::~ContentHandlerImpl() { |
19 } | 17 } |
20 | 18 |
21 void ContentHandlerImpl::OnConnect( | 19 void ContentHandlerImpl::StartApplication(mojo::ShellPtr shell, |
22 const mojo::String& url, | 20 mojo::URLResponsePtr response) { |
23 mojo::URLResponsePtr response, | 21 new DocumentView(response.Pass(), shell.Pass(), compositor_thread_); |
24 mojo::InterfaceRequest<mojo::ServiceProvider> service_provider_request) { | |
25 new DocumentView(response.Pass(), service_provider_request.Pass(), | |
26 shell_, compositor_thread_); | |
27 } | 22 } |
28 | 23 |
29 } // namespace sky | 24 } // namespace sky |
OLD | NEW |