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

Side by Side Diff: mojo/services/surfaces/surfaces_service_application.cc

Issue 441853002: mojo: first take on removing mojo_main_{chromium,standalone}. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 months 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 | Annotate | Revision Log
« no previous file with comments | « mojo/services/surfaces/BUILD.gn ('k') | mojo/services/test_service/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "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
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
OLDNEW
« no previous file with comments | « mojo/services/surfaces/BUILD.gn ('k') | mojo/services/test_service/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698