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

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

Issue 687273002: mojo: Update content handler API (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rename content_handler.h 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
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/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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698