OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/ozone/platform/test/test_window.h" | 5 #include "ui/ozone/platform/test/test_window.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
11 #include "ui/events/platform/platform_event_source.h" | 11 #include "ui/events/platform/platform_event_source.h" |
12 #include "ui/ozone/platform/test/test_window_manager.h" | 12 #include "ui/ozone/platform/test/test_window_manager.h" |
13 #include "ui/platform_window/platform_window_delegate.h" | 13 #include "ui/platform_window/types/platform_window_delegate.h" |
14 | 14 |
15 namespace ui { | 15 namespace ui { |
16 | 16 |
17 TestWindow::TestWindow(PlatformWindowDelegate* delegate, | 17 TestWindow::TestWindow(PlatformWindowDelegate* delegate, |
18 TestWindowManager* manager, | 18 TestWindowManager* manager, |
19 const gfx::Rect& bounds) | 19 const gfx::Rect& bounds) |
20 : delegate_(delegate), manager_(manager), bounds_(bounds) { | 20 : delegate_(delegate), manager_(manager), bounds_(bounds) { |
21 widget_ = manager_->AddWindow(this); | 21 widget_ = manager_->AddWindow(this); |
22 ui::PlatformEventSource::GetInstance()->AddPlatformEventDispatcher(this); | 22 ui::PlatformEventSource::GetInstance()->AddPlatformEventDispatcher(this); |
23 delegate_->OnAcceleratedWidgetAvailable(widget_); | 23 delegate_->OnAcceleratedWidgetAvailable(widget_); |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 return true; | 78 return true; |
79 } | 79 } |
80 | 80 |
81 uint32_t TestWindow::DispatchEvent(const ui::PlatformEvent& ne) { | 81 uint32_t TestWindow::DispatchEvent(const ui::PlatformEvent& ne) { |
82 ui::Event* event = static_cast<ui::Event*>(ne); | 82 ui::Event* event = static_cast<ui::Event*>(ne); |
83 delegate_->DispatchEvent(event); | 83 delegate_->DispatchEvent(event); |
84 return ui::POST_DISPATCH_STOP_PROPAGATION; | 84 return ui::POST_DISPATCH_STOP_PROPAGATION; |
85 } | 85 } |
86 | 86 |
87 } // namespace ui | 87 } // namespace ui |
OLD | NEW |