Input events are broken in skydb

When we removed Aura from the build, we broke event targeting. This CL hacks
around the issue by blindly forwarding events from the root view to the content
view in skydb. Once we have proper event targeting, we should rip out this code.

R=erg@chromium.org

Review URL: https://codereview.chromium.org/714213003
This commit is contained in:
Adam Barth
2014-11-12 10:32:54 -08:00
parent 865b81939b
commit 50de29f59d
2 changed files with 14 additions and 1 deletions

View File

@@ -82,6 +82,16 @@ void SkyDebugger::OnViewBoundsChanged(mojo::View* view,
content_->SetBounds(new_bounds);
}
void SkyDebugger::OnViewInputEvent(
mojo::View* view, const mojo::EventPtr& event) {
if (view != root_)
return;
// Currently, the event targeting system is broken for mojo::Views, so we
// blindly forward events from the root to the content view. Once event
// targeting works, we should be able to rip out this code.
window_manager_app_->DispatchInputEventToView(content_, event.Clone());
}
void SkyDebugger::Create(mojo::ApplicationConnection* connection,
mojo::InterfaceRequest<Debugger> request) {
mojo::WeakBindToRequest(this, &request);

View File

@@ -51,12 +51,15 @@ class SkyDebugger : public mojo::ApplicationDelegate,
mojo::ServiceProviderImpl* exported_services,
scoped_ptr<mojo::ServiceProvider> imported_services) override;
void OnViewManagerDisconnected(mojo::ViewManager* view_manager) override;
// Overriden from mojo::ViewObserver:
void OnViewDestroyed(mojo::View* view) override;
void OnViewBoundsChanged(mojo::View* view,
const mojo::Rect& old_bounds,
const mojo::Rect& new_bounds) override;
void OnViewInputEvent(mojo::View* view, const mojo::EventPtr& event) override;
// Overridden from InterfaceFactory<Debugger>
// Overridden from InterfaceFactory<Debugger>:
void Create(mojo::ApplicationConnection* connection,
mojo::InterfaceRequest<Debugger> request) override;