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

Side by Side Diff: mojo/examples/compositor_app/compositor_app.cc

Issue 441853002: mojo: first take on removing mojo_main_{chromium,standalone}. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: seperate Run call 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <stdio.h> 5 #include <stdio.h>
6 #include <string> 6 #include <string>
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "mojo/examples/compositor_app/compositor_host.h" 9 #include "mojo/examples/compositor_app/compositor_host.h"
10 #include "mojo/public/cpp/application/application_delegate.h" 10 #include "mojo/public/cpp/application/application_delegate.h"
11 #include "mojo/public/cpp/application/application_export.h"
11 #include "mojo/public/cpp/application/application_impl.h" 12 #include "mojo/public/cpp/application/application_impl.h"
13 #include "mojo/public/cpp/application/application_runner_chromium.h"
12 #include "mojo/public/cpp/system/core.h" 14 #include "mojo/public/cpp/system/core.h"
13 #include "mojo/services/public/cpp/geometry/geometry_type_converters.h" 15 #include "mojo/services/public/cpp/geometry/geometry_type_converters.h"
14 #include "mojo/services/public/interfaces/native_viewport/native_viewport.mojom. h" 16 #include "mojo/services/public/interfaces/native_viewport/native_viewport.mojom. h"
15 #include "ui/gfx/rect.h" 17 #include "ui/gfx/rect.h"
16 18
17 namespace mojo { 19 namespace mojo {
18 namespace examples { 20 namespace examples {
19 21
20 class SampleApp : public ApplicationDelegate, public NativeViewportClient { 22 class SampleApp : public ApplicationDelegate, public NativeViewportClient {
21 public: 23 public:
(...skipping 29 matching lines...) Expand all
51 callback.Run(); 53 callback.Run();
52 } 54 }
53 55
54 private: 56 private:
55 NativeViewportPtr viewport_; 57 NativeViewportPtr viewport_;
56 scoped_ptr<CompositorHost> host_; 58 scoped_ptr<CompositorHost> host_;
57 DISALLOW_COPY_AND_ASSIGN(SampleApp); 59 DISALLOW_COPY_AND_ASSIGN(SampleApp);
58 }; 60 };
59 61
60 } // namespace examples 62 } // namespace examples
63 } // namespace mojo
61 64
62 // static 65 extern "C" APPLICATION_EXPORT MojoResult CDECL MojoMain(
63 ApplicationDelegate* ApplicationDelegate::Create() { 66 MojoHandle shell_handle) {
64 return new examples::SampleApp(); 67 mojo::ApplicationRunnerChromium runner(new mojo::examples::SampleApp());
darin (slow to review) 2014/08/18 23:38:18 nit: you seemed to be standardizing on dropping th
tim (not reviewing) 2014/08/19 00:06:29 Done.
68 return runner.Run(shell_handle);
65 } 69 }
66
67 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698