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/ash_switches.h" |
7 #include "ash/launcher/launcher.h" | 8 #include "ash/launcher/launcher.h" |
8 #include "ash/root_window_controller.h" | 9 #include "ash/root_window_controller.h" |
9 #include "ash/shelf/shelf_layout_manager.h" | 10 #include "ash/shelf/shelf_layout_manager.h" |
10 #include "ash/shell.h" | 11 #include "ash/shell.h" |
11 #include "ash/shell_delegate.h" | 12 #include "ash/shell_delegate.h" |
12 #include "ash/shell_window_ids.h" | 13 #include "ash/shell_window_ids.h" |
13 #include "ash/wm/property_util.h" | 14 #include "ash/wm/property_util.h" |
14 #include "ui/app_list/app_list_constants.h" | 15 #include "ui/app_list/app_list_constants.h" |
15 #include "ui/app_list/pagination_model.h" | 16 #include "ui/app_list/pagination_model.h" |
16 #include "ui/app_list/views/app_list_view.h" | 17 #include "ui/app_list/views/app_list_view.h" |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 Shell::GetInstance()->delegate()->CreateAppListViewDelegate()); | 121 Shell::GetInstance()->delegate()->CreateAppListViewDelegate()); |
121 aura::Window* container = GetRootWindowController(window->GetRootWindow())-> | 122 aura::Window* container = GetRootWindowController(window->GetRootWindow())-> |
122 GetContainer(kShellWindowId_AppListContainer); | 123 GetContainer(kShellWindowId_AppListContainer); |
123 view->InitAsBubble( | 124 view->InitAsBubble( |
124 container, | 125 container, |
125 pagination_model_.get(), | 126 pagination_model_.get(), |
126 Launcher::ForWindow(container)->GetAppListButtonView(), | 127 Launcher::ForWindow(container)->GetAppListButtonView(), |
127 gfx::Point(), | 128 gfx::Point(), |
128 GetBubbleArrow(container), | 129 GetBubbleArrow(container), |
129 true /* border_accepts_events */); | 130 true /* border_accepts_events */); |
| 131 if (ash::switches::UseAlternateShelfLayout()) |
| 132 view->SetArrowPaintType(views::BubbleBorder::PAINT_NONE); |
130 SetView(view); | 133 SetView(view); |
131 } | 134 } |
132 } | 135 } |
133 | 136 |
134 bool AppListController::IsVisible() const { | 137 bool AppListController::IsVisible() const { |
135 return view_ && view_->GetWidget()->IsVisible(); | 138 return view_ && view_->GetWidget()->IsVisible(); |
136 } | 139 } |
137 | 140 |
138 aura::Window* AppListController::GetWindow() { | 141 aura::Window* AppListController::GetWindow() { |
139 return is_visible_ && view_ ? view_->GetWidget()->GetNativeWindow() : NULL; | 142 return is_visible_ && view_ ? view_->GetWidget()->GetNativeWindow() : NULL; |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 should_snap_back_ = false; | 350 should_snap_back_ = false; |
348 ui::ScopedLayerAnimationSettings animation(widget_animator); | 351 ui::ScopedLayerAnimationSettings animation(widget_animator); |
349 animation.SetTransitionDuration(base::TimeDelta::FromMilliseconds( | 352 animation.SetTransitionDuration(base::TimeDelta::FromMilliseconds( |
350 app_list::kOverscrollPageTransitionDurationMs)); | 353 app_list::kOverscrollPageTransitionDurationMs)); |
351 widget->SetBounds(view_bounds_); | 354 widget->SetBounds(view_bounds_); |
352 } | 355 } |
353 } | 356 } |
354 | 357 |
355 } // namespace internal | 358 } // namespace internal |
356 } // namespace ash | 359 } // namespace ash |
OLD | NEW |