| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/ozone_platform_test.h" | 5 #include "ui/ozone/platform/test/ozone_platform_test.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h" | 9 #include "ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h" |
| 10 #include "ui/events/ozone/layout/keyboard_layout_engine_manager.h" | 10 #include "ui/events/ozone/layout/keyboard_layout_engine_manager.h" |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 } | 69 } |
| 70 scoped_ptr<PlatformWindow> CreatePlatformWindow( | 70 scoped_ptr<PlatformWindow> CreatePlatformWindow( |
| 71 PlatformWindowDelegate* delegate, | 71 PlatformWindowDelegate* delegate, |
| 72 const gfx::Rect& bounds) override { | 72 const gfx::Rect& bounds) override { |
| 73 return make_scoped_ptr<PlatformWindow>( | 73 return make_scoped_ptr<PlatformWindow>( |
| 74 new TestWindow(delegate, window_manager_.get(), bounds)); | 74 new TestWindow(delegate, window_manager_.get(), bounds)); |
| 75 } | 75 } |
| 76 scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() override { | 76 scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() override { |
| 77 return make_scoped_ptr(new NativeDisplayDelegateOzone()); | 77 return make_scoped_ptr(new NativeDisplayDelegateOzone()); |
| 78 } | 78 } |
| 79 base::ScopedFD OpenClientNativePixmapDevice() const override { |
| 80 return base::ScopedFD(); |
| 81 } |
| 79 | 82 |
| 80 void InitializeUI() override { | 83 void InitializeUI() override { |
| 81 window_manager_.reset(new TestWindowManager(file_path_)); | 84 window_manager_.reset(new TestWindowManager(file_path_)); |
| 82 window_manager_->Initialize(); | 85 window_manager_->Initialize(); |
| 83 // This unbreaks tests that create their own. | 86 // This unbreaks tests that create their own. |
| 84 if (!PlatformEventSource::GetInstance()) | 87 if (!PlatformEventSource::GetInstance()) |
| 85 platform_event_source_.reset(new TestPlatformEventSource); | 88 platform_event_source_.reset(new TestPlatformEventSource); |
| 86 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine( | 89 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine( |
| 87 make_scoped_ptr(new StubKeyboardLayoutEngine())); | 90 make_scoped_ptr(new StubKeyboardLayoutEngine())); |
| 88 | 91 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 113 | 116 |
| 114 OzonePlatform* CreateOzonePlatformTest() { | 117 OzonePlatform* CreateOzonePlatformTest() { |
| 115 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); | 118 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); |
| 116 base::FilePath location; | 119 base::FilePath location; |
| 117 if (cmd->HasSwitch(switches::kOzoneDumpFile)) | 120 if (cmd->HasSwitch(switches::kOzoneDumpFile)) |
| 118 location = cmd->GetSwitchValuePath(switches::kOzoneDumpFile); | 121 location = cmd->GetSwitchValuePath(switches::kOzoneDumpFile); |
| 119 return new OzonePlatformTest(location); | 122 return new OzonePlatformTest(location); |
| 120 } | 123 } |
| 121 | 124 |
| 122 } // namespace ui | 125 } // namespace ui |
| OLD | NEW |