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

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

Issue 428413002: Make async waiter explicit MojoGLES2CreateContext param (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
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_impl.h" 11 #include "mojo/public/cpp/application/application_impl.h"
12 #include "mojo/public/cpp/gles2/gles2.h"
13 #include "mojo/public/cpp/system/core.h" 12 #include "mojo/public/cpp/system/core.h"
14 #include "mojo/services/public/cpp/geometry/geometry_type_converters.h" 13 #include "mojo/services/public/cpp/geometry/geometry_type_converters.h"
15 #include "mojo/services/public/interfaces/native_viewport/native_viewport.mojom. h" 14 #include "mojo/services/public/interfaces/native_viewport/native_viewport.mojom. h"
16 #include "ui/gfx/rect.h" 15 #include "ui/gfx/rect.h"
17 16
18 namespace mojo { 17 namespace mojo {
19 namespace examples { 18 namespace examples {
20 19
21 class SampleApp : public ApplicationDelegate, public NativeViewportClient { 20 class SampleApp : public ApplicationDelegate, public NativeViewportClient {
22 public: 21 public:
(...skipping 23 matching lines...) Expand all
46 virtual void OnBoundsChanged(RectPtr bounds) OVERRIDE { 45 virtual void OnBoundsChanged(RectPtr bounds) OVERRIDE {
47 host_->SetSize(gfx::Size(bounds->width, bounds->height)); 46 host_->SetSize(gfx::Size(bounds->width, bounds->height));
48 } 47 }
49 48
50 virtual void OnEvent(EventPtr event, 49 virtual void OnEvent(EventPtr event,
51 const mojo::Callback<void()>& callback) OVERRIDE { 50 const mojo::Callback<void()>& callback) OVERRIDE {
52 callback.Run(); 51 callback.Run();
53 } 52 }
54 53
55 private: 54 private:
56 mojo::GLES2Initializer gles2;
57 NativeViewportPtr viewport_; 55 NativeViewportPtr viewport_;
58 scoped_ptr<CompositorHost> host_; 56 scoped_ptr<CompositorHost> host_;
59 DISALLOW_COPY_AND_ASSIGN(SampleApp); 57 DISALLOW_COPY_AND_ASSIGN(SampleApp);
60 }; 58 };
61 59
62 } // namespace examples 60 } // namespace examples
63 61
64 // static 62 // static
65 ApplicationDelegate* ApplicationDelegate::Create() { 63 ApplicationDelegate* ApplicationDelegate::Create() {
66 return new examples::SampleApp(); 64 return new examples::SampleApp();
67 } 65 }
68 66
69 } // namespace mojo 67 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/cc/context_provider_mojo.cc ('k') | mojo/examples/pepper_container_app/graphics_3d_resource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698