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

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

Issue 2908793002: [mus+ash] Removes WmWindow from ash/wm/overview and ash/wm/workspace (Closed)
Patch Set: Created 3 years, 6 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 | « ash/wm/overview/cleanup_animation_observer_unittest.cc ('k') | ash/wm/overview/window_grid.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 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/window_selector_item.h" 12 #include "ash/wm/overview/window_selector_item.h"
13 #include "ash/wm/window_mirror_view.h" 13 #include "ash/wm/window_mirror_view.h"
14 #include "ash/wm/window_state.h" 14 #include "ash/wm/window_state.h"
15 #include "ash/wm/window_util.h" 15 #include "ash/wm/window_util.h"
16 #include "ash/wm_window.h"
17 #include "base/macros.h" 16 #include "base/macros.h"
18 #include "base/memory/ptr_util.h" 17 #include "base/memory/ptr_util.h"
19 #include "base/single_thread_task_runner.h" 18 #include "base/single_thread_task_runner.h"
20 #include "base/threading/thread_task_runner_handle.h" 19 #include "base/threading/thread_task_runner_handle.h"
21 #include "ui/aura/client/aura_constants.h" 20 #include "ui/aura/client/aura_constants.h"
22 #include "ui/aura/window.h" 21 #include "ui/aura/window.h"
23 #include "ui/compositor/layer.h" 22 #include "ui/compositor/layer.h"
24 #include "ui/gfx/geometry/rect.h" 23 #include "ui/gfx/geometry/rect.h"
25 #include "ui/gfx/geometry/safe_integer_conversions.h" 24 #include "ui/gfx/geometry/safe_integer_conversions.h"
26 #include "ui/gfx/transform_util.h" 25 #include "ui/gfx/transform_util.h"
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 DCHECK(!overview_started_); 426 DCHECK(!overview_started_);
428 overview_started_ = true; 427 overview_started_ = true;
429 wm::GetWindowState(window_)->set_ignored_by_shelf(true); 428 wm::GetWindowState(window_)->set_ignored_by_shelf(true);
430 if (window_->GetProperty(aura::client::kShowStateKey) == 429 if (window_->GetProperty(aura::client::kShowStateKey) ==
431 ui::SHOW_STATE_MINIMIZED) { 430 ui::SHOW_STATE_MINIMIZED) {
432 CreateMirrorWindowForMinimizedState(); 431 CreateMirrorWindowForMinimizedState();
433 } 432 }
434 } 433 }
435 434
436 void ScopedTransformOverviewWindow::CloseWidget() { 435 void ScopedTransformOverviewWindow::CloseWidget() {
437 WmWindow* parent_window = WmWindow::Get(GetTransientRoot(window_)); 436 aura::Window* parent_window = GetTransientRoot(window_);
438 if (parent_window) 437 if (parent_window)
439 parent_window->CloseWidget(); 438 wm::CloseWidgetForWindow(parent_window);
440 } 439 }
441 440
442 // static 441 // static
443 void ScopedTransformOverviewWindow::SetImmediateCloseForTests() { 442 void ScopedTransformOverviewWindow::SetImmediateCloseForTests() {
444 immediate_close_for_tests = true; 443 immediate_close_for_tests = true;
445 } 444 }
446 445
447 aura::Window* ScopedTransformOverviewWindow::GetOverviewWindow() const { 446 aura::Window* ScopedTransformOverviewWindow::GetOverviewWindow() const {
448 if (minimized_widget_) 447 if (minimized_widget_)
449 return GetOverviewWindowForMinimizedState(); 448 return GetOverviewWindowForMinimizedState();
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 // In unit tests, the content view can have empty size. 499 // In unit tests, the content view can have empty size.
501 if (!preferred.IsEmpty()) { 500 if (!preferred.IsEmpty()) {
502 int inset = bounds.height() - preferred.height(); 501 int inset = bounds.height() - preferred.height();
503 bounds.Inset(0, 0, 0, inset); 502 bounds.Inset(0, 0, 0, inset);
504 } 503 }
505 minimized_widget_->SetBounds(bounds); 504 minimized_widget_->SetBounds(bounds);
506 minimized_widget_->Show(); 505 minimized_widget_->Show();
507 } 506 }
508 507
509 } // namespace ash 508 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/overview/cleanup_animation_observer_unittest.cc ('k') | ash/wm/overview/window_grid.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698