Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(932)

Side by Side Diff: ash/launcher/launcher.cc

Issue 11953066: Reland 179231 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix DesktopBackgroundView leak Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/desktop_background/desktop_background_view.h ('k') | ash/shell/window_type_launcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ash/desktop_background/desktop_background_view.h ('k') | ash/shell/window_type_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698