Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Side by Side Diff: ash/display/mirror_window_controller.cc

Issue 121773003: Makes Window::Init take a WindowLayerType instead of LayerType. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge to master Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ash/display/screen_position_controller_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 #if defined(USE_X11) 181 #if defined(USE_X11)
182 DisableInput(root_window_->host()->GetAcceleratedWidget()); 182 DisableInput(root_window_->host()->GetAcceleratedWidget());
183 #endif 183 #endif
184 184
185 aura::client::SetCaptureClient(root_window_->window(), 185 aura::client::SetCaptureClient(root_window_->window(),
186 new NoneCaptureClient()); 186 new NoneCaptureClient());
187 root_window_->host()->Show(); 187 root_window_->host()->Show();
188 188
189 // TODO(oshima): Start mirroring. 189 // TODO(oshima): Start mirroring.
190 aura::Window* mirror_window = new aura::Window(NULL); 190 aura::Window* mirror_window = new aura::Window(NULL);
191 mirror_window->Init(ui::LAYER_TEXTURED); 191 mirror_window->Init(aura::WINDOW_LAYER_TEXTURED);
192 root_window_->window()->AddChild(mirror_window); 192 root_window_->window()->AddChild(mirror_window);
193 mirror_window->SetBounds(root_window_->window()->bounds()); 193 mirror_window->SetBounds(root_window_->window()->bounds());
194 mirror_window->Show(); 194 mirror_window->Show();
195 reflector_ = ui::ContextFactory::GetInstance()->CreateReflector( 195 reflector_ = ui::ContextFactory::GetInstance()->CreateReflector(
196 Shell::GetPrimaryRootWindow()->GetDispatcher()->host()->compositor(), 196 Shell::GetPrimaryRootWindow()->GetDispatcher()->host()->compositor(),
197 mirror_window->layer()); 197 mirror_window->layer());
198 198
199 cursor_window_ = new aura::Window(cursor_window_delegate_.get()); 199 cursor_window_ = new aura::Window(cursor_window_delegate_.get());
200 cursor_window_->SetTransparent(true); 200 cursor_window_->SetTransparent(true);
201 cursor_window_->Init(ui::LAYER_TEXTURED); 201 cursor_window_->Init(aura::WINDOW_LAYER_TEXTURED);
202 root_window_->window()->AddChild(cursor_window_); 202 root_window_->window()->AddChild(cursor_window_);
203 cursor_window_->Show(); 203 cursor_window_->Show();
204 } else { 204 } else {
205 GetRootWindowSettings(root_window_->window())->display_id = 205 GetRootWindowSettings(root_window_->window())->display_id =
206 display_info.id(); 206 display_info.id();
207 root_window_->SetHostBounds(display_info.bounds_in_native()); 207 root_window_->SetHostBounds(display_info.bounds_in_native());
208 } 208 }
209 209
210 DisplayManager* display_manager = Shell::GetInstance()->display_manager(); 210 DisplayManager* display_manager = Shell::GetInstance()->display_manager();
211 const DisplayInfo& source_display_info = display_manager->GetDisplayInfo( 211 const DisplayInfo& source_display_info = display_manager->GetDisplayInfo(
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 Shell::GetScreen()->GetPrimaryDisplay().id()); 341 Shell::GetScreen()->GetPrimaryDisplay().id());
342 DCHECK(display_manager->IsMirrored()); 342 DCHECK(display_manager->IsMirrored());
343 return scoped_ptr<aura::RootWindowTransformer>( 343 return scoped_ptr<aura::RootWindowTransformer>(
344 internal::CreateRootWindowTransformerForMirroredDisplay( 344 internal::CreateRootWindowTransformerForMirroredDisplay(
345 source_display_info, 345 source_display_info,
346 mirror_display_info)); 346 mirror_display_info));
347 } 347 }
348 348
349 } // namespace internal 349 } // namespace internal
350 } // namespace ash 350 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/display/screen_position_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698