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 "base/files/file_path.h" | 5 #include "base/files/file_path.h" |
6 #include "base/message_loop/message_loop.h" | 6 #include "base/message_loop/message_loop.h" |
7 #include "base/threading/thread.h" | 7 #include "base/threading/thread.h" |
8 #include "mojo/application/application_runner_chromium.h" | 8 #include "mojo/application/application_runner_chromium.h" |
9 #include "mojo/common/tracing_impl.h" | 9 #include "mojo/common/tracing_impl.h" |
10 #include "mojo/icu/icu.h" | 10 #include "mojo/icu/icu.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 | 43 |
44 virtual bool ConfigureIncomingConnection( | 44 virtual bool ConfigureIncomingConnection( |
45 mojo::ApplicationConnection* connection) override { | 45 mojo::ApplicationConnection* connection) override { |
46 connection->AddService<mojo::ContentHandler>(this); | 46 connection->AddService<mojo::ContentHandler>(this); |
47 return true; | 47 return true; |
48 } | 48 } |
49 | 49 |
50 // Overridden from InterfaceFactory<ContentHandler> | 50 // Overridden from InterfaceFactory<ContentHandler> |
51 virtual void Create(mojo::ApplicationConnection* connection, | 51 virtual void Create(mojo::ApplicationConnection* connection, |
52 mojo::InterfaceRequest<mojo::ContentHandler> request) over
ride { | 52 mojo::InterfaceRequest<mojo::ContentHandler> request) over
ride { |
53 mojo::BindToRequest(new ContentHandlerImpl(), &request); | 53 new ContentHandlerImpl(request.Pass()); |
54 } | 54 } |
55 | 55 |
56 scoped_ptr<PlatformImpl> platform_impl_; | 56 scoped_ptr<PlatformImpl> platform_impl_; |
57 mojo::TracingImpl tracing_; | 57 mojo::TracingImpl tracing_; |
58 | 58 |
59 DISALLOW_COPY_AND_ASSIGN(Viewer); | 59 DISALLOW_COPY_AND_ASSIGN(Viewer); |
60 }; | 60 }; |
61 | 61 |
62 } // namespace sky | 62 } // namespace sky |
63 | 63 |
64 MojoResult MojoMain(MojoHandle shell_handle) { | 64 MojoResult MojoMain(MojoHandle shell_handle) { |
65 mojo::ApplicationRunnerChromium runner(new sky::Viewer); | 65 mojo::ApplicationRunnerChromium runner(new sky::Viewer); |
66 return runner.Run(shell_handle); | 66 return runner.Run(shell_handle); |
67 } | 67 } |
OLD | NEW |