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

Unified Diff: ui/ozone/platform/test/test_window.cc

Issue 419993003: Adds a do-nothing ozone platform (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adds a do-nothing ozone platform when --ozone-dump-file is not specified Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
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;
}

Powered by Google App Engine
This is Rietveld 408576698