| 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 cc::PaintFlags paint; | 356 cc::PaintFlags flags; |
| 357 paint.setColor(SkColorSetA(SK_ColorBLACK, 0xE6)); | 357 flags.setColor(SkColorSetA(SK_ColorBLACK, 0xE6)); |
| 358 paint.setStyle(cc::PaintFlags::kFill_Style); | 358 flags.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 flags.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, flags); |
| 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_]; |
| 369 } | 369 } |
| 370 | 370 |
| 371 WmWindow* target_window() { return target_window_; } | 371 WmWindow* target_window() { return target_window_; } |
| 372 | 372 |
| 373 private: | 373 private: |
| 374 std::map<WmWindow*, views::View*> window_view_map_; | 374 std::map<WmWindow*, views::View*> window_view_map_; |
| (...skipping 165 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 |