| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/app_list/app_list.h" | 5 #include "ash/app_list/app_list.h" |
| 6 | 6 |
| 7 #include "ash/app_list/app_list_model.h" | 7 #include "ash/app_list/app_list_model.h" |
| 8 #include "ash/app_list/app_list_view.h" | 8 #include "ash/app_list/app_list_view.h" |
| 9 #include "ash/ash_switches.h" | 9 #include "ash/ash_switches.h" |
| 10 #include "ash/shell_delegate.h" | 10 #include "ash/shell_delegate.h" |
| 11 #include "ash/shell.h" | 11 #include "ash/shell.h" |
| 12 #include "ash/shell_window_ids.h" | 12 #include "ash/shell_window_ids.h" |
| 13 #include "base/bind.h" | 13 #include "base/bind.h" |
| 14 #include "base/command_line.h" | 14 #include "base/command_line.h" |
| 15 #include "ui/aura/event.h" | 15 #include "ui/aura/event.h" |
| 16 #include "ui/aura/window.h" | 16 #include "ui/aura/window.h" |
| 17 #include "ui/gfx/screen.h" | 17 #include "ui/gfx/screen.h" |
| 18 | 18 |
| 19 namespace aura_shell { | 19 namespace ash { |
| 20 namespace internal { | 20 namespace internal { |
| 21 | 21 |
| 22 namespace { | 22 namespace { |
| 23 | 23 |
| 24 // Gets preferred bounds of app list window in show/hide state. | 24 // Gets preferred bounds of app list window in show/hide state. |
| 25 gfx::Rect GetPreferredBounds(bool show) { | 25 gfx::Rect GetPreferredBounds(bool show) { |
| 26 // The y-axis offset used at the beginning of showing animation. | 26 // The y-axis offset used at the beginning of showing animation. |
| 27 static const int kMoveUpAnimationOffset = 50; | 27 static const int kMoveUpAnimationOffset = 50; |
| 28 | 28 |
| 29 gfx::Point cursor = gfx::Screen::GetCursorScreenPoint(); | 29 gfx::Point cursor = gfx::Screen::GetCursorScreenPoint(); |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 ResetWidget(); | 185 ResetWidget(); |
| 186 } | 186 } |
| 187 | 187 |
| 188 void AppList::OnWidgetActivationChanged(views::Widget* widget, bool active) { | 188 void AppList::OnWidgetActivationChanged(views::Widget* widget, bool active) { |
| 189 DCHECK(widget_ == widget); | 189 DCHECK(widget_ == widget); |
| 190 if (widget_ && is_visible_ && !active) | 190 if (widget_ && is_visible_ && !active) |
| 191 SetVisible(false); | 191 SetVisible(false); |
| 192 } | 192 } |
| 193 | 193 |
| 194 } // namespace internal | 194 } // namespace internal |
| 195 } // namespace aura_shell | 195 } // namespace ash |
| OLD | NEW |