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

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

Issue 9808026: Layout panels on top of their launcher icons (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pre-patch with tests Created 8 years, 8 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
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 "ash/focus_cycler.h" 7 #include "ash/focus_cycler.h"
8 #include "ash/launcher/launcher_delegate.h" 8 #include "ash/launcher/launcher_delegate.h"
9 #include "ash/launcher/launcher_model.h" 9 #include "ash/launcher/launcher_model.h"
10 #include "ash/launcher/launcher_view.h" 10 #include "ash/launcher/launcher_view.h"
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 return bounds; 179 return bounds;
180 180
181 gfx::Point screen_origin; 181 gfx::Point screen_origin;
182 views::View::ConvertPointToScreen(launcher_view_, &screen_origin); 182 views::View::ConvertPointToScreen(launcher_view_, &screen_origin);
183 return gfx::Rect(screen_origin.x() + bounds.x(), 183 return gfx::Rect(screen_origin.x() + bounds.x(),
184 screen_origin.y() + bounds.y(), 184 screen_origin.y() + bounds.y(),
185 bounds.width(), 185 bounds.width(),
186 bounds.height()); 186 bounds.height());
187 } 187 }
188 188
189 void Launcher::AddIconObserver(LauncherIconObserver* observer) {
190 launcher_view_->AddIconObserver(observer);
191 }
192
193 void Launcher::RemoveIconObserver(LauncherIconObserver* observer) {
194 launcher_view_->RemoveIconObserver(observer);
195 }
196
189 bool Launcher::IsShowingMenu() const { 197 bool Launcher::IsShowingMenu() const {
190 return launcher_view_->IsShowingMenu(); 198 return launcher_view_->IsShowingMenu();
191 } 199 }
192 200
193 internal::LauncherView* Launcher::GetLauncherViewForTest() { 201 internal::LauncherView* Launcher::GetLauncherViewForTest() {
194 return launcher_view_; 202 return launcher_view_;
195 } 203 }
196 204
197 void Launcher::UpdateBackground(int alpha) { 205 void Launcher::UpdateBackground(int alpha) {
198 ui::Layer* layer = widget_->GetNativeView()->layer(); 206 ui::Layer* layer = widget_->GetNativeView()->layer();
199 layer->SetColor(SkColorSetARGB(alpha, 0, 0, 0)); 207 layer->SetColor(SkColorSetARGB(alpha, 0, 0, 0));
200 } 208 }
201 209
202 } // namespace ash 210 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698