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

Side by Side Diff: ash/wm/overview/scoped_transform_overview_window.cc

Issue 2893643003: [mus+ash] Removes WmWindow from ash/wm/window_cycle_* (Closed)
Patch Set: [mus+ash] Removes WmWindow from ash/wm/window_cycle_* (nits) Created 3 years, 7 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
« no previous file with comments | « no previous file | ash/wm/window_cycle_controller.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/wm/overview/scoped_transform_overview_window.h" 5 #include "ash/wm/overview/scoped_transform_overview_window.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/root_window_controller.h" 10 #include "ash/root_window_controller.h"
11 #include "ash/wm/overview/scoped_overview_animation_settings.h" 11 #include "ash/wm/overview/scoped_overview_animation_settings.h"
12 #include "ash/wm/overview/scoped_overview_animation_settings_factory.h" 12 #include "ash/wm/overview/scoped_overview_animation_settings_factory.h"
13 #include "ash/wm/overview/window_selector_item.h" 13 #include "ash/wm/overview/window_selector_item.h"
14 #include "ash/wm/window_mirror_view.h"
14 #include "ash/wm/window_state.h" 15 #include "ash/wm/window_state.h"
15 #include "ash/wm_window.h" 16 #include "ash/wm_window.h"
16 #include "base/macros.h" 17 #include "base/macros.h"
17 #include "base/memory/ptr_util.h" 18 #include "base/memory/ptr_util.h"
18 #include "base/single_thread_task_runner.h" 19 #include "base/single_thread_task_runner.h"
19 #include "base/threading/thread_task_runner_handle.h" 20 #include "base/threading/thread_task_runner_handle.h"
20 #include "ui/aura/client/aura_constants.h" 21 #include "ui/aura/client/aura_constants.h"
21 #include "ui/compositor/layer.h" 22 #include "ui/compositor/layer.h"
22 #include "ui/gfx/geometry/rect.h" 23 #include "ui/gfx/geometry/rect.h"
23 #include "ui/gfx/geometry/safe_integer_conversions.h" 24 #include "ui/gfx/geometry/safe_integer_conversions.h"
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 params.accept_events = true; 482 params.accept_events = true;
482 minimized_widget_.reset(new views::Widget); 483 minimized_widget_.reset(new views::Widget);
483 window_->GetRootWindow() 484 window_->GetRootWindow()
484 ->GetRootWindowController() 485 ->GetRootWindowController()
485 ->ConfigureWidgetInitParamsForContainer( 486 ->ConfigureWidgetInitParamsForContainer(
486 minimized_widget_.get(), window_->GetParent()->aura_window()->id(), 487 minimized_widget_.get(), window_->GetParent()->aura_window()->id(),
487 &params); 488 &params);
488 minimized_widget_->set_focus_on_creation(false); 489 minimized_widget_->set_focus_on_creation(false);
489 minimized_widget_->Init(params); 490 minimized_widget_->Init(params);
490 491
491 views::View* mirror_view = window_->CreateViewWithRecreatedLayers().release(); 492 views::View* mirror_view = new wm::WindowMirrorView(window_->aura_window());
492 mirror_view->SetVisible(true); 493 mirror_view->SetVisible(true);
493 mirror_view->SetTargetHandler(this); 494 mirror_view->SetTargetHandler(this);
494 minimized_widget_->SetContentsView(mirror_view); 495 minimized_widget_->SetContentsView(mirror_view);
495 gfx::Rect bounds(window_->GetBoundsInScreen()); 496 gfx::Rect bounds(window_->GetBoundsInScreen());
496 gfx::Size preferred = mirror_view->GetPreferredSize(); 497 gfx::Size preferred = mirror_view->GetPreferredSize();
497 // In unit tests, the content view can have empty size. 498 // In unit tests, the content view can have empty size.
498 if (!preferred.IsEmpty()) { 499 if (!preferred.IsEmpty()) {
499 int inset = bounds.height() - preferred.height(); 500 int inset = bounds.height() - preferred.height();
500 bounds.Inset(0, 0, 0, inset); 501 bounds.Inset(0, 0, 0, inset);
501 } 502 }
502 minimized_widget_->SetBounds(bounds); 503 minimized_widget_->SetBounds(bounds);
503 minimized_widget_->Show(); 504 minimized_widget_->Show();
504 } 505 }
505 506
506 } // namespace ash 507 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/wm/window_cycle_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698