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/wm/app_list_controller.h" | 5 #include "ash/wm/app_list_controller.h" |
6 | 6 |
7 #include "ash/launcher/launcher.h" | 7 #include "ash/launcher/launcher.h" |
8 #include "ash/root_window_controller.h" | 8 #include "ash/root_window_controller.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/shell_delegate.h" | 10 #include "ash/shell_delegate.h" |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 base::TimeDelta::FromMilliseconds(kAnimationDurationMs)); | 195 base::TimeDelta::FromMilliseconds(kAnimationDurationMs)); |
196 animation.AddObserver(this); | 196 animation.AddObserver(this); |
197 | 197 |
198 layer->SetOpacity(is_visible_ ? 1.0 : 0.0); | 198 layer->SetOpacity(is_visible_ ? 1.0 : 0.0); |
199 layer->SetBounds(target_bounds); | 199 layer->SetBounds(target_bounds); |
200 } | 200 } |
201 | 201 |
202 void AppListController::ProcessLocatedEvent(const aura::LocatedEvent& event) { | 202 void AppListController::ProcessLocatedEvent(const aura::LocatedEvent& event) { |
203 if (view_ && is_visible_) { | 203 if (view_ && is_visible_) { |
204 views::Widget* widget = view_->GetWidget(); | 204 views::Widget* widget = view_->GetWidget(); |
205 if (!widget->GetNativeView()->GetRootWindowBounds().Contains( | 205 if (!widget->GetNativeView()->GetBoundsInRootWindow().Contains( |
206 event.root_location())) { | 206 event.root_location())) { |
207 SetVisible(false); | 207 SetVisible(false); |
208 } | 208 } |
209 } | 209 } |
210 } | 210 } |
211 | 211 |
212 void AppListController::UpdateBounds() { | 212 void AppListController::UpdateBounds() { |
213 if (view_ && is_visible_) | 213 if (view_ && is_visible_) |
214 view_->UpdateBounds(); | 214 view_->UpdateBounds(); |
215 } | 215 } |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 | 291 |
292 //////////////////////////////////////////////////////////////////////////////// | 292 //////////////////////////////////////////////////////////////////////////////// |
293 // AppListController, LauncherIconObserver implementation: | 293 // AppListController, LauncherIconObserver implementation: |
294 | 294 |
295 void AppListController::OnLauncherIconPositionsChanged() { | 295 void AppListController::OnLauncherIconPositionsChanged() { |
296 UpdateBounds(); | 296 UpdateBounds(); |
297 } | 297 } |
298 | 298 |
299 } // namespace internal | 299 } // namespace internal |
300 } // namespace ash | 300 } // namespace ash |
OLD | NEW |