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

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

Issue 2814243002: Removes a couple more functions from WmWindow (Closed)
Patch Set: feedback Created 3 years, 8 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/maximize_mode/workspace_backdrop_delegate.cc ('k') | ash/wm/overview/window_selector.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"
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 params.type = views::Widget::InitParams::TYPE_WINDOW_FRAMELESS; 476 params.type = views::Widget::InitParams::TYPE_WINDOW_FRAMELESS;
477 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; 477 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
478 params.visible_on_all_workspaces = true; 478 params.visible_on_all_workspaces = true;
479 params.name = "OverviewModeMinimized"; 479 params.name = "OverviewModeMinimized";
480 params.activatable = views::Widget::InitParams::Activatable::ACTIVATABLE_NO; 480 params.activatable = views::Widget::InitParams::Activatable::ACTIVATABLE_NO;
481 params.accept_events = true; 481 params.accept_events = true;
482 minimized_widget_.reset(new views::Widget); 482 minimized_widget_.reset(new views::Widget);
483 window_->GetRootWindow() 483 window_->GetRootWindow()
484 ->GetRootWindowController() 484 ->GetRootWindowController()
485 ->ConfigureWidgetInitParamsForContainer( 485 ->ConfigureWidgetInitParamsForContainer(
486 minimized_widget_.get(), window_->GetParent()->GetShellWindowId(), 486 minimized_widget_.get(), window_->GetParent()->aura_window()->id(),
487 &params); 487 &params);
488 minimized_widget_->set_focus_on_creation(false); 488 minimized_widget_->set_focus_on_creation(false);
489 minimized_widget_->Init(params); 489 minimized_widget_->Init(params);
490 490
491 views::View* mirror_view = window_->CreateViewWithRecreatedLayers().release(); 491 views::View* mirror_view = window_->CreateViewWithRecreatedLayers().release();
492 mirror_view->SetVisible(true); 492 mirror_view->SetVisible(true);
493 mirror_view->SetTargetHandler(this); 493 mirror_view->SetTargetHandler(this);
494 minimized_widget_->SetContentsView(mirror_view); 494 minimized_widget_->SetContentsView(mirror_view);
495 gfx::Rect bounds(window_->GetBoundsInScreen()); 495 gfx::Rect bounds(window_->GetBoundsInScreen());
496 gfx::Size preferred = mirror_view->GetPreferredSize(); 496 gfx::Size preferred = mirror_view->GetPreferredSize();
497 // In unit tests, the content view can have empty size. 497 // In unit tests, the content view can have empty size.
498 if (!preferred.IsEmpty()) { 498 if (!preferred.IsEmpty()) {
499 int inset = bounds.height() - preferred.height(); 499 int inset = bounds.height() - preferred.height();
500 bounds.Inset(0, 0, 0, inset); 500 bounds.Inset(0, 0, 0, inset);
501 } 501 }
502 minimized_widget_->SetBounds(bounds); 502 minimized_widget_->SetBounds(bounds);
503 minimized_widget_->Show(); 503 minimized_widget_->Show();
504 } 504 }
505 505
506 } // namespace ash 506 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/maximize_mode/workspace_backdrop_delegate.cc ('k') | ash/wm/overview/window_selector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698