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

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

Issue 2702423004: Validate incoming window properties. (Closed)
Patch Set: sky comments Created 3 years, 9 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') | ui/wm/core/shadow_types.h » ('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 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 "components/discardable_memory/client/client_discardable_shared_memory_ manager.h" 10 #include "components/discardable_memory/client/client_discardable_shared_memory_ manager.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 base::Thread::Options thread_options(base::MessageLoop::TYPE_IO, 0); 74 base::Thread::Options thread_options(base::MessageLoop::TYPE_IO, 0);
75 thread_options.priority = base::ThreadPriority::NORMAL; 75 thread_options.priority = base::ThreadPriority::NORMAL;
76 CHECK(io_thread_->StartWithOptions(thread_options)); 76 CHECK(io_thread_->StartWithOptions(thread_options));
77 io_task_runner = io_thread_->task_runner(); 77 io_task_runner = io_thread_->task_runner();
78 } 78 }
79 79
80 // TODO(msw): Avoid this... use some default value? Allow clients to extend? 80 // TODO(msw): Avoid this... use some default value? Allow clients to extend?
81 property_converter_ = base::MakeUnique<aura::PropertyConverter>(); 81 property_converter_ = base::MakeUnique<aura::PropertyConverter>();
82 property_converter_->RegisterProperty( 82 property_converter_->RegisterProperty(
83 wm::kShadowElevationKey, 83 wm::kShadowElevationKey,
84 ui::mojom::WindowManager::kShadowElevation_Property); 84 ui::mojom::WindowManager::kShadowElevation_Property,
85 base::Bind(&wm::IsValidShadowElevation));
85 86
86 if (create_wm_state) 87 if (create_wm_state)
87 wm_state_ = base::MakeUnique<wm::WMState>(); 88 wm_state_ = base::MakeUnique<wm::WMState>();
88 89
89 discardable_memory::mojom::DiscardableSharedMemoryManagerPtr manager_ptr; 90 discardable_memory::mojom::DiscardableSharedMemoryManagerPtr manager_ptr;
90 connector->BindInterface(ui::mojom::kServiceName, &manager_ptr); 91 connector->BindInterface(ui::mojom::kServiceName, &manager_ptr);
91 92
92 discardable_shared_memory_manager_ = base::MakeUnique< 93 discardable_shared_memory_manager_ = base::MakeUnique<
93 discardable_memory::ClientDiscardableSharedMemoryManager>( 94 discardable_memory::ClientDiscardableSharedMemoryManager>(
94 std::move(manager_ptr), io_task_runner); 95 std::move(manager_ptr), io_task_runner);
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 return root->GetTopWindowContainingPoint(relative_point); 295 return root->GetTopWindowContainingPoint(relative_point);
295 } 296 }
296 return nullptr; 297 return nullptr;
297 } 298 }
298 299
299 std::unique_ptr<OSExchangeData::Provider> MusClient::BuildProvider() { 300 std::unique_ptr<OSExchangeData::Provider> MusClient::BuildProvider() {
300 return base::MakeUnique<aura::OSExchangeDataProviderMus>(); 301 return base::MakeUnique<aura::OSExchangeDataProviderMus>();
301 } 302 }
302 303
303 } // namespace views 304 } // namespace views
OLDNEW
« no previous file with comments | « ui/aura/mus/window_tree_client_unittest.cc ('k') | ui/wm/core/shadow_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698