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

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

Issue 2919523004: Surface synchronization: Don't gutter translucent windows (Closed)
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 unified diff | Download patch
« no previous file with comments | « ui/aura/mus/client_surface_embedder.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/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 164
165 std::map<std::string, TransportType> properties = init_params.mus_properties; 165 std::map<std::string, TransportType> properties = init_params.mus_properties;
166 166
167 // Widget::InitParams::Type matches ui::mojom::WindowType. 167 // Widget::InitParams::Type matches ui::mojom::WindowType.
168 properties[WindowManager::kWindowType_InitProperty] = 168 properties[WindowManager::kWindowType_InitProperty] =
169 mojo::ConvertTo<TransportType>(static_cast<int32_t>(init_params.type)); 169 mojo::ConvertTo<TransportType>(static_cast<int32_t>(init_params.type));
170 170
171 properties[WindowManager::kFocusable_InitProperty] = 171 properties[WindowManager::kFocusable_InitProperty] =
172 mojo::ConvertTo<TransportType>(init_params.CanActivate()); 172 mojo::ConvertTo<TransportType>(init_params.CanActivate());
173 173
174 properties[WindowManager::kTranslucent_InitProperty] =
175 mojo::ConvertTo<TransportType>(init_params.opacity ==
176 Widget::InitParams::TRANSLUCENT_WINDOW);
177
174 if (!init_params.bounds.IsEmpty()) { 178 if (!init_params.bounds.IsEmpty()) {
175 properties[WindowManager::kBounds_InitProperty] = 179 properties[WindowManager::kBounds_InitProperty] =
176 mojo::ConvertTo<TransportType>(init_params.bounds); 180 mojo::ConvertTo<TransportType>(init_params.bounds);
177 } 181 }
178 182
179 if (!init_params.name.empty()) { 183 if (!init_params.name.empty()) {
180 properties[WindowManager::kName_Property] = 184 properties[WindowManager::kName_Property] =
181 mojo::ConvertTo<TransportType>(init_params.name); 185 mojo::ConvertTo<TransportType>(init_params.name);
182 } 186 }
183 187
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 // TODO: this likely gets z-order wrong. http://crbug.com/663606. 323 // TODO: this likely gets z-order wrong. http://crbug.com/663606.
320 gfx::Point relative_point(point); 324 gfx::Point relative_point(point);
321 window_tree_host->ConvertScreenInPixelsToDIP(&relative_point); 325 window_tree_host->ConvertScreenInPixelsToDIP(&relative_point);
322 if (gfx::Rect(root->bounds().size()).Contains(relative_point)) 326 if (gfx::Rect(root->bounds().size()).Contains(relative_point))
323 return root->GetEventHandlerForPoint(relative_point); 327 return root->GetEventHandlerForPoint(relative_point);
324 } 328 }
325 return nullptr; 329 return nullptr;
326 } 330 }
327 331
328 } // namespace views 332 } // namespace views
OLDNEW
« no previous file with comments | « ui/aura/mus/client_surface_embedder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698