OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "services/ui/public/cpp/window_tree_client.h" | 5 #include "services/ui/public/cpp/window_tree_client.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
698 // WindowTreeClient, WindowTreeClient implementation: | 698 // WindowTreeClient, WindowTreeClient implementation: |
699 | 699 |
700 void WindowTreeClient::AddObserver(WindowTreeClientObserver* observer) { | 700 void WindowTreeClient::AddObserver(WindowTreeClientObserver* observer) { |
701 observers_.AddObserver(observer); | 701 observers_.AddObserver(observer); |
702 } | 702 } |
703 | 703 |
704 void WindowTreeClient::RemoveObserver(WindowTreeClientObserver* observer) { | 704 void WindowTreeClient::RemoveObserver(WindowTreeClientObserver* observer) { |
705 observers_.RemoveObserver(observer); | 705 observers_.RemoveObserver(observer); |
706 } | 706 } |
707 | 707 |
708 void WindowTreeClient::SetCanAcceptEvents(Id window_id, | |
709 bool can_accept_events) { | |
710 DCHECK(tree_); | |
711 if (can_accept_events_ != can_accept_events) { | |
712 tree_->SetCanAcceptEvents(window_id, can_accept_events); | |
713 can_accept_events_ = can_accept_events; | |
sadrul
2016/07/12 17:32:33
This is wrong. Some window in a WindowTreeClient m
riajiang
2016/07/12 18:46:40
Done. Moved to ui::Window.
| |
714 } | |
715 } | |
716 | |
708 void WindowTreeClient::OnEmbed(ClientSpecificId client_id, | 717 void WindowTreeClient::OnEmbed(ClientSpecificId client_id, |
709 mojom::WindowDataPtr root_data, | 718 mojom::WindowDataPtr root_data, |
710 mojom::WindowTreePtr tree, | 719 mojom::WindowTreePtr tree, |
711 int64_t display_id, | 720 int64_t display_id, |
712 Id focused_window_id, | 721 Id focused_window_id, |
713 bool drawn) { | 722 bool drawn) { |
714 DCHECK(!tree_ptr_); | 723 DCHECK(!tree_ptr_); |
715 tree_ptr_ = std::move(tree); | 724 tree_ptr_ = std::move(tree); |
716 tree_ptr_.set_connection_error_handler( | 725 tree_ptr_.set_connection_error_handler( |
717 base::Bind(&DeleteWindowTreeClient, this)); | 726 base::Bind(&DeleteWindowTreeClient, this)); |
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1242 Window* window, | 1251 Window* window, |
1243 const gfx::Vector2d& offset, | 1252 const gfx::Vector2d& offset, |
1244 const gfx::Insets& hit_area) { | 1253 const gfx::Insets& hit_area) { |
1245 if (window_manager_internal_client_) { | 1254 if (window_manager_internal_client_) { |
1246 window_manager_internal_client_->SetUnderlaySurfaceOffsetAndExtendedHitArea( | 1255 window_manager_internal_client_->SetUnderlaySurfaceOffsetAndExtendedHitArea( |
1247 server_id(window), offset.x(), offset.y(), hit_area); | 1256 server_id(window), offset.x(), offset.y(), hit_area); |
1248 } | 1257 } |
1249 } | 1258 } |
1250 | 1259 |
1251 } // namespace ui | 1260 } // namespace ui |
OLD | NEW |