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

Side by Side Diff: services/ui/public/cpp/window.cc

Issue 2617403003: Mus: Remove CompositorFrameSinkType (Closed)
Patch Set: Fix some unit tests Created 3 years, 11 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 | « services/ui/public/cpp/window.h ('k') | services/ui/public/cpp/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 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.h" 5 #include "services/ui/public/cpp/window.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 LocalSetPredefinedCursor(cursor_id); 263 LocalSetPredefinedCursor(cursor_id);
264 } 264 }
265 265
266 bool Window::IsDrawn() const { 266 bool Window::IsDrawn() const {
267 if (!visible_) 267 if (!visible_)
268 return false; 268 return false;
269 return parent_ ? parent_->IsDrawn() : parent_drawn_; 269 return parent_ ? parent_->IsDrawn() : parent_drawn_;
270 } 270 }
271 271
272 std::unique_ptr<WindowCompositorFrameSink> Window::RequestCompositorFrameSink( 272 std::unique_ptr<WindowCompositorFrameSink> Window::RequestCompositorFrameSink(
273 mojom::CompositorFrameSinkType type,
274 scoped_refptr<cc::ContextProvider> context_provider, 273 scoped_refptr<cc::ContextProvider> context_provider,
275 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager) { 274 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager) {
276 std::unique_ptr<WindowCompositorFrameSinkBinding> 275 std::unique_ptr<WindowCompositorFrameSinkBinding>
277 compositor_frame_sink_binding; 276 compositor_frame_sink_binding;
278 std::unique_ptr<WindowCompositorFrameSink> compositor_frame_sink = 277 std::unique_ptr<WindowCompositorFrameSink> compositor_frame_sink =
279 WindowCompositorFrameSink::Create(std::move(context_provider), 278 WindowCompositorFrameSink::Create(std::move(context_provider),
280 gpu_memory_buffer_manager, 279 gpu_memory_buffer_manager,
281 &compositor_frame_sink_binding); 280 &compositor_frame_sink_binding);
282 AttachCompositorFrameSink(type, std::move(compositor_frame_sink_binding)); 281 AttachCompositorFrameSink(std::move(compositor_frame_sink_binding));
283 return compositor_frame_sink; 282 return compositor_frame_sink;
284 } 283 }
285 284
286 void Window::AttachCompositorFrameSink( 285 void Window::AttachCompositorFrameSink(
287 mojom::CompositorFrameSinkType type,
288 std::unique_ptr<WindowCompositorFrameSinkBinding> 286 std::unique_ptr<WindowCompositorFrameSinkBinding>
289 compositor_frame_sink_binding) { 287 compositor_frame_sink_binding) {
290 window_tree()->AttachCompositorFrameSink( 288 window_tree()->AttachCompositorFrameSink(
291 server_id_, type, 289 server_id_,
292 std::move(compositor_frame_sink_binding->compositor_frame_sink_request_), 290 std::move(compositor_frame_sink_binding->compositor_frame_sink_request_),
293 mojo::MakeProxy(std::move( 291 mojo::MakeProxy(std::move(
294 compositor_frame_sink_binding->compositor_frame_sink_client_))); 292 compositor_frame_sink_binding->compositor_frame_sink_client_)));
295 } 293 }
296 294
297 void Window::ClearSharedProperty(const std::string& name) { 295 void Window::ClearSharedProperty(const std::string& name) {
298 SetSharedPropertyInternal(name, nullptr); 296 SetSharedPropertyInternal(name, nullptr);
299 } 297 }
300 298
301 bool Window::HasSharedProperty(const std::string& name) const { 299 bool Window::HasSharedProperty(const std::string& name) const {
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after
958 notifier->NotifyWindowReordered(); 956 notifier->NotifyWindowReordered();
959 957
960 return true; 958 return true;
961 } 959 }
962 960
963 // static 961 // static
964 Window** Window::GetStackingTarget(Window* window) { 962 Window** Window::GetStackingTarget(Window* window) {
965 return &window->stacking_target_; 963 return &window->stacking_target_;
966 } 964 }
967 } // namespace ui 965 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/public/cpp/window.h ('k') | services/ui/public/cpp/window_tree_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698