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/ws/window_tree.h" | 5 #include "services/ui/ws/window_tree.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 void WindowTree::ConfigureWindowManager() { | 123 void WindowTree::ConfigureWindowManager() { |
124 // ConfigureWindowManager() should be called early on, before anything | 124 // ConfigureWindowManager() should be called early on, before anything |
125 // else. |waiting_for_top_level_window_info_| must be null as if | 125 // else. |waiting_for_top_level_window_info_| must be null as if |
126 // |waiting_for_top_level_window_info_| is non-null it means we're about to | 126 // |waiting_for_top_level_window_info_| is non-null it means we're about to |
127 // create an associated interface, which doesn't work with pause/resume. | 127 // create an associated interface, which doesn't work with pause/resume. |
128 // TODO(sky): DCHECK temporary until 626869 is sorted out. | 128 // TODO(sky): DCHECK temporary until 626869 is sorted out. |
129 DCHECK(!waiting_for_top_level_window_info_); | 129 DCHECK(!waiting_for_top_level_window_info_); |
130 DCHECK(!window_manager_internal_); | 130 DCHECK(!window_manager_internal_); |
131 window_manager_internal_ = binding_->GetWindowManager(); | 131 window_manager_internal_ = binding_->GetWindowManager(); |
132 window_manager_internal_->OnConnect(id_); | 132 window_manager_internal_->OnConnect(id_); |
133 window_manager_state_.reset(new WindowManagerState(this)); | 133 window_manager_state_ = base::MakeUnique<WindowManagerState>(this); |
134 } | 134 } |
135 | 135 |
136 const ServerWindow* WindowTree::GetWindow(const WindowId& id) const { | 136 const ServerWindow* WindowTree::GetWindow(const WindowId& id) const { |
137 if (id_ == id.client_id) { | 137 if (id_ == id.client_id) { |
138 auto iter = created_window_map_.find(id); | 138 auto iter = created_window_map_.find(id); |
139 return iter == created_window_map_.end() ? nullptr : iter->second; | 139 return iter == created_window_map_.end() ? nullptr : iter->second; |
140 } | 140 } |
141 return window_server_->GetWindow(id); | 141 return window_server_->GetWindow(id); |
142 } | 142 } |
143 | 143 |
(...skipping 1763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1907 client()->OnCompleteDrop(client_window_id.id, event_flags, cursor_offset, | 1907 client()->OnCompleteDrop(client_window_id.id, event_flags, cursor_offset, |
1908 effect_bitmask, callback); | 1908 effect_bitmask, callback); |
1909 } | 1909 } |
1910 | 1910 |
1911 void WindowTree::PerformOnDragDropDone() { | 1911 void WindowTree::PerformOnDragDropDone() { |
1912 client()->OnDragDropDone(); | 1912 client()->OnDragDropDone(); |
1913 } | 1913 } |
1914 | 1914 |
1915 } // namespace ws | 1915 } // namespace ws |
1916 } // namespace ui | 1916 } // namespace ui |
OLD | NEW |