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/surfaces/surfaces_service_application.h" | 5 #include "mojo/services/surfaces/surfaces_service_application.h" |
6 | 6 |
7 #include "cc/surfaces/display.h" | 7 #include "cc/surfaces/display.h" |
8 | 8 |
| 9 #include "mojo/public/c/system/main.h" |
| 10 #include "mojo/public/cpp/application/application_runner_chromium.h" |
| 11 |
9 namespace mojo { | 12 namespace mojo { |
10 | 13 |
11 SurfacesServiceApplication::SurfacesServiceApplication() | 14 SurfacesServiceApplication::SurfacesServiceApplication() |
12 : next_id_namespace_(1u), display_(NULL) { | 15 : next_id_namespace_(1u), display_(NULL) { |
13 } | 16 } |
14 | 17 |
15 SurfacesServiceApplication::~SurfacesServiceApplication() { | 18 SurfacesServiceApplication::~SurfacesServiceApplication() { |
16 } | 19 } |
17 | 20 |
18 bool SurfacesServiceApplication::ConfigureIncomingConnection( | 21 bool SurfacesServiceApplication::ConfigureIncomingConnection( |
(...skipping 10 matching lines...) Expand all Loading... |
29 | 32 |
30 void SurfacesServiceApplication::FrameSubmitted() { | 33 void SurfacesServiceApplication::FrameSubmitted() { |
31 if (display_) | 34 if (display_) |
32 display_->Draw(); | 35 display_->Draw(); |
33 } | 36 } |
34 | 37 |
35 void SurfacesServiceApplication::SetDisplay(cc::Display* display) { | 38 void SurfacesServiceApplication::SetDisplay(cc::Display* display) { |
36 display_ = display; | 39 display_ = display; |
37 } | 40 } |
38 | 41 |
39 // static | 42 } // namespace mojo |
40 ApplicationDelegate* ApplicationDelegate::Create() { | 43 |
41 return new SurfacesServiceApplication; | 44 MojoResult MojoMain(MojoHandle shell_handle) { |
| 45 mojo::ApplicationRunnerChromium runner(new mojo::SurfacesServiceApplication); |
| 46 return runner.Run(shell_handle); |
42 } | 47 } |
43 | |
44 } // namespace mojo | |
OLD | NEW |