OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 // This has to be before any other includes, else default is picked up. | 5 // This has to be before any other includes, else default is picked up. |
6 // See base/logging for details on this. | 6 // See base/logging for details on this. |
7 #define NOTIMPLEMENTED_POLICY 5 | 7 #define NOTIMPLEMENTED_POLICY 5 |
8 | 8 |
9 #include "ui/views/mus/screen_mus.h" | 9 #include "ui/views/mus/screen_mus.h" |
10 | 10 |
(...skipping 23 matching lines...) Expand all Loading... |
34 namespace views { | 34 namespace views { |
35 | 35 |
36 ScreenMus::ScreenMus(ScreenMusDelegate* delegate) | 36 ScreenMus::ScreenMus(ScreenMusDelegate* delegate) |
37 : delegate_(delegate), | 37 : delegate_(delegate), |
38 display_manager_observer_binding_(this) { | 38 display_manager_observer_binding_(this) { |
39 } | 39 } |
40 | 40 |
41 ScreenMus::~ScreenMus() {} | 41 ScreenMus::~ScreenMus() {} |
42 | 42 |
43 void ScreenMus::Init(shell::Connector* connector) { | 43 void ScreenMus::Init(shell::Connector* connector) { |
44 connector->ConnectToInterface("mojo:ui", &display_manager_); | 44 connector->ConnectToInterface("service:ui", &display_manager_); |
45 | 45 |
46 display_manager_->AddObserver( | 46 display_manager_->AddObserver( |
47 display_manager_observer_binding_.CreateInterfacePtrAndBind()); | 47 display_manager_observer_binding_.CreateInterfacePtrAndBind()); |
48 | 48 |
49 // We need the set of displays before we can continue. Wait for it. | 49 // We need the set of displays before we can continue. Wait for it. |
50 // | 50 // |
51 // TODO(rockot): Do something better here. This should not have to block tasks | 51 // TODO(rockot): Do something better here. This should not have to block tasks |
52 // from running on the calling thread. http://crbug.com/594852. | 52 // from running on the calling thread. http://crbug.com/594852. |
53 bool success = display_manager_observer_binding_.WaitForIncomingMethodCall(); | 53 bool success = display_manager_observer_binding_.WaitForIncomingMethodCall(); |
54 | 54 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 delegate_->OnWindowManagerFrameValuesChanged(); | 116 delegate_->OnWindowManagerFrameValuesChanged(); |
117 } | 117 } |
118 } | 118 } |
119 } | 119 } |
120 | 120 |
121 void ScreenMus::OnDisplayRemoved(int64_t id) { | 121 void ScreenMus::OnDisplayRemoved(int64_t id) { |
122 display_list()->RemoveDisplay(id); | 122 display_list()->RemoveDisplay(id); |
123 } | 123 } |
124 | 124 |
125 } // namespace views | 125 } // namespace views |
OLD | NEW |