| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 | 67 |
| 68 virtual void OnBoundsChanged(RectPtr bounds) OVERRIDE { | 68 virtual void OnBoundsChanged(RectPtr bounds) OVERRIDE { |
| 69 ppapi::ProxyAutoLock lock; | 69 ppapi::ProxyAutoLock lock; |
| 70 | 70 |
| 71 if (plugin_instance_) | 71 if (plugin_instance_) |
| 72 plugin_instance_->DidChangeView(bounds.To<PP_Rect>()); | 72 plugin_instance_->DidChangeView(bounds.To<PP_Rect>()); |
| 73 } | 73 } |
| 74 | 74 |
| 75 virtual void OnEvent(EventPtr event, | 75 virtual void OnEvent(EventPtr event, |
| 76 const mojo::Callback<void()>& callback) OVERRIDE { | 76 const mojo::Callback<void()>& callback) OVERRIDE { |
| 77 if (!event->location.is_null()) { | 77 if (!event->location_data.is_null()) { |
| 78 ppapi::ProxyAutoLock lock; | 78 ppapi::ProxyAutoLock lock; |
| 79 | 79 |
| 80 // TODO(yzshen): Handle events. | 80 // TODO(yzshen): Handle events. |
| 81 } | 81 } |
| 82 callback.Run(); | 82 callback.Run(); |
| 83 } | 83 } |
| 84 | 84 |
| 85 // MojoPpapiGlobals::Delegate implementation. | 85 // MojoPpapiGlobals::Delegate implementation. |
| 86 virtual ScopedMessagePipeHandle CreateGLES2Context() OVERRIDE { | 86 virtual ScopedMessagePipeHandle CreateGLES2Context() OVERRIDE { |
| 87 CommandBufferPtr command_buffer; | 87 CommandBufferPtr command_buffer; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 100 }; | 100 }; |
| 101 | 101 |
| 102 } // namespace examples | 102 } // namespace examples |
| 103 | 103 |
| 104 // static | 104 // static |
| 105 ApplicationDelegate* ApplicationDelegate::Create() { | 105 ApplicationDelegate* ApplicationDelegate::Create() { |
| 106 return new examples::PepperContainerApp(); | 106 return new examples::PepperContainerApp(); |
| 107 } | 107 } |
| 108 | 108 |
| 109 } // namespace mojo | 109 } // namespace mojo |
| OLD | NEW |