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

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 (rebased) Created 6 years, 4 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
« no previous file with comments | « ui/ozone/platform/test/test_window.h ('k') | ui/ozone/platform/test/test_window_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 af232e7acbb3abcf3cddf5631bcbd4db54221ffa..2cfa26ce644f5686017820cd4d8fd7e247efdfa1 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);
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.
@@ -80,14 +77,4 @@ void TestWindow::SetCursor(PlatformCursor cursor) {
void TestWindow::MoveCursorTo(const gfx::Point& location) {
}
-bool TestWindow::CanDispatchEvent(const ui::PlatformEvent& ne) {
- return true;
-}
-
-uint32_t TestWindow::DispatchEvent(const ui::PlatformEvent& ne) {
- ui::Event* event = static_cast<ui::Event*>(ne);
- delegate_->DispatchEvent(event);
- return ui::POST_DISPATCH_STOP_PROPAGATION;
-}
-
} // namespace ui
« no previous file with comments | « ui/ozone/platform/test/test_window.h ('k') | ui/ozone/platform/test/test_window_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698