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

Unified Diff: ui/views/mus/screen_mus.h

Issue 1984393002: Refactors std::vector<Display> out of ScreenMus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix deps and DEPS 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/mus/screen_mus.h
diff --git a/ui/views/mus/screen_mus.h b/ui/views/mus/screen_mus.h
index 986ae2d8558f4786a77501960d246ede3d476678..ddd9c14077d78f1637b2c0b2feb2e0b62d5d9190 100644
--- a/ui/views/mus/screen_mus.h
+++ b/ui/views/mus/screen_mus.h
@@ -13,6 +13,7 @@
#include "mojo/public/cpp/bindings/binding.h"
#include "ui/display/display.h"
#include "ui/display/screen.h"
+#include "ui/views/mus/display_list.h"
#include "ui/views/mus/mus_export.h"
namespace shell {
@@ -35,8 +36,6 @@ class VIEWS_MUS_EXPORT ScreenMus
void Init(shell::Connector* connector);
private:
- int FindDisplayIndexById(int64_t id) const;
-
// Invoked when a display changed in some weay, including being added.
// If |is_primary| is true, |changed_display| is the primary display.
void ProcessDisplayChanged(const display::Display& changed_display,
@@ -58,17 +57,17 @@ class VIEWS_MUS_EXPORT ScreenMus
void RemoveObserver(display::DisplayObserver* observer) override;
// mus::mojom::DisplayManager:
- void OnDisplays(mojo::Array<mus::mojom::DisplayPtr> displays) override;
- void OnDisplaysChanged(mojo::Array<mus::mojom::DisplayPtr> display) override;
+ void OnDisplays(
+ mojo::Array<mus::mojom::DisplayPtr> transport_displays) override;
+ void OnDisplaysChanged(
+ mojo::Array<mus::mojom::DisplayPtr> transport_displays) override;
void OnDisplayRemoved(int64_t id) override;
ScreenMusDelegate* delegate_; // Can be nullptr.
mus::mojom::DisplayManagerPtr display_manager_;
- std::vector<display::Display> displays_;
- int primary_display_index_;
mojo::Binding<mus::mojom::DisplayManagerObserver>
display_manager_observer_binding_;
- base::ObserverList<display::DisplayObserver> observers_;
+ DisplayList display_list_;
DISALLOW_COPY_AND_ASSIGN(ScreenMus);
};

Powered by Google App Engine
This is Rietveld 408576698