summaryrefslogtreecommitdiffstats
path: root/mojo/examples/window_manager
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-10 13:40:36 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-10 13:40:36 +0000
commit7c2ebfd68efed75ac4099c6698bc157eb6eaa20e (patch)
tree18a21b777051c4a11adc0b798574249e758f32a0 /mojo/examples/window_manager
parent66d11ca864b194eb6fb03a08a7c826af987b930f (diff)
downloadchromium_src-7c2ebfd68efed75ac4099c6698bc157eb6eaa20e.zip
chromium_src-7c2ebfd68efed75ac4099c6698bc157eb6eaa20e.tar.gz
chromium_src-7c2ebfd68efed75ac4099c6698bc157eb6eaa20e.tar.bz2
Fix ownership bug with ViewObserver::OnViewInputEvent
It needs to take a const EventPtr& otherwise the first observer owns the event and all others get NULL. BUG=365012 TEST=none R=ben@chromium.org Review URL: https://codereview.chromium.org/324753002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276012 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'mojo/examples/window_manager')
-rw-r--r--mojo/examples/window_manager/window_manager.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/mojo/examples/window_manager/window_manager.cc b/mojo/examples/window_manager/window_manager.cc
index cbdde1a..92d0403 100644
--- a/mojo/examples/window_manager/window_manager.cc
+++ b/mojo/examples/window_manager/window_manager.cc
@@ -66,7 +66,7 @@ class WindowManager : public Application,
}
// Overridden from ViewObserver:
- virtual void OnViewInputEvent(View* view, EventPtr event) OVERRIDE {
+ virtual void OnViewInputEvent(View* view, const EventPtr& event) OVERRIDE {
if (event->action == ui::ET_MOUSE_RELEASED) {
if (event->flags & ui::EF_LEFT_MOUSE_BUTTON)
CreateWindow("mojo:mojo_embedded_app");
@@ -125,4 +125,4 @@ Application* Application::Create() {
return new examples::WindowManager;
}
-} // namespace mojo \ No newline at end of file
+} // namespace mojo