| OLD | NEW | 
|    1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |    1 // Copyright (c) 2012 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/launcher/launcher.h" |    5 #include "ash/launcher/launcher.h" | 
|    6  |    6  | 
|    7 #include <algorithm> |    7 #include <algorithm> | 
|    8 #include <cmath> |    8 #include <cmath> | 
|    9  |    9  | 
|   10 #include "ash/focus_cycler.h" |   10 #include "ash/focus_cycler.h" | 
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   89   Launcher* launcher_; |   89   Launcher* launcher_; | 
|   90   internal::FocusCycler* focus_cycler_; |   90   internal::FocusCycler* focus_cycler_; | 
|   91   int alpha_; |   91   int alpha_; | 
|   92  |   92  | 
|   93   DISALLOW_COPY_AND_ASSIGN(DelegateView); |   93   DISALLOW_COPY_AND_ASSIGN(DelegateView); | 
|   94 }; |   94 }; | 
|   95  |   95  | 
|   96 // Class used to slightly dim shelf items when maximized and visible. It also |   96 // Class used to slightly dim shelf items when maximized and visible. It also | 
|   97 // makes sure the widget changes size to always be of the same size as the |   97 // makes sure the widget changes size to always be of the same size as the | 
|   98 // shelf. |   98 // shelf. | 
|   99 class Launcher::DimmerView : public views::WidgetDelegateView, |   99 class Launcher::DimmerView : public views::View, | 
|  100                    public aura::WindowObserver { |  100                              public aura::WindowObserver { | 
|  101  public: |  101  public: | 
|  102   explicit DimmerView(Launcher* launcher) |  102   explicit DimmerView(Launcher* launcher) | 
|  103       : launcher_(launcher) { |  103       : launcher_(launcher) { | 
|  104     launcher_->widget()->GetNativeWindow()->AddObserver(this); |  104     launcher_->widget()->GetNativeWindow()->AddObserver(this); | 
|  105   } |  105   } | 
|  106  |  106  | 
|  107   ~DimmerView() { |  107   ~DimmerView() { | 
|  108     if (launcher_) |  108     if (launcher_) | 
|  109       launcher_->widget()->GetNativeWindow()->RemoveObserver(this); |  109       launcher_->widget()->GetNativeWindow()->RemoveObserver(this); | 
|  110   } |  110   } | 
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  440   } else { |  440   } else { | 
|  441     delegate_view_->GetFocusManager()->ClearFocus(); |  441     delegate_view_->GetFocusManager()->ClearFocus(); | 
|  442   } |  442   } | 
|  443 } |  443 } | 
|  444  |  444  | 
|  445 internal::LauncherView* Launcher::GetLauncherViewForTest() { |  445 internal::LauncherView* Launcher::GetLauncherViewForTest() { | 
|  446   return launcher_view_; |  446   return launcher_view_; | 
|  447 } |  447 } | 
|  448  |  448  | 
|  449 }  // namespace ash |  449 }  // namespace ash | 
| OLD | NEW |