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

Side by Side Diff: ui/ozone/platform/drm/host/drm_native_display_delegate.cc

Issue 2571543002: Fix use after free for cached_displays_. (Closed)
Patch Set: Add invalidate to tests. Created 4 years 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/ozone/platform/drm/host/drm_native_display_delegate.h ('k') | no next file » | 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 "ui/ozone/platform/drm/host/drm_native_display_delegate.h" 5 #include "ui/ozone/platform/drm/host/drm_native_display_delegate.h"
6 6
7 #include "ui/display/types/display_snapshot.h" 7 #include "ui/display/types/display_snapshot.h"
8 #include "ui/display/types/native_display_observer.h" 8 #include "ui/display/types/native_display_observer.h"
9 #include "ui/ozone/platform/drm/host/drm_display_host.h" 9 #include "ui/ozone/platform/drm/host/drm_display_host.h"
10 #include "ui/ozone/platform/drm/host/drm_display_host_manager.h" 10 #include "ui/ozone/platform/drm/host/drm_display_host_manager.h"
11 11
12 namespace ui { 12 namespace ui {
13 13
14 DrmNativeDisplayDelegate::DrmNativeDisplayDelegate( 14 DrmNativeDisplayDelegate::DrmNativeDisplayDelegate(
15 DrmDisplayHostManager* display_manager) 15 DrmDisplayHostManager* display_manager)
16 : display_manager_(display_manager) { 16 : display_manager_(display_manager) {
17 } 17 }
18 18
19 DrmNativeDisplayDelegate::~DrmNativeDisplayDelegate() { 19 DrmNativeDisplayDelegate::~DrmNativeDisplayDelegate() {
20 display_manager_->RemoveDelegate(this); 20 display_manager_->RemoveDelegate(this);
21 } 21 }
22 22
23 void DrmNativeDisplayDelegate::OnConfigurationChanged() { 23 void DrmNativeDisplayDelegate::OnConfigurationChanged() {
24 for (NativeDisplayObserver& observer : observers_) 24 for (NativeDisplayObserver& observer : observers_)
25 observer.OnConfigurationChanged(); 25 observer.OnConfigurationChanged();
26 } 26 }
27 27
28 void DrmNativeDisplayDelegate::OnDisplaySnapshotsInvalidated() {
29 for (NativeDisplayObserver& observer : observers_)
30 observer.OnDisplaySnapshotsInvalidated();
31 }
32
28 void DrmNativeDisplayDelegate::Initialize() { 33 void DrmNativeDisplayDelegate::Initialize() {
29 display_manager_->AddDelegate(this); 34 display_manager_->AddDelegate(this);
30 } 35 }
31 36
32 void DrmNativeDisplayDelegate::GrabServer() { 37 void DrmNativeDisplayDelegate::GrabServer() {
33 } 38 }
34 39
35 void DrmNativeDisplayDelegate::UngrabServer() { 40 void DrmNativeDisplayDelegate::UngrabServer() {
36 } 41 }
37 42
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 void DrmNativeDisplayDelegate::RemoveObserver(NativeDisplayObserver* observer) { 124 void DrmNativeDisplayDelegate::RemoveObserver(NativeDisplayObserver* observer) {
120 observers_.RemoveObserver(observer); 125 observers_.RemoveObserver(observer);
121 } 126 }
122 127
123 display::FakeDisplayController* 128 display::FakeDisplayController*
124 DrmNativeDisplayDelegate::GetFakeDisplayController() { 129 DrmNativeDisplayDelegate::GetFakeDisplayController() {
125 return nullptr; 130 return nullptr;
126 } 131 }
127 132
128 } // namespace ui 133 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/host/drm_native_display_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698