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

Side by Side Diff: ui/views/mus/surface_context_factory.cc

Issue 1995613003: views/mus: Fix some flaky crashes during test teardown. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@views-mus-more-focus-fix
Patch Set: . Created 4 years, 7 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 | « ui/views/mus/surface_binding.cc ('k') | ui/views/test/views_test_base.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/views/mus/surface_context_factory.h" 5 #include "ui/views/mus/surface_context_factory.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "cc/output/output_surface.h" 8 #include "cc/output/output_surface.h"
9 #include "cc/resources/shared_bitmap_manager.h" 9 #include "cc/resources/shared_bitmap_manager.h"
10 #include "cc/surfaces/surface_id_allocator.h" 10 #include "cc/surfaces/surface_id_allocator.h"
(...skipping 21 matching lines...) Expand all
32 mus::Window* window, 32 mus::Window* window,
33 mus::mojom::SurfaceType surface_type) 33 mus::mojom::SurfaceType surface_type)
34 : surface_binding_(connector, window, surface_type), 34 : surface_binding_(connector, window, surface_type),
35 next_surface_id_namespace_(1u) {} 35 next_surface_id_namespace_(1u) {}
36 36
37 SurfaceContextFactory::~SurfaceContextFactory() {} 37 SurfaceContextFactory::~SurfaceContextFactory() {}
38 38
39 void SurfaceContextFactory::CreateOutputSurface( 39 void SurfaceContextFactory::CreateOutputSurface(
40 base::WeakPtr<ui::Compositor> compositor) { 40 base::WeakPtr<ui::Compositor> compositor) {
41 // NOTIMPLEMENTED(); 41 // NOTIMPLEMENTED();
42 compositor->SetOutputSurface(surface_binding_.CreateOutputSurface()); 42 std::unique_ptr<cc::OutputSurface> surface =
43 surface_binding_.CreateOutputSurface();
44 if (surface)
45 compositor->SetOutputSurface(std::move(surface));
43 } 46 }
44 47
45 std::unique_ptr<ui::Reflector> SurfaceContextFactory::CreateReflector( 48 std::unique_ptr<ui::Reflector> SurfaceContextFactory::CreateReflector(
46 ui::Compositor* mirroed_compositor, 49 ui::Compositor* mirroed_compositor,
47 ui::Layer* mirroring_layer) { 50 ui::Layer* mirroring_layer) {
48 // NOTIMPLEMENTED(); 51 // NOTIMPLEMENTED();
49 return base::WrapUnique(new FakeReflector); 52 return base::WrapUnique(new FakeReflector);
50 } 53 }
51 54
52 void SurfaceContextFactory::RemoveReflector(ui::Reflector* reflector) { 55 void SurfaceContextFactory::RemoveReflector(ui::Reflector* reflector) {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 // NOTIMPLEMENTED(); 100 // NOTIMPLEMENTED();
98 return nullptr; 101 return nullptr;
99 } 102 }
100 103
101 void SurfaceContextFactory::ResizeDisplay(ui::Compositor* compositor, 104 void SurfaceContextFactory::ResizeDisplay(ui::Compositor* compositor,
102 const gfx::Size& size) { 105 const gfx::Size& size) {
103 // NOTIMPLEMENTED(); 106 // NOTIMPLEMENTED();
104 } 107 }
105 108
106 } // namespace views 109 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/mus/surface_binding.cc ('k') | ui/views/test/views_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698