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

Side by Side Diff: mojo/examples/pepper_container_app/pepper_container_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
« no previous file with comments | « mojo/examples/compositor_app/compositor_app.cc ('k') | mojo/examples/sample_app/sample_app.cc » ('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 "base/macros.h" 5 #include "base/macros.h"
6 #include "base/memory/ref_counted.h" 6 #include "base/memory/ref_counted.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 } 85 }
86 86
87 // MojoPpapiGlobals::Delegate implementation. 87 // MojoPpapiGlobals::Delegate implementation.
88 virtual ScopedMessagePipeHandle CreateGLES2Context() override { 88 virtual ScopedMessagePipeHandle CreateGLES2Context() override {
89 CommandBufferPtr command_buffer; 89 CommandBufferPtr command_buffer;
90 SizePtr size = Size::New(); 90 SizePtr size = Size::New();
91 size->width = 800; 91 size->width = 800;
92 size->width = 600; 92 size->width = 600;
93 // TODO(jamesr): Output a surface to the native viewport instead. 93 // TODO(jamesr): Output a surface to the native viewport instead.
94 gpu_service_->CreateOnscreenGLES2Context( 94 gpu_service_->CreateOnscreenGLES2Context(
95 native_viewport_id_, size.Pass(), Get(&command_buffer)); 95 native_viewport_id_, size.Pass(), GetProxy(&command_buffer));
96 return command_buffer.PassMessagePipe(); 96 return command_buffer.PassMessagePipe();
97 } 97 }
98 98
99 private: 99 private:
100 void OnCreatedNativeViewport(uint64_t native_viewport_id) { 100 void OnCreatedNativeViewport(uint64_t native_viewport_id) {
101 native_viewport_id_ = native_viewport_id; 101 native_viewport_id_ = native_viewport_id;
102 ppapi::ProxyAutoLock lock; 102 ppapi::ProxyAutoLock lock;
103 103
104 plugin_instance_ = plugin_module_->CreateInstance().Pass(); 104 plugin_instance_ = plugin_module_->CreateInstance().Pass();
105 if (!plugin_instance_->DidCreate()) 105 if (!plugin_instance_->DidCreate())
(...skipping 15 matching lines...) Expand all
121 121
122 } // namespace examples 122 } // namespace examples
123 } // namespace mojo 123 } // namespace mojo
124 124
125 MojoResult MojoMain(MojoHandle shell_handle) { 125 MojoResult MojoMain(MojoHandle shell_handle) {
126 mojo::ApplicationRunnerChromium runner( 126 mojo::ApplicationRunnerChromium runner(
127 new mojo::examples::PepperContainerApp); 127 new mojo::examples::PepperContainerApp);
128 return runner.Run(shell_handle); 128 return runner.Run(shell_handle);
129 } 129 }
130 130
OLDNEW
« no previous file with comments | « mojo/examples/compositor_app/compositor_app.cc ('k') | mojo/examples/sample_app/sample_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698