| OLD | NEW |
| (Empty) |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "ash/ash_export.h" | |
| 6 #include "base/macros.h" | |
| 7 #include "ui/aura/window.h" | |
| 8 #include "ui/aura/window_observer.h" | |
| 9 | |
| 10 namespace ash { | |
| 11 | |
| 12 // A window used to dim the child windows of the given container. | |
| 13 class ASH_EXPORT DimWindow : public aura::Window, public aura::WindowObserver { | |
| 14 public: | |
| 15 // Return a dim window for the container if any, or nullptr. | |
| 16 static DimWindow* Get(aura::Window* container); | |
| 17 | |
| 18 explicit DimWindow(aura::Window* parent); | |
| 19 ~DimWindow() override; | |
| 20 | |
| 21 void SetDimOpacity(float target_opacity); | |
| 22 | |
| 23 // aura::WindowObserver: | |
| 24 void OnWindowBoundsChanged(aura::Window* window, | |
| 25 const gfx::Rect& old_bounds, | |
| 26 const gfx::Rect& new_bounds) override; | |
| 27 void OnWindowDestroying(aura::Window* window) override; | |
| 28 | |
| 29 private: | |
| 30 aura::Window* parent_; | |
| 31 | |
| 32 DISALLOW_COPY_AND_ASSIGN(DimWindow); | |
| 33 }; | |
| 34 | |
| 35 } // namespace ash | |
| OLD | NEW |