OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "ash/display/mirror_window_controller.h" | 5 #include "ash/display/mirror_window_controller.h" |
6 | 6 |
7 #if defined(USE_X11) | 7 #if defined(USE_X11) |
8 #include <X11/Xlib.h> | 8 #include <X11/Xlib.h> |
9 #include <X11/extensions/XInput2.h> | 9 #include <X11/extensions/XInput2.h> |
10 | 10 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 host->InitHost(); | 102 host->InitHost(); |
103 #if defined(USE_X11) | 103 #if defined(USE_X11) |
104 DisableInput(host->GetAcceleratedWidget()); | 104 DisableInput(host->GetAcceleratedWidget()); |
105 #endif | 105 #endif |
106 | 106 |
107 aura::client::SetCaptureClient(host->window(), new NoneCaptureClient()); | 107 aura::client::SetCaptureClient(host->window(), new NoneCaptureClient()); |
108 host->Show(); | 108 host->Show(); |
109 | 109 |
110 // TODO(oshima): Start mirroring. | 110 // TODO(oshima): Start mirroring. |
111 aura::Window* mirror_window = new aura::Window(NULL); | 111 aura::Window* mirror_window = new aura::Window(NULL); |
112 mirror_window->Init(aura::WINDOW_LAYER_SOLID_COLOR); | 112 mirror_window->Init(ui::LAYER_SOLID_COLOR); |
113 host->window()->AddChild(mirror_window); | 113 host->window()->AddChild(mirror_window); |
114 mirror_window->SetBounds(host->window()->bounds()); | 114 mirror_window->SetBounds(host->window()->bounds()); |
115 mirror_window->Show(); | 115 mirror_window->Show(); |
116 reflector_ = aura::Env::GetInstance()->context_factory()->CreateReflector( | 116 reflector_ = aura::Env::GetInstance()->context_factory()->CreateReflector( |
117 Shell::GetPrimaryRootWindow()->GetHost()->compositor(), | 117 Shell::GetPrimaryRootWindow()->GetHost()->compositor(), |
118 mirror_window->layer()); | 118 mirror_window->layer()); |
119 } else { | 119 } else { |
120 aura::WindowTreeHost* host = ash_host_->AsWindowTreeHost(); | 120 aura::WindowTreeHost* host = ash_host_->AsWindowTreeHost(); |
121 GetRootWindowSettings(host->window())->display_id = display_info.id(); | 121 GetRootWindowSettings(host->window())->display_id = display_info.id(); |
122 host->SetBounds(display_info.bounds_in_native()); | 122 host->SetBounds(display_info.bounds_in_native()); |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 display_manager->mirrored_display_id()); | 179 display_manager->mirrored_display_id()); |
180 const DisplayInfo& source_display_info = display_manager->GetDisplayInfo( | 180 const DisplayInfo& source_display_info = display_manager->GetDisplayInfo( |
181 Shell::GetScreen()->GetPrimaryDisplay().id()); | 181 Shell::GetScreen()->GetPrimaryDisplay().id()); |
182 DCHECK(display_manager->IsMirrored()); | 182 DCHECK(display_manager->IsMirrored()); |
183 return scoped_ptr<RootWindowTransformer>( | 183 return scoped_ptr<RootWindowTransformer>( |
184 CreateRootWindowTransformerForMirroredDisplay(source_display_info, | 184 CreateRootWindowTransformerForMirroredDisplay(source_display_info, |
185 mirror_display_info)); | 185 mirror_display_info)); |
186 } | 186 } |
187 | 187 |
188 } // namespace ash | 188 } // namespace ash |
OLD | NEW |