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

Side by Side Diff: ui/views/mus/mus_client.cc

Issue 2889443002: mash: Add type names to PropertyConverter::Register*Property. (Closed)
Patch Set: Rename to RegisterImageSkiaProperty, update test identifiers. Created 3 years, 7 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/aura/mus/window_tree_client_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/views/mus/mus_client.h" 5 #include "ui/views/mus/mus_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/threading/thread.h" 9 #include "base/threading/thread.h"
10 #include "services/service_manager/public/cpp/connector.h" 10 #include "services/service_manager/public/cpp/connector.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 if (!io_task_runner) { 85 if (!io_task_runner) {
86 io_thread_ = base::MakeUnique<base::Thread>("IOThread"); 86 io_thread_ = base::MakeUnique<base::Thread>("IOThread");
87 base::Thread::Options thread_options(base::MessageLoop::TYPE_IO, 0); 87 base::Thread::Options thread_options(base::MessageLoop::TYPE_IO, 0);
88 thread_options.priority = base::ThreadPriority::NORMAL; 88 thread_options.priority = base::ThreadPriority::NORMAL;
89 CHECK(io_thread_->StartWithOptions(thread_options)); 89 CHECK(io_thread_->StartWithOptions(thread_options));
90 io_task_runner = io_thread_->task_runner(); 90 io_task_runner = io_thread_->task_runner();
91 } 91 }
92 92
93 // TODO(msw): Avoid this... use some default value? Allow clients to extend? 93 // TODO(msw): Avoid this... use some default value? Allow clients to extend?
94 property_converter_ = base::MakeUnique<aura::PropertyConverter>(); 94 property_converter_ = base::MakeUnique<aura::PropertyConverter>();
95 property_converter_->RegisterProperty( 95 property_converter_->RegisterPrimitiveProperty(
96 wm::kShadowElevationKey, 96 wm::kShadowElevationKey,
97 ui::mojom::WindowManager::kShadowElevation_Property, 97 ui::mojom::WindowManager::kShadowElevation_Property,
98 base::Bind(&wm::IsValidShadowElevation)); 98 base::Bind(&wm::IsValidShadowElevation));
99 99
100 if (create_wm_state) 100 if (create_wm_state)
101 wm_state_ = base::MakeUnique<wm::WMState>(); 101 wm_state_ = base::MakeUnique<wm::WMState>();
102 102
103 if (testing_state == MusClientTestingState::CREATE_TESTING_STATE) 103 if (testing_state == MusClientTestingState::CREATE_TESTING_STATE)
104 connector->BindInterface(ui::mojom::kServiceName, &server_test_ptr_); 104 connector->BindInterface(ui::mojom::kServiceName, &server_test_ptr_);
105 105
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 // TODO: this likely gets z-order wrong. http://crbug.com/663606. 317 // TODO: this likely gets z-order wrong. http://crbug.com/663606.
318 gfx::Point relative_point(point); 318 gfx::Point relative_point(point);
319 window_tree_host->ConvertScreenInPixelsToDIP(&relative_point); 319 window_tree_host->ConvertScreenInPixelsToDIP(&relative_point);
320 if (gfx::Rect(root->bounds().size()).Contains(relative_point)) 320 if (gfx::Rect(root->bounds().size()).Contains(relative_point))
321 return root->GetEventHandlerForPoint(relative_point); 321 return root->GetEventHandlerForPoint(relative_point);
322 } 322 }
323 return nullptr; 323 return nullptr;
324 } 324 }
325 325
326 } // namespace views 326 } // namespace views
OLDNEW
« no previous file with comments | « ui/aura/mus/window_tree_client_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698