OLD | NEW |
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 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
513 change_data.property_name = | 513 change_data.property_name = |
514 GetPropertyConverter()->GetTransportNameForPropertyKey(key); | 514 GetPropertyConverter()->GetTransportNameForPropertyKey(key); |
515 // TODO(sky): investigate to see if we need to compare data. In particular do | 515 // TODO(sky): investigate to see if we need to compare data. In particular do |
516 // we ever have a case where changing a property cascades into changing the | 516 // we ever have a case where changing a property cascades into changing the |
517 // same property? | 517 // same property? |
518 if (!RemoveChangeByTypeAndData(ServerChangeType::PROPERTY, change_data)) | 518 if (!RemoveChangeByTypeAndData(ServerChangeType::PROPERTY, change_data)) |
519 window_tree_client_->OnWindowMusPropertyChanged(this, key, old_value, | 519 window_tree_client_->OnWindowMusPropertyChanged(this, key, old_value, |
520 std::move(data)); | 520 std::move(data)); |
521 } | 521 } |
522 | 522 |
| 523 std::unique_ptr<cc::CompositorFrameSink> |
| 524 WindowPortMus::CreateCompositorFrameSink() { |
| 525 // TODO(penghuang): Implement it for Mus. |
| 526 return nullptr; |
| 527 } |
| 528 |
| 529 cc::SurfaceId WindowPortMus::GetSurfaceId() const { |
| 530 // TODO(penghuang): Implement it for Mus. |
| 531 return cc::SurfaceId(); |
| 532 } |
| 533 |
523 void WindowPortMus::UpdatePrimarySurfaceInfo() { | 534 void WindowPortMus::UpdatePrimarySurfaceInfo() { |
524 bool embeds_surface = window_mus_type() == WindowMusType::TOP_LEVEL_IN_WM || | 535 bool embeds_surface = window_mus_type() == WindowMusType::TOP_LEVEL_IN_WM || |
525 window_mus_type() == WindowMusType::EMBED_IN_OWNER; | 536 window_mus_type() == WindowMusType::EMBED_IN_OWNER; |
526 if (!embeds_surface || !window_tree_client_->enable_surface_synchronization_) | 537 if (!embeds_surface || !window_tree_client_->enable_surface_synchronization_) |
527 return; | 538 return; |
528 | 539 |
529 if (!frame_sink_id_.is_valid() || !local_surface_id_.is_valid()) | 540 if (!frame_sink_id_.is_valid() || !local_surface_id_.is_valid()) |
530 return; | 541 return; |
531 | 542 |
532 SetPrimarySurfaceInfo( | 543 SetPrimarySurfaceInfo( |
(...skipping 10 matching lines...) Expand all Loading... |
543 if (!client_surface_embedder_) { | 554 if (!client_surface_embedder_) { |
544 client_surface_embedder_ = base::MakeUnique<ClientSurfaceEmbedder>( | 555 client_surface_embedder_ = base::MakeUnique<ClientSurfaceEmbedder>( |
545 window_, window_tree_client_->normal_client_area_insets_); | 556 window_, window_tree_client_->normal_client_area_insets_); |
546 } | 557 } |
547 | 558 |
548 client_surface_embedder_->SetPrimarySurfaceInfo(primary_surface_info_); | 559 client_surface_embedder_->SetPrimarySurfaceInfo(primary_surface_info_); |
549 client_surface_embedder_->SetFallbackSurfaceInfo(fallback_surface_info_); | 560 client_surface_embedder_->SetFallbackSurfaceInfo(fallback_surface_info_); |
550 } | 561 } |
551 | 562 |
552 } // namespace aura | 563 } // namespace aura |
OLD | NEW |