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

Side by Side Diff: ui/ozone/platform/test/ozone_platform_test.cc

Issue 527293002: ozone: Remove CursorFactoryOzone::SetCursor, GetCursorWindow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 3 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 unified diff | Download patch
« no previous file with comments | « ui/ozone/platform/test/BUILD.gn ('k') | ui/ozone/platform/test/test.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/events/platform/platform_event_source.h" 10 #include "ui/events/platform/platform_event_source.h"
10 #include "ui/ozone/platform/test/test_cursor_factory.h"
11 #include "ui/ozone/platform/test/test_window.h" 11 #include "ui/ozone/platform/test/test_window.h"
12 #include "ui/ozone/platform/test/test_window_manager.h" 12 #include "ui/ozone/platform/test/test_window_manager.h"
13 #include "ui/ozone/public/cursor_factory_ozone.h" 13 #include "ui/ozone/public/cursor_factory_ozone.h"
14 #include "ui/ozone/public/gpu_platform_support.h" 14 #include "ui/ozone/public/gpu_platform_support.h"
15 #include "ui/ozone/public/gpu_platform_support_host.h" 15 #include "ui/ozone/public/gpu_platform_support_host.h"
16 #include "ui/ozone/public/ozone_platform.h" 16 #include "ui/ozone/public/ozone_platform.h"
17 #include "ui/ozone/public/ozone_switches.h" 17 #include "ui/ozone/public/ozone_switches.h"
18 18
19 #if defined(OS_CHROMEOS) 19 #if defined(OS_CHROMEOS)
20 #include "ui/ozone/common/chromeos/native_display_delegate_ozone.h" 20 #include "ui/ozone/common/chromeos/native_display_delegate_ozone.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 } 65 }
66 #endif 66 #endif
67 67
68 virtual void InitializeUI() OVERRIDE { 68 virtual void InitializeUI() OVERRIDE {
69 window_manager_.reset(new TestWindowManager(file_path_)); 69 window_manager_.reset(new TestWindowManager(file_path_));
70 window_manager_->Initialize(); 70 window_manager_->Initialize();
71 // This unbreaks tests that create their own. 71 // This unbreaks tests that create their own.
72 if (!PlatformEventSource::GetInstance()) 72 if (!PlatformEventSource::GetInstance())
73 platform_event_source_ = PlatformEventSource::CreateDefault(); 73 platform_event_source_ = PlatformEventSource::CreateDefault();
74 74
75 cursor_factory_ozone_.reset(new TestCursorFactory()); 75 cursor_factory_ozone_.reset(new BitmapCursorFactoryOzone);
76 gpu_platform_support_host_.reset(CreateStubGpuPlatformSupportHost()); 76 gpu_platform_support_host_.reset(CreateStubGpuPlatformSupportHost());
77 } 77 }
78 78
79 virtual void InitializeGPU() OVERRIDE { 79 virtual void InitializeGPU() OVERRIDE {
80 gpu_platform_support_.reset(CreateStubGpuPlatformSupport()); 80 gpu_platform_support_.reset(CreateStubGpuPlatformSupport());
81 } 81 }
82 82
83 private: 83 private:
84 scoped_ptr<TestWindowManager> window_manager_; 84 scoped_ptr<TestWindowManager> window_manager_;
85 scoped_ptr<PlatformEventSource> platform_event_source_; 85 scoped_ptr<PlatformEventSource> platform_event_source_;
86 scoped_ptr<CursorFactoryOzone> cursor_factory_ozone_; 86 scoped_ptr<CursorFactoryOzone> cursor_factory_ozone_;
87 scoped_ptr<GpuPlatformSupport> gpu_platform_support_; 87 scoped_ptr<GpuPlatformSupport> gpu_platform_support_;
88 scoped_ptr<GpuPlatformSupportHost> gpu_platform_support_host_; 88 scoped_ptr<GpuPlatformSupportHost> gpu_platform_support_host_;
89 base::FilePath file_path_; 89 base::FilePath file_path_;
90 90
91 DISALLOW_COPY_AND_ASSIGN(OzonePlatformTest); 91 DISALLOW_COPY_AND_ASSIGN(OzonePlatformTest);
92 }; 92 };
93 93
94 } // namespace 94 } // namespace
95 95
96 OzonePlatform* CreateOzonePlatformTest() { 96 OzonePlatform* CreateOzonePlatformTest() {
97 CommandLine* cmd = CommandLine::ForCurrentProcess(); 97 CommandLine* cmd = CommandLine::ForCurrentProcess();
98 base::FilePath location; 98 base::FilePath location;
99 if (cmd->HasSwitch(switches::kOzoneDumpFile)) 99 if (cmd->HasSwitch(switches::kOzoneDumpFile))
100 location = cmd->GetSwitchValuePath(switches::kOzoneDumpFile); 100 location = cmd->GetSwitchValuePath(switches::kOzoneDumpFile);
101 return new OzonePlatformTest(location); 101 return new OzonePlatformTest(location);
102 } 102 }
103 103
104 } // namespace ui 104 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/test/BUILD.gn ('k') | ui/ozone/platform/test/test.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698