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

Side by Side Diff: components/viz/frame_sinks/mojo_frame_sink_manager.h

Issue 2880023002: cc::SurfaceDependencyTracker should not crash when a Display goes away (Closed)
Patch Set: StrictMock => NiceMock Created 3 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
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 #ifndef COMPONENTS_VIZ_FRAME_SINKS_MOJO_FRAME_SINK_MANAGER_H_ 5 #ifndef COMPONENTS_VIZ_FRAME_SINKS_MOJO_FRAME_SINK_MANAGER_H_
6 #define COMPONENTS_VIZ_FRAME_SINKS_MOJO_FRAME_SINK_MANAGER_H_ 6 #define COMPONENTS_VIZ_FRAME_SINKS_MOJO_FRAME_SINK_MANAGER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 void OnClientConnectionLost(const cc::FrameSinkId& frame_sink_id, 87 void OnClientConnectionLost(const cc::FrameSinkId& frame_sink_id,
88 bool destroy_compositor_frame_sink) override; 88 bool destroy_compositor_frame_sink) override;
89 void OnPrivateConnectionLost(const cc::FrameSinkId& frame_sink_id, 89 void OnPrivateConnectionLost(const cc::FrameSinkId& frame_sink_id,
90 bool destroy_compositor_frame_sink) override; 90 bool destroy_compositor_frame_sink) override;
91 91
92 // SurfaceManager should be the first object constructed and the last object 92 // SurfaceManager should be the first object constructed and the last object
93 // destroyed in order to ensure that all other objects that depend on it have 93 // destroyed in order to ensure that all other objects that depend on it have
94 // access to a valid pointer for the entirety of their lifetimes. 94 // access to a valid pointer for the entirety of their lifetimes.
95 cc::SurfaceManager manager_; 95 cc::SurfaceManager manager_;
96 96
97 std::unique_ptr<cc::BeginFrameSource> begin_frame_source_;
98 std::unique_ptr<cc::SurfaceDependencyTracker> dependency_tracker_;
99
97 // Provides a cc::Display for CreateRootCompositorFrameSink(). 100 // Provides a cc::Display for CreateRootCompositorFrameSink().
98 DisplayProvider* const display_provider_; 101 DisplayProvider* const display_provider_;
99 102
100 std::unordered_map<cc::FrameSinkId, 103 std::unordered_map<cc::FrameSinkId,
101 std::unique_ptr<cc::mojom::MojoCompositorFrameSink>, 104 std::unique_ptr<cc::mojom::MojoCompositorFrameSink>,
102 cc::FrameSinkIdHash> 105 cc::FrameSinkIdHash>
103 compositor_frame_sinks_; 106 compositor_frame_sinks_;
104 107
105 base::ThreadChecker thread_checker_; 108 base::ThreadChecker thread_checker_;
106 109
107 cc::mojom::FrameSinkManagerClientPtr client_; 110 cc::mojom::FrameSinkManagerClientPtr client_;
108 mojo::Binding<cc::mojom::FrameSinkManager> binding_; 111 mojo::Binding<cc::mojom::FrameSinkManager> binding_;
109 112
110 DISALLOW_COPY_AND_ASSIGN(MojoFrameSinkManager); 113 DISALLOW_COPY_AND_ASSIGN(MojoFrameSinkManager);
111 }; 114 };
112 115
113 } // namespace viz 116 } // namespace viz
114 117
115 #endif // COMPONENTS_VIZ_FRAME_SINKS_MOJO_FRAME_SINK_MANAGER_H_ 118 #endif // COMPONENTS_VIZ_FRAME_SINKS_MOJO_FRAME_SINK_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698