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/view_manager/root_view_manager.h" | 5 #include "mojo/services/view_manager/root_view_manager.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/scoped_observer.h" | 8 #include "base/scoped_observer.h" |
9 #include "mojo/public/cpp/application/application_connection.h" | 9 #include "mojo/public/cpp/application/application_connection.h" |
10 #include "mojo/services/view_manager/root_node_manager.h" | 10 #include "mojo/services/view_manager/root_node_manager.h" |
11 #include "mojo/services/view_manager/root_view_manager_delegate.h" | 11 #include "mojo/services/view_manager/root_view_manager_delegate.h" |
12 #include "mojo/services/view_manager/screen_impl.h" | 12 #include "mojo/services/view_manager/screen_impl.h" |
13 #include "mojo/services/view_manager/window_tree_host_impl.h" | 13 #include "mojo/services/view_manager/window_tree_host_impl.h" |
14 #include "ui/aura/client/default_capture_client.h" | 14 #include "ui/aura/client/default_capture_client.h" |
15 #include "ui/aura/client/focus_change_observer.h" | 15 #include "ui/aura/client/focus_change_observer.h" |
16 #include "ui/aura/client/focus_client.h" | 16 #include "ui/aura/client/focus_client.h" |
17 #include "ui/aura/client/window_tree_client.h" | 17 #include "ui/aura/client/window_tree_client.h" |
18 #include "ui/aura/window.h" | 18 #include "ui/aura/window.h" |
19 #include "ui/aura/window_observer.h" | 19 #include "ui/aura/window_observer.h" |
20 | 20 |
21 namespace mojo { | 21 namespace mojo { |
22 namespace view_manager { | |
23 namespace service { | 22 namespace service { |
24 | 23 |
25 // TODO(sky): revisit this, we may need a more sophisticated FocusClient | 24 // TODO(sky): revisit this, we may need a more sophisticated FocusClient |
26 // implementation. | 25 // implementation. |
27 class FocusClientImpl : public aura::client::FocusClient, | 26 class FocusClientImpl : public aura::client::FocusClient, |
28 public aura::WindowObserver { | 27 public aura::WindowObserver { |
29 public: | 28 public: |
30 FocusClientImpl() | 29 FocusClientImpl() |
31 : focused_window_(NULL), | 30 : focused_window_(NULL), |
32 observer_manager_(this) { | 31 observer_manager_(this) { |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 aura::client::SetFocusClient(window_tree_host_->window(), | 158 aura::client::SetFocusClient(window_tree_host_->window(), |
160 focus_client_.get()); | 159 focus_client_.get()); |
161 focus_client_->AddObserver(root_node_manager_); | 160 focus_client_->AddObserver(root_node_manager_); |
162 | 161 |
163 window_tree_host_->Show(); | 162 window_tree_host_->Show(); |
164 | 163 |
165 delegate_->OnRootViewManagerWindowTreeHostCreated(); | 164 delegate_->OnRootViewManagerWindowTreeHostCreated(); |
166 } | 165 } |
167 | 166 |
168 } // namespace service | 167 } // namespace service |
169 } // namespace view_manager | |
170 } // namespace mojo | 168 } // namespace mojo |
OLD | NEW |