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/wm/mru_window_tracker.h" | 10 #include "ash/common/wm/mru_window_tracker.h" |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 // changes other animatable properties. | 346 // changes other animatable properties. |
347 highlight_view_->layer()->SetAnimator( | 347 highlight_view_->layer()->SetAnimator( |
348 ui::LayerAnimator::CreateImplicitAnimator()); | 348 ui::LayerAnimator::CreateImplicitAnimator()); |
349 } | 349 } |
350 } | 350 } |
351 | 351 |
352 void OnPaintBackground(gfx::Canvas* canvas) override { | 352 void OnPaintBackground(gfx::Canvas* canvas) override { |
353 // We can't set a bg on the mirror container itself because the highlight | 353 // We can't set a bg on the mirror container itself because the highlight |
354 // view needs to be on top of the bg but behind the target windows. | 354 // view needs to be on top of the bg but behind the target windows. |
355 const gfx::RectF shield_bounds(mirror_container_->bounds()); | 355 const gfx::RectF shield_bounds(mirror_container_->bounds()); |
356 SkPaint paint; | 356 cc::PaintFlags paint; |
357 paint.setColor(SkColorSetA(SK_ColorBLACK, 0xE6)); | 357 paint.setColor(SkColorSetA(SK_ColorBLACK, 0xE6)); |
358 paint.setStyle(SkPaint::kFill_Style); | 358 paint.setStyle(cc::PaintFlags::kFill_Style); |
359 float corner_radius = 0.f; | 359 float corner_radius = 0.f; |
360 if (shield_bounds.width() < width()) { | 360 if (shield_bounds.width() < width()) { |
361 paint.setAntiAlias(true); | 361 paint.setAntiAlias(true); |
362 corner_radius = kBackgroundCornerRadius; | 362 corner_radius = kBackgroundCornerRadius; |
363 } | 363 } |
364 canvas->DrawRoundRect(shield_bounds, corner_radius, paint); | 364 canvas->DrawRoundRect(shield_bounds, corner_radius, paint); |
365 } | 365 } |
366 | 366 |
367 View* GetInitiallyFocusedView() override { | 367 View* GetInitiallyFocusedView() override { |
368 return window_view_map_[target_window_]; | 368 return window_view_map_[target_window_]; |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
540 widget_rect.set_height(widget_height); | 540 widget_rect.set_height(widget_height); |
541 params.bounds = widget_rect; | 541 params.bounds = widget_rect; |
542 widget->Init(params); | 542 widget->Init(params); |
543 | 543 |
544 screen_observer_.Add(display::Screen::GetScreen()); | 544 screen_observer_.Add(display::Screen::GetScreen()); |
545 widget->Show(); | 545 widget->Show(); |
546 cycle_ui_widget_ = widget; | 546 cycle_ui_widget_ = widget; |
547 } | 547 } |
548 | 548 |
549 } // namespace ash | 549 } // namespace ash |
OLD | NEW |