| 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 | 9 |
| 10 // Xlib.h defines RootWindow. | 10 // Xlib.h defines RootWindow. |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 aura::client::SetCaptureClient(host_->window(), new NoneCaptureClient()); | 103 aura::client::SetCaptureClient(host_->window(), new NoneCaptureClient()); |
| 104 host_->Show(); | 104 host_->Show(); |
| 105 | 105 |
| 106 // TODO(oshima): Start mirroring. | 106 // TODO(oshima): Start mirroring. |
| 107 aura::Window* mirror_window = new aura::Window(NULL); | 107 aura::Window* mirror_window = new aura::Window(NULL); |
| 108 mirror_window->Init(aura::WINDOW_LAYER_TEXTURED); | 108 mirror_window->Init(aura::WINDOW_LAYER_TEXTURED); |
| 109 host_->window()->AddChild(mirror_window); | 109 host_->window()->AddChild(mirror_window); |
| 110 mirror_window->SetBounds(host_->window()->bounds()); | 110 mirror_window->SetBounds(host_->window()->bounds()); |
| 111 mirror_window->Show(); | 111 mirror_window->Show(); |
| 112 reflector_ = ui::ContextFactory::GetInstance()->CreateReflector( | 112 reflector_ = ui::ContextFactory::GetInstance()->CreateReflector( |
| 113 Shell::GetPrimaryRootWindow()->GetDispatcher()->host()->compositor(), | 113 Shell::GetPrimaryRootWindow()->GetHost()->compositor(), |
| 114 mirror_window->layer()); | 114 mirror_window->layer()); |
| 115 } else { | 115 } else { |
| 116 GetRootWindowSettings(host_->window())->display_id = display_info.id(); | 116 GetRootWindowSettings(host_->window())->display_id = display_info.id(); |
| 117 host_->SetBounds(display_info.bounds_in_native()); | 117 host_->SetBounds(display_info.bounds_in_native()); |
| 118 } | 118 } |
| 119 | 119 |
| 120 DisplayManager* display_manager = Shell::GetInstance()->display_manager(); | 120 DisplayManager* display_manager = Shell::GetInstance()->display_manager(); |
| 121 const DisplayInfo& source_display_info = display_manager->GetDisplayInfo( | 121 const DisplayInfo& source_display_info = display_manager->GetDisplayInfo( |
| 122 Shell::GetScreen()->GetPrimaryDisplay().id()); | 122 Shell::GetScreen()->GetPrimaryDisplay().id()); |
| 123 DCHECK(display_manager->IsMirrored()); | 123 DCHECK(display_manager->IsMirrored()); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 Shell::GetScreen()->GetPrimaryDisplay().id()); | 176 Shell::GetScreen()->GetPrimaryDisplay().id()); |
| 177 DCHECK(display_manager->IsMirrored()); | 177 DCHECK(display_manager->IsMirrored()); |
| 178 return scoped_ptr<aura::RootWindowTransformer>( | 178 return scoped_ptr<aura::RootWindowTransformer>( |
| 179 internal::CreateRootWindowTransformerForMirroredDisplay( | 179 internal::CreateRootWindowTransformerForMirroredDisplay( |
| 180 source_display_info, | 180 source_display_info, |
| 181 mirror_display_info)); | 181 mirror_display_info)); |
| 182 } | 182 } |
| 183 | 183 |
| 184 } // namespace internal | 184 } // namespace internal |
| 185 } // namespace ash | 185 } // namespace ash |
| OLD | NEW |