| 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/window_cycle_list.h" | 5 #include "ash/common/wm/window_cycle_list.h" |
| 6 | 6 |
| 7 #include <list> | 7 #include <list> |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "ash/common/shell_window_ids.h" | 10 #include "ash/common/shell_window_ids.h" |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 class WindowCycleView : public views::WidgetDelegateView { | 247 class WindowCycleView : public views::WidgetDelegateView { |
| 248 public: | 248 public: |
| 249 WindowCycleView(const WindowCycleList::WindowList& windows, | 249 WindowCycleView(const WindowCycleList::WindowList& windows, |
| 250 WindowCycleController::Direction initial_direction) | 250 WindowCycleController::Direction initial_direction) |
| 251 : initial_direction_(initial_direction), | 251 : initial_direction_(initial_direction), |
| 252 mirror_container_(new views::View()), | 252 mirror_container_(new views::View()), |
| 253 highlight_view_(new views::View()), | 253 highlight_view_(new views::View()), |
| 254 target_window_(nullptr) { | 254 target_window_(nullptr) { |
| 255 DCHECK(!windows.empty()); | 255 DCHECK(!windows.empty()); |
| 256 SetPaintToLayer(true); | 256 SetPaintToLayer(true); |
| 257 layer()->SetBackgroundBlur(4); | |
| 258 layer()->SetFillsBoundsOpaquely(false); | 257 layer()->SetFillsBoundsOpaquely(false); |
| 259 layer()->SetMasksToBounds(true); | 258 layer()->SetMasksToBounds(true); |
| 260 layer()->SetOpacity(0.0); | 259 layer()->SetOpacity(0.0); |
| 261 { | 260 { |
| 262 ui::ScopedLayerAnimationSettings animate_fade(layer()->GetAnimator()); | 261 ui::ScopedLayerAnimationSettings animate_fade(layer()->GetAnimator()); |
| 263 animate_fade.SetTransitionDuration( | 262 animate_fade.SetTransitionDuration( |
| 264 base::TimeDelta::FromMilliseconds(100)); | 263 base::TimeDelta::FromMilliseconds(100)); |
| 265 layer()->SetOpacity(1.0); | 264 layer()->SetOpacity(1.0); |
| 266 } | 265 } |
| 267 | 266 |
| 268 set_background(views::Background::CreateSolidBackground( | 267 set_background(views::Background::CreateSolidBackground( |
| 269 SkColorSetA(SK_ColorBLACK, 0xCC))); | 268 SkColorSetA(SK_ColorBLACK, 0xE6))); |
| 270 | 269 |
| 271 const int kInsideBorderPaddingDip = 64; | 270 const int kInsideBorderPaddingDip = 64; |
| 272 const int kBetweenChildPaddingDip = 10; | 271 const int kBetweenChildPaddingDip = 10; |
| 273 views::BoxLayout* layout = new views::BoxLayout( | 272 views::BoxLayout* layout = new views::BoxLayout( |
| 274 views::BoxLayout::kHorizontal, kInsideBorderPaddingDip, | 273 views::BoxLayout::kHorizontal, kInsideBorderPaddingDip, |
| 275 kInsideBorderPaddingDip, kBetweenChildPaddingDip); | 274 kInsideBorderPaddingDip, kBetweenChildPaddingDip); |
| 276 layout->set_cross_axis_alignment( | 275 layout->set_cross_axis_alignment( |
| 277 views::BoxLayout::CROSS_AXIS_ALIGNMENT_START); | 276 views::BoxLayout::CROSS_AXIS_ALIGNMENT_START); |
| 278 mirror_container_->SetLayoutManager(layout); | 277 mirror_container_->SetLayoutManager(layout); |
| 279 mirror_container_->SetPaintToLayer(true); | 278 mirror_container_->SetPaintToLayer(true); |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 621 widget_rect.set_y((widget_rect.height() - widget_height) / 2); | 620 widget_rect.set_y((widget_rect.height() - widget_height) / 2); |
| 622 widget_rect.set_height(widget_height); | 621 widget_rect.set_height(widget_height); |
| 623 widget->SetBounds(widget_rect); | 622 widget->SetBounds(widget_rect); |
| 624 widget->Show(); | 623 widget->Show(); |
| 625 widget->SetCapture(cycle_view_); | 624 widget->SetCapture(cycle_view_); |
| 626 widget->set_auto_release_capture(false); | 625 widget->set_auto_release_capture(false); |
| 627 cycle_ui_widget_ = widget; | 626 cycle_ui_widget_ = widget; |
| 628 } | 627 } |
| 629 | 628 |
| 630 } // namespace ash | 629 } // namespace ash |
| OLD | NEW |