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

Side by Side Diff: ui/aura/mus/window_port_mus.cc

Issue 2693823004: aura-mus: Implement DesktopWindowTreeHostMus::SetOpacity(). (Closed)
Patch Set: Removed the comments in WindowPortMus::SetOpacityFromServer 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 | « chrome/app/mash/BUILD.gn ('k') | ui/aura/mus/window_tree_client.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/aura/mus/window_port_mus.h" 5 #include "ui/aura/mus/window_port_mus.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "ui/aura/client/aura_constants.h" 8 #include "ui/aura/client/aura_constants.h"
9 #include "ui/aura/client/transient_window_client.h" 9 #include "ui/aura/client/transient_window_client.h"
10 #include "ui/aura/mus/client_surface_embedder.h" 10 #include "ui/aura/mus/client_surface_embedder.h"
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 ServerChangeData data; 217 ServerChangeData data;
218 data.visible = visible; 218 data.visible = visible;
219 ScopedServerChange change(this, ServerChangeType::VISIBLE, data); 219 ScopedServerChange change(this, ServerChangeType::VISIBLE, data);
220 if (visible) 220 if (visible)
221 window_->Show(); 221 window_->Show();
222 else 222 else
223 window_->Hide(); 223 window_->Hide();
224 } 224 }
225 225
226 void WindowPortMus::SetOpacityFromServer(float opacity) { 226 void WindowPortMus::SetOpacityFromServer(float opacity) {
227 // TODO(sky): route to server.
228 // Changes to opacity don't make it back to the server.
229 window_->layer()->SetOpacity(opacity); 227 window_->layer()->SetOpacity(opacity);
230 } 228 }
231 229
232 void WindowPortMus::SetPredefinedCursorFromServer(ui::mojom::Cursor cursor) { 230 void WindowPortMus::SetPredefinedCursorFromServer(ui::mojom::Cursor cursor) {
233 // As this does nothing more than set the cursor we don't need to use 231 // As this does nothing more than set the cursor we don't need to use
234 // ServerChange. 232 // ServerChange.
235 predefined_cursor_ = cursor; 233 predefined_cursor_ = cursor;
236 } 234 }
237 235
238 void WindowPortMus::SetPropertyFromServer( 236 void WindowPortMus::SetPropertyFromServer(
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 change_data.property_name = 441 change_data.property_name =
444 GetPropertyConverter()->GetTransportNameForPropertyKey(key); 442 GetPropertyConverter()->GetTransportNameForPropertyKey(key);
445 // TODO(sky): investigate to see if we need to compare data. In particular do 443 // TODO(sky): investigate to see if we need to compare data. In particular do
446 // we ever have a case where changing a property cascades into changing the 444 // we ever have a case where changing a property cascades into changing the
447 // same property? 445 // same property?
448 if (!RemoveChangeByTypeAndData(ServerChangeType::PROPERTY, change_data)) 446 if (!RemoveChangeByTypeAndData(ServerChangeType::PROPERTY, change_data))
449 window_tree_client_->OnWindowMusPropertyChanged(this, key, std::move(data)); 447 window_tree_client_->OnWindowMusPropertyChanged(this, key, std::move(data));
450 } 448 }
451 449
452 } // namespace aura 450 } // namespace aura
OLDNEW
« no previous file with comments | « chrome/app/mash/BUILD.gn ('k') | ui/aura/mus/window_tree_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698