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

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

Issue 478523002: mojo events: Add |screen_location| to LocationData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix crash observed locally because of synthesized aura events. Created 6 years, 4 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
« no previous file with comments | « no previous file | mojo/examples/sample_app/gles2_client_impl.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/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
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
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
OLDNEW
« no previous file with comments | « no previous file | mojo/examples/sample_app/gles2_client_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698