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

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

Issue 272323003: Mojo: Implement support for |Foo&| mojom syntax (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 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 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/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "mojo/examples/pepper_container_app/mojo_ppapi_globals.h" 10 #include "mojo/examples/pepper_container_app/mojo_ppapi_globals.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 if (!event->location.is_null()) { 78 if (!event->location.is_null()) {
79 ppapi::ProxyAutoLock lock; 79 ppapi::ProxyAutoLock lock;
80 80
81 // TODO(yzshen): Handle events. 81 // TODO(yzshen): Handle events.
82 } 82 }
83 callback.Run(); 83 callback.Run();
84 } 84 }
85 85
86 // MojoPpapiGlobals::Delegate implementation. 86 // MojoPpapiGlobals::Delegate implementation.
87 virtual ScopedMessagePipeHandle CreateGLES2Context() OVERRIDE { 87 virtual ScopedMessagePipeHandle CreateGLES2Context() OVERRIDE {
88 MessagePipe gles2_pipe; 88 CommandBufferPtr command_buffer;
89 viewport_->CreateGLES2Context(gles2_pipe.handle1.Pass()); 89 viewport_->CreateGLES2Context(Get(&command_buffer));
90 return gles2_pipe.handle0.Pass(); 90 return command_buffer.PassMessagePipe();
91 } 91 }
92 92
93 private: 93 private:
94 MojoPpapiGlobals ppapi_globals_; 94 MojoPpapiGlobals ppapi_globals_;
95 95
96 NativeViewportPtr viewport_; 96 NativeViewportPtr viewport_;
97 scoped_refptr<PluginModule> plugin_module_; 97 scoped_refptr<PluginModule> plugin_module_;
98 scoped_ptr<PluginInstance> plugin_instance_; 98 scoped_ptr<PluginInstance> plugin_instance_;
99 99
100 DISALLOW_COPY_AND_ASSIGN(PepperContainerApp); 100 DISALLOW_COPY_AND_ASSIGN(PepperContainerApp);
101 }; 101 };
102 102
103 } // namespace examples 103 } // namespace examples
104 104
105 // static 105 // static
106 Application* Application::Create() { 106 Application* Application::Create() {
107 return new examples::PepperContainerApp(); 107 return new examples::PepperContainerApp();
108 } 108 }
109 109
110 } // namespace mojo 110 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/examples/compositor_app/compositor_host.cc ('k') | mojo/examples/sample_app/gles2_client_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698