OLD | NEW |
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 #include "mojo/services/window_manager/window_manager_service_impl.h" | 5 #include "mojo/services/window_manager/window_manager_service_impl.h" |
6 | 6 |
7 #include "mojo/services/window_manager/window_manager_app.h" | 7 #include "mojo/services/window_manager/window_manager_app.h" |
8 | 8 |
9 namespace mojo { | 9 namespace mojo { |
10 | 10 |
11 //////////////////////////////////////////////////////////////////////////////// | 11 //////////////////////////////////////////////////////////////////////////////// |
12 // WindowManagerServiceImpl, public: | 12 // WindowManagerServiceImpl, public: |
13 | 13 |
14 WindowManagerServiceImpl::WindowManagerServiceImpl( | 14 WindowManagerServiceImpl::WindowManagerServiceImpl( |
15 ApplicationConnection* connection, | |
16 WindowManagerApp* window_manager) | 15 WindowManagerApp* window_manager) |
17 : window_manager_(window_manager) { | 16 : window_manager_(window_manager) { |
18 window_manager_->AddConnection(this); | 17 window_manager_->AddConnection(this); |
19 } | 18 } |
20 | 19 |
21 WindowManagerServiceImpl::~WindowManagerServiceImpl() { | 20 WindowManagerServiceImpl::~WindowManagerServiceImpl() { |
22 window_manager_->RemoveConnection(this); | 21 window_manager_->RemoveConnection(this); |
23 } | 22 } |
24 | 23 |
25 void WindowManagerServiceImpl::NotifyReady() { | 24 void WindowManagerServiceImpl::NotifyReady() { |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 | 97 |
99 void WindowManagerServiceImpl::OnConnectionEstablished() { | 98 void WindowManagerServiceImpl::OnConnectionEstablished() { |
100 // If the connection was established prior to the window manager being | 99 // If the connection was established prior to the window manager being |
101 // embedded by the view manager, |window_manager_|'s ViewManagerDelegate | 100 // embedded by the view manager, |window_manager_|'s ViewManagerDelegate |
102 // impl will call NotifyReady() when it is. | 101 // impl will call NotifyReady() when it is. |
103 if (window_manager_->IsReady()) | 102 if (window_manager_->IsReady()) |
104 NotifyReady(); | 103 NotifyReady(); |
105 } | 104 } |
106 | 105 |
107 } // namespace mojo | 106 } // namespace mojo |
OLD | NEW |