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

Unified Diff: services/ui/service.cc

Issue 2961403002: WIP fix for Ozone cursor woes in Mushrome: Numéro deux
Patch Set: Created 3 years, 6 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 | « services/ui/service.h ('k') | services/ui/ws/display.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/service.cc
diff --git a/services/ui/service.cc b/services/ui/service.cc
index 5514f158eb0c3a4734fdbfe888469aadf0baacce..55961fc340bee1b96f2180f7611e84236c2d2132 100644
--- a/services/ui/service.cc
+++ b/services/ui/service.cc
@@ -92,11 +92,12 @@ struct Service::UserState {
std::unique_ptr<ws::WindowTreeHostFactory> window_tree_host_factory;
};
-Service::Service(scoped_refptr<base::SingleThreadTaskRunner> resource_runner,
- base::WeakPtr<ui::ImageCursors> image_cursors_weak_ptr)
+Service::Service(
+ scoped_refptr<base::SingleThreadTaskRunner> resource_runner,
+ base::WeakPtr<ui::ImageCursorsHolder> image_cursors_holder_weak_ptr)
: in_process_(resource_runner != nullptr),
resource_runner_(resource_runner),
- image_cursors_weak_ptr_(image_cursors_weak_ptr),
+ image_cursors_holder_weak_ptr_(image_cursors_holder_weak_ptr),
test_config_(false),
ime_registrar_(&ime_driver_) {}
@@ -146,8 +147,9 @@ bool Service::InitializeResources(service_manager::Connector* connector) {
ui::SCALE_FACTOR_200P);
// Initialize the cursors.
- image_cursors_ = base::MakeUnique<ui::ImageCursors>();
- image_cursors_weak_ptr_ = image_cursors_->GetWeakPtr();
+ image_cursors_holder_ = base::MakeUnique<ui::ImageCursorsHolder>();
+ image_cursors_holder_->SetImageCursors(base::MakeUnique<ui::ImageCursors>());
+ image_cursors_holder_weak_ptr_ = image_cursors_holder_->GetWeakPtr();
return true;
}
@@ -362,8 +364,8 @@ scoped_refptr<base::SingleThreadTaskRunner>& Service::GetResourceRunner() {
return resource_runner_;
}
-base::WeakPtr<ui::ImageCursors> Service::GetImageCursorsWeakPtr() {
- return image_cursors_weak_ptr_;
+base::WeakPtr<ui::ImageCursorsHolder> Service::GetImageCursorsHolderWeakPtr() {
+ return image_cursors_holder_weak_ptr_;
}
void Service::BindAccessibilityManagerRequest(
« no previous file with comments | « services/ui/service.h ('k') | services/ui/ws/display.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698