Chromium Code Reviews| Index: ui/ozone/platform/test/test_window.cc |
| diff --git a/ui/ozone/platform/test/test_window.cc b/ui/ozone/platform/test/test_window.cc |
| index 0d6568f43762e93336fdc9001d87448fe0395045..7997b8e48d0f58d09c853de2fa49044b73fd8e13 100644 |
| --- a/ui/ozone/platform/test/test_window.cc |
| +++ b/ui/ozone/platform/test/test_window.cc |
| @@ -19,19 +19,16 @@ TestWindow::TestWindow(PlatformWindowDelegate* delegate, |
| const gfx::Rect& bounds) |
| : delegate_(delegate), manager_(manager), bounds_(bounds) { |
| widget_ = manager_->AddWindow(this); |
| - ui::PlatformEventSource::GetInstance()->AddPlatformEventDispatcher(this); |
|
dnicoara
2014/07/31 02:51:31
If this isn't needed then I think you can remove t
varkha
2014/08/07 00:17:10
Done.
|
| delegate_->OnAcceleratedWidgetAvailable(widget_); |
| } |
| TestWindow::~TestWindow() { |
| - ui::PlatformEventSource::GetInstance()->RemovePlatformEventDispatcher(this); |
| manager_->RemoveWindow(widget_, this); |
| } |
| base::FilePath TestWindow::path() { |
| base::FilePath base_path = manager_->base_path(); |
| - |
| - if (base_path == base::FilePath("/dev/null")) |
| + if (base_path.empty() || base_path == base::FilePath("/dev/null")) |
| return base_path; |
| // Disambiguate multiple window output files with the window id. |
| @@ -79,8 +76,8 @@ bool TestWindow::CanDispatchEvent(const ui::PlatformEvent& ne) { |
| } |
| uint32_t TestWindow::DispatchEvent(const ui::PlatformEvent& ne) { |
| - ui::Event* event = static_cast<ui::Event*>(ne); |
| - delegate_->DispatchEvent(event); |
| + // We don't dispatch events via PlatformEventSource. |
| + NOTREACHED(); |
| return ui::POST_DISPATCH_STOP_PROPAGATION; |
| } |