summaryrefslogtreecommitdiffstats
path: root/mojo/examples/nesting_app
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/nesting_app
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/nesting_app')
-rw-r--r--mojo/examples/nesting_app/nesting_app.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/mojo/examples/nesting_app/nesting_app.cc b/mojo/examples/nesting_app/nesting_app.cc
index 3c06c8d..249cc37 100644
--- a/mojo/examples/nesting_app/nesting_app.cc
+++ b/mojo/examples/nesting_app/nesting_app.cc
@@ -58,7 +58,7 @@ class NestingApp : 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)
window_manager_->CloseWindow(view->node()->id());
}
@@ -75,4 +75,4 @@ Application* Application::Create() {
return new examples::NestingApp;
}
-} // namespace mojo \ No newline at end of file
+} // namespace mojo