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

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

Issue 629523003: Rename Get to GetProxy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix device Created 6 years, 2 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
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/bind.h" 8 #include "base/bind.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "mojo/examples/sample_app/gles2_client_impl.h" 10 #include "mojo/examples/sample_app/gles2_client_impl.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 } 64 }
65 65
66 private: 66 private:
67 void OnCreatedNativeViewport(uint64_t native_viewport_id) { 67 void OnCreatedNativeViewport(uint64_t native_viewport_id) {
68 mojo::SizePtr size = mojo::Size::New(); 68 mojo::SizePtr size = mojo::Size::New();
69 size->width = 800; 69 size->width = 800;
70 size->height = 600; 70 size->height = 600;
71 mojo::CommandBufferPtr command_buffer; 71 mojo::CommandBufferPtr command_buffer;
72 // TODO(jamesr): Output to a surface instead. 72 // TODO(jamesr): Output to a surface instead.
73 gpu_service_->CreateOnscreenGLES2Context( 73 gpu_service_->CreateOnscreenGLES2Context(
74 native_viewport_id, size.Pass(), Get(&command_buffer)); 74 native_viewport_id, size.Pass(), GetProxy(&command_buffer));
75 gles2_client_.reset(new GLES2ClientImpl(command_buffer.Pass())); 75 gles2_client_.reset(new GLES2ClientImpl(command_buffer.Pass()));
76 } 76 }
77 77
78 scoped_ptr<GLES2ClientImpl> gles2_client_; 78 scoped_ptr<GLES2ClientImpl> gles2_client_;
79 mojo::NativeViewportPtr viewport_; 79 mojo::NativeViewportPtr viewport_;
80 mojo::GpuPtr gpu_service_; 80 mojo::GpuPtr gpu_service_;
81 base::WeakPtrFactory<SampleApp> weak_factory_; 81 base::WeakPtrFactory<SampleApp> weak_factory_;
82 82
83 DISALLOW_COPY_AND_ASSIGN(SampleApp); 83 DISALLOW_COPY_AND_ASSIGN(SampleApp);
84 }; 84 };
85 85
86 } // namespace examples 86 } // namespace examples
87 87
88 MojoResult MojoMain(MojoHandle shell_handle) { 88 MojoResult MojoMain(MojoHandle shell_handle) {
89 mojo::ApplicationRunner runner(new examples::SampleApp); 89 mojo::ApplicationRunner runner(new examples::SampleApp);
90 return runner.Run(shell_handle); 90 return runner.Run(shell_handle);
91 } 91 }
OLDNEW
« no previous file with comments | « mojo/examples/pepper_container_app/pepper_container_app.cc ('k') | mojo/examples/surfaces_app/child_gl_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698