| 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/aura/screen_mojo.h" | |
| 10 #include "mojo/public/cpp/application/connect.h" | 9 #include "mojo/public/cpp/application/connect.h" |
| 11 #include "mojo/services/view_manager/root_node_manager.h" | 10 #include "mojo/services/view_manager/root_node_manager.h" |
| 12 #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" |
| 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 { | 22 namespace view_manager { |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 | 107 |
| 108 DISALLOW_COPY_AND_ASSIGN(WindowTreeClientImpl); | 108 DISALLOW_COPY_AND_ASSIGN(WindowTreeClientImpl); |
| 109 }; | 109 }; |
| 110 | 110 |
| 111 RootViewManager::RootViewManager(ServiceProvider* service_provider, | 111 RootViewManager::RootViewManager(ServiceProvider* service_provider, |
| 112 RootNodeManager* root_node, | 112 RootNodeManager* root_node, |
| 113 RootViewManagerDelegate* delegate) | 113 RootViewManagerDelegate* delegate) |
| 114 : delegate_(delegate), | 114 : delegate_(delegate), |
| 115 root_node_manager_(root_node), | 115 root_node_manager_(root_node), |
| 116 in_setup_(false) { | 116 in_setup_(false) { |
| 117 screen_.reset(ScreenMojo::Create()); | 117 screen_.reset(ScreenImpl::Create()); |
| 118 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_.get()); | 118 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_.get()); |
| 119 NativeViewportPtr viewport; | 119 NativeViewportPtr viewport; |
| 120 ConnectToService(service_provider, | 120 ConnectToService(service_provider, |
| 121 "mojo:mojo_native_viewport_service", | 121 "mojo:mojo_native_viewport_service", |
| 122 &viewport); | 122 &viewport); |
| 123 window_tree_host_.reset(new WindowTreeHostImpl( | 123 window_tree_host_.reset(new WindowTreeHostImpl( |
| 124 viewport.Pass(), | 124 viewport.Pass(), |
| 125 gfx::Rect(800, 600), | 125 gfx::Rect(800, 600), |
| 126 base::Bind(&RootViewManager::OnCompositorCreated, | 126 base::Bind(&RootViewManager::OnCompositorCreated, |
| 127 base::Unretained(this)))); | 127 base::Unretained(this)))); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 150 focus_client_.get()); | 150 focus_client_.get()); |
| 151 | 151 |
| 152 window_tree_host_->Show(); | 152 window_tree_host_->Show(); |
| 153 | 153 |
| 154 delegate_->OnRootViewManagerWindowTreeHostCreated(); | 154 delegate_->OnRootViewManagerWindowTreeHostCreated(); |
| 155 } | 155 } |
| 156 | 156 |
| 157 } // namespace service | 157 } // namespace service |
| 158 } // namespace view_manager | 158 } // namespace view_manager |
| 159 } // namespace mojo | 159 } // namespace mojo |
| OLD | NEW |