OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/common/wm/overview/window_grid.h" | 5 #include "ash/common/wm/overview/window_grid.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <functional> | 8 #include <functional> |
9 #include <set> | 9 #include <set> |
10 #include <utility> | 10 #include <utility> |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 SkColor border_color, | 345 SkColor border_color, |
346 float initial_opacity) { | 346 float initial_opacity) { |
347 views::Widget* widget = new views::Widget; | 347 views::Widget* widget = new views::Widget; |
348 views::Widget::InitParams params; | 348 views::Widget::InitParams params; |
349 params.type = views::Widget::InitParams::TYPE_POPUP; | 349 params.type = views::Widget::InitParams::TYPE_POPUP; |
350 params.keep_on_top = false; | 350 params.keep_on_top = false; |
351 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; | 351 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; |
352 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; | 352 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; |
353 params.accept_events = false; | 353 params.accept_events = false; |
354 widget->set_focus_on_creation(false); | 354 widget->set_focus_on_creation(false); |
355 // Parenting in kShellWindowId_DesktopBackgroundContainer allows proper | 355 // Parenting in kShellWindowId_WallpaperContainer allows proper layering of |
356 // layering of the shield and selection widgets. Since that container is | 356 // the shield and selection widgets. Since that container is created with |
357 // created with USE_LOCAL_COORDINATES BoundsInScreenBehavior local bounds in | 357 // USE_LOCAL_COORDINATES BoundsInScreenBehavior local bounds in |root_window_| |
358 // |root_window_| need to be provided. | 358 // need to be provided. |
359 root_window->GetRootWindowController()->ConfigureWidgetInitParamsForContainer( | 359 root_window->GetRootWindowController()->ConfigureWidgetInitParamsForContainer( |
360 widget, kShellWindowId_DesktopBackgroundContainer, ¶ms); | 360 widget, kShellWindowId_WallpaperContainer, ¶ms); |
361 widget->Init(params); | 361 widget->Init(params); |
362 WmWindow* widget_window = WmLookup::Get()->GetWindowForWidget(widget); | 362 WmWindow* widget_window = WmLookup::Get()->GetWindowForWidget(widget); |
363 // Disable the "bounce in" animation when showing the window. | 363 // Disable the "bounce in" animation when showing the window. |
364 widget_window->SetVisibilityAnimationTransition(::wm::ANIMATE_NONE); | 364 widget_window->SetVisibilityAnimationTransition(::wm::ANIMATE_NONE); |
365 // The background widget should not activate the shelf when passing under it. | 365 // The background widget should not activate the shelf when passing under it. |
366 widget_window->GetWindowState()->set_ignored_by_shelf(true); | 366 widget_window->GetWindowState()->set_ignored_by_shelf(true); |
367 | 367 |
368 views::View* content_view = | 368 views::View* content_view = |
369 new RoundedRectView(border_radius, SK_ColorTRANSPARENT); | 369 new RoundedRectView(border_radius, SK_ColorTRANSPARENT); |
370 if (ash::MaterialDesignController::IsOverviewMaterial()) { | 370 if (ash::MaterialDesignController::IsOverviewMaterial()) { |
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1053 *min_right = left; | 1053 *min_right = left; |
1054 if (*max_right < left) | 1054 if (*max_right < left) |
1055 *max_right = left; | 1055 *max_right = left; |
1056 } | 1056 } |
1057 *max_bottom = top + height; | 1057 *max_bottom = top + height; |
1058 } | 1058 } |
1059 return windows_fit; | 1059 return windows_fit; |
1060 } | 1060 } |
1061 | 1061 |
1062 } // namespace ash | 1062 } // namespace ash |
OLD | NEW |