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

Unified Diff: services/ui/ws/user_display_manager_unittest.cc

Issue 2904993003: chromeos: changes how DisplayManagerObservers are notified (Closed)
Patch Set: cleanup 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/ui/ws/user_display_manager.cc ('k') | services/ui/ws/window_manager_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/user_display_manager_unittest.cc
diff --git a/services/ui/ws/user_display_manager_unittest.cc b/services/ui/ws/user_display_manager_unittest.cc
index f2b3417886bc7412dd3477e65cf4022244273fe1..f6bbcf7c8d1fc645c8be9a9efd42ca856848e175 100644
--- a/services/ui/ws/user_display_manager_unittest.cc
+++ b/services/ui/ws/user_display_manager_unittest.cc
@@ -36,52 +36,6 @@ namespace {
const char kUserId1[] = "123";
-class TestDisplayManagerObserver : public mojom::DisplayManagerObserver {
- public:
- TestDisplayManagerObserver() : binding_(this) {}
- ~TestDisplayManagerObserver() override {}
-
- mojom::DisplayManagerObserverPtr GetPtr() {
- return binding_.CreateInterfacePtrAndBind();
- }
-
- std::string GetAndClearObserverCalls() {
- std::string result;
- std::swap(observer_calls_, result);
- return result;
- }
-
- private:
- void AddCall(const std::string& call) {
- if (!observer_calls_.empty())
- observer_calls_ += "\n";
- observer_calls_ += call;
- }
-
- std::string DisplayIdsToString(
- const std::vector<mojom::WsDisplayPtr>& wm_displays) {
- std::string display_ids;
- for (const auto& wm_display : wm_displays) {
- if (!display_ids.empty())
- display_ids += " ";
- display_ids += base::Int64ToString(wm_display->display.id());
- }
- return display_ids;
- }
-
- // mojom::DisplayManagerObserver:
- void OnDisplaysChanged(std::vector<mojom::WsDisplayPtr> displays,
- int64_t primary_display_id,
- int64_t internal_display_id) override {
- AddCall("OnDisplaysChanged " + DisplayIdsToString(displays));
- }
-
- mojo::Binding<mojom::DisplayManagerObserver> binding_;
- std::string observer_calls_;
-
- DISALLOW_COPY_AND_ASSIGN(TestDisplayManagerObserver);
-};
-
mojom::FrameDecorationValuesPtr CreateDefaultFrameDecorationValues() {
return mojom::FrameDecorationValues::New();
}
« no previous file with comments | « services/ui/ws/user_display_manager.cc ('k') | services/ui/ws/window_manager_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698