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

Side by Side Diff: ui/display/manager/forwarding_display_delegate.h

Issue 2838613002: Allow ForwardingDelegate to have a null delegate (Closed)
Patch Set: comment 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
« no previous file with comments | « no previous file | ui/display/manager/forwarding_display_delegate.cc » ('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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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_FORWARDING_DISPLAY_DELEGATE_H_ 5 #ifndef UI_DISPLAY_MANAGER_FORWARDING_DISPLAY_DELEGATE_H_
6 #define UI_DISPLAY_MANAGER_FORWARDING_DISPLAY_DELEGATE_H_ 6 #define UI_DISPLAY_MANAGER_FORWARDING_DISPLAY_DELEGATE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 // display::mojom::NativeDisplayObserver: 68 // display::mojom::NativeDisplayObserver:
69 void OnConfigurationChanged() override; 69 void OnConfigurationChanged() override;
70 70
71 private: 71 private:
72 // Stores display snapshots and forards them to |callback|. 72 // Stores display snapshots and forards them to |callback|.
73 void StoreAndForwardDisplays( 73 void StoreAndForwardDisplays(
74 const GetDisplaysCallback& callback, 74 const GetDisplaysCallback& callback,
75 std::vector<std::unique_ptr<DisplaySnapshotMojo>> snapshots); 75 std::vector<std::unique_ptr<DisplaySnapshotMojo>> snapshots);
76 76
77 // NOTE: this may be null in tests.
77 mojom::NativeDisplayDelegatePtr delegate_; 78 mojom::NativeDisplayDelegatePtr delegate_;
78 mojo::Binding<mojom::NativeDisplayObserver> binding_; 79 mojo::Binding<mojom::NativeDisplayObserver> binding_;
79 80
80 // Display snapshots are owned here but accessed via raw pointers elsewhere. 81 // Display snapshots are owned here but accessed via raw pointers elsewhere.
81 // Call OnDisplaySnapshotsInvalidated() on observers before invalidating them. 82 // Call OnDisplaySnapshotsInvalidated() on observers before invalidating them.
82 std::vector<std::unique_ptr<DisplaySnapshotMojo>> snapshots_; 83 std::vector<std::unique_ptr<DisplaySnapshotMojo>> snapshots_;
83 84
84 base::ObserverList<display::NativeDisplayObserver> observers_; 85 base::ObserverList<display::NativeDisplayObserver> observers_;
85 86
86 DISALLOW_COPY_AND_ASSIGN(ForwardingDisplayDelegate); 87 DISALLOW_COPY_AND_ASSIGN(ForwardingDisplayDelegate);
87 }; 88 };
88 89
89 } // namespace display 90 } // namespace display
90 91
91 #endif // UI_DISPLAY_MANAGER_FORWARDING_DISPLAY_DELEGATE_H_ 92 #endif // UI_DISPLAY_MANAGER_FORWARDING_DISPLAY_DELEGATE_H_
OLDNEW
« no previous file with comments | « no previous file | ui/display/manager/forwarding_display_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698