| OLD | NEW |
| 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 27 matching lines...) Expand all Loading... |
| 38 public NativeViewportClient, | 38 public NativeViewportClient, |
| 39 public MojoPpapiGlobals::Delegate { | 39 public MojoPpapiGlobals::Delegate { |
| 40 public: | 40 public: |
| 41 explicit PepperContainerApp(MojoHandle shell_handle) | 41 explicit PepperContainerApp(MojoHandle shell_handle) |
| 42 : Application(shell_handle), | 42 : Application(shell_handle), |
| 43 ppapi_globals_(this), | 43 ppapi_globals_(this), |
| 44 plugin_module_(new PluginModule) { | 44 plugin_module_(new PluginModule) { |
| 45 mojo::AllocationScope scope; | 45 mojo::AllocationScope scope; |
| 46 | 46 |
| 47 ConnectTo("mojo:mojo_native_viewport_service", &viewport_); | 47 ConnectTo("mojo:mojo_native_viewport_service", &viewport_); |
| 48 viewport_->SetClient(this); | 48 viewport_.set_client(this); |
| 49 | 49 |
| 50 Rect::Builder rect; | 50 Rect::Builder rect; |
| 51 Point::Builder point; | 51 Point::Builder point; |
| 52 point.set_x(10); | 52 point.set_x(10); |
| 53 point.set_y(10); | 53 point.set_y(10); |
| 54 rect.set_position(point.Finish()); | 54 rect.set_position(point.Finish()); |
| 55 Size::Builder size; | 55 Size::Builder size; |
| 56 size.set_width(800); | 56 size.set_width(800); |
| 57 size.set_height(600); | 57 size.set_height(600); |
| 58 rect.set_size(size.Finish()); | 58 rect.set_size(size.Finish()); |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 extern "C" PEPPER_CONTAINER_APP_EXPORT MojoResult CDECL MojoMain( | 122 extern "C" PEPPER_CONTAINER_APP_EXPORT MojoResult CDECL MojoMain( |
| 123 MojoHandle shell_handle) { | 123 MojoHandle shell_handle) { |
| 124 mojo::Environment env; | 124 mojo::Environment env; |
| 125 mojo::GLES2Initializer gles2; | 125 mojo::GLES2Initializer gles2; |
| 126 base::MessageLoop run_loop; | 126 base::MessageLoop run_loop; |
| 127 mojo::examples::PepperContainerApp app(shell_handle); | 127 mojo::examples::PepperContainerApp app(shell_handle); |
| 128 | 128 |
| 129 run_loop.Run(); | 129 run_loop.Run(); |
| 130 return MOJO_RESULT_OK; | 130 return MOJO_RESULT_OK; |
| 131 } | 131 } |
| OLD | NEW |