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

Side by Side Diff: ui/display/manager/chromeos/test/test_native_display_delegate.h

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
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 #ifndef UI_DISPLAY_MANAGER_CHROMEOS_TEST_TEST_NATIVE_DISPLAY_DELEGATE_H_ 5 #ifndef UI_DISPLAY_MANAGER_CHROMEOS_TEST_TEST_NATIVE_DISPLAY_DELEGATE_H_
6 #define UI_DISPLAY_MANAGER_CHROMEOS_TEST_TEST_NATIVE_DISPLAY_DELEGATE_H_ 6 #define UI_DISPLAY_MANAGER_CHROMEOS_TEST_TEST_NATIVE_DISPLAY_DELEGATE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/observer_list.h"
13 #include "ui/display/manager/chromeos/test/action_logger.h" 14 #include "ui/display/manager/chromeos/test/action_logger.h"
14 #include "ui/display/manager/chromeos/test/action_logger_util.h" 15 #include "ui/display/manager/chromeos/test/action_logger_util.h"
15 #include "ui/display/types/native_display_delegate.h" 16 #include "ui/display/types/native_display_delegate.h"
16 17
17 namespace ui { 18 namespace ui {
18 19
19 class ActionLogger; 20 class ActionLogger;
20 class DisplaySnapshot; 21 class DisplaySnapshot;
22 class NativeDisplayObserver;
21 23
22 namespace test { 24 namespace test {
23 25
24 class TestNativeDisplayDelegate : public NativeDisplayDelegate { 26 class TestNativeDisplayDelegate : public NativeDisplayDelegate {
25 public: 27 public:
26 // Ownership of |log| remains with the caller. 28 // Ownership of |log| remains with the caller.
27 explicit TestNativeDisplayDelegate(ActionLogger* log); 29 explicit TestNativeDisplayDelegate(ActionLogger* log);
28 ~TestNativeDisplayDelegate() override; 30 ~TestNativeDisplayDelegate() override;
29 31
30 const std::vector<DisplaySnapshot*>& outputs() const { return outputs_; } 32 const std::vector<DisplaySnapshot*>& outputs() const { return outputs_; }
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 bool set_hdcp_expectation_; 106 bool set_hdcp_expectation_;
105 107
106 // Result value of GetHDCPState(). 108 // Result value of GetHDCPState().
107 HDCPState hdcp_state_; 109 HDCPState hdcp_state_;
108 110
109 // If true, the callbacks are posted on the message loop. 111 // If true, the callbacks are posted on the message loop.
110 bool run_async_; 112 bool run_async_;
111 113
112 ActionLogger* log_; // Not owned. 114 ActionLogger* log_; // Not owned.
113 115
116 base::ObserverList<NativeDisplayObserver> observers_;
117
114 DISALLOW_COPY_AND_ASSIGN(TestNativeDisplayDelegate); 118 DISALLOW_COPY_AND_ASSIGN(TestNativeDisplayDelegate);
115 }; 119 };
116 120
117 } // namespace test 121 } // namespace test
118 } // namespace ui 122 } // namespace ui
119 123
120 #endif // UI_DISPLAY_MANAGER_CHROMEOS_TEST_TEST_NATIVE_DISPLAY_DELEGATE_H_ 124 #endif // UI_DISPLAY_MANAGER_CHROMEOS_TEST_TEST_NATIVE_DISPLAY_DELEGATE_H_
OLDNEW
« no previous file with comments | « ui/display/manager/chromeos/display_configurator.cc ('k') | ui/display/manager/chromeos/test/test_native_display_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698