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

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

Issue 2650833002: Set focusibility correctly when initializing a window in mus+ash. (Closed)
Patch Set: addressed feedback. Created 3 years, 10 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/test/aura_test_base.cc ('k') | ui/views/widget/widget.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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 const Widget::InitParams& init_params) { 144 const Widget::InitParams& init_params) {
145 using PrimitiveType = aura::PropertyConverter::PrimitiveType; 145 using PrimitiveType = aura::PropertyConverter::PrimitiveType;
146 std::map<std::string, std::vector<uint8_t>> properties = 146 std::map<std::string, std::vector<uint8_t>> properties =
147 init_params.mus_properties; 147 init_params.mus_properties;
148 148
149 // Widget::InitParams::Type matches ui::mojom::WindowType. 149 // Widget::InitParams::Type matches ui::mojom::WindowType.
150 properties[ui::mojom::WindowManager::kWindowType_InitProperty] = 150 properties[ui::mojom::WindowManager::kWindowType_InitProperty] =
151 mojo::ConvertTo<std::vector<uint8_t>>( 151 mojo::ConvertTo<std::vector<uint8_t>>(
152 static_cast<int32_t>(init_params.type)); 152 static_cast<int32_t>(init_params.type));
153 153
154 properties[ui::mojom::WindowManager::kFocusable_InitProperty] =
155 mojo::ConvertTo<std::vector<uint8_t>>(init_params.CanActivate());
156
154 if (!init_params.bounds.IsEmpty()) { 157 if (!init_params.bounds.IsEmpty()) {
155 properties[ui::mojom::WindowManager::kBounds_InitProperty] = 158 properties[ui::mojom::WindowManager::kBounds_InitProperty] =
156 mojo::ConvertTo<std::vector<uint8_t>>(init_params.bounds); 159 mojo::ConvertTo<std::vector<uint8_t>>(init_params.bounds);
157 } 160 }
158 161
159 if (!init_params.name.empty()) { 162 if (!init_params.name.empty()) {
160 properties[ui::mojom::WindowManager::kName_Property] = 163 properties[ui::mojom::WindowManager::kName_Property] =
161 mojo::ConvertTo<std::vector<uint8_t>>(init_params.name); 164 mojo::ConvertTo<std::vector<uint8_t>>(init_params.name);
162 } 165 }
163 166
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 return root->GetTopWindowContainingPoint(relative_point); 272 return root->GetTopWindowContainingPoint(relative_point);
270 } 273 }
271 return nullptr; 274 return nullptr;
272 } 275 }
273 276
274 std::unique_ptr<OSExchangeData::Provider> MusClient::BuildProvider() { 277 std::unique_ptr<OSExchangeData::Provider> MusClient::BuildProvider() {
275 return base::MakeUnique<aura::OSExchangeDataProviderMus>(); 278 return base::MakeUnique<aura::OSExchangeDataProviderMus>();
276 } 279 }
277 280
278 } // namespace views 281 } // namespace views
OLDNEW
« no previous file with comments | « ui/aura/test/aura_test_base.cc ('k') | ui/views/widget/widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698