OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "ui/app_list/presenter/app_list_presenter_impl.h" | 5 #include "ui/app_list/presenter/app_list_presenter_impl.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "ui/app_list/presenter/app_list_presenter_delegate_factory.h" | 10 #include "ui/app_list/presenter/app_list_presenter_delegate_factory.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 bool update_bounds_called() const { return update_bounds_called_; } | 37 bool update_bounds_called() const { return update_bounds_called_; } |
38 | 38 |
39 private: | 39 private: |
40 // AppListPresenterDelegate: | 40 // AppListPresenterDelegate: |
41 AppListViewDelegate* GetViewDelegate() override { return view_delegate_; } | 41 AppListViewDelegate* GetViewDelegate() override { return view_delegate_; } |
42 void Init(AppListView* view, | 42 void Init(AppListView* view, |
43 int64_t display_id, | 43 int64_t display_id, |
44 int current_apps_page) override { | 44 int current_apps_page) override { |
45 init_called_ = true; | 45 init_called_ = true; |
46 view_ = view; | 46 view_ = view; |
47 view->Initialize(container_, current_apps_page); | 47 view->Initialize(container_, current_apps_page, false, false); |
48 } | 48 } |
49 void OnShown(int64_t display_id) override { on_shown_called_ = true; } | 49 void OnShown(int64_t display_id) override { on_shown_called_ = true; } |
50 void OnDismissed() override { on_dismissed_called_ = true; } | 50 void OnDismissed() override { on_dismissed_called_ = true; } |
51 void UpdateBounds() override { update_bounds_called_ = true; } | 51 void UpdateBounds() override { update_bounds_called_ = true; } |
52 gfx::Vector2d GetVisibilityAnimationOffset(aura::Window*) override { | 52 gfx::Vector2d GetVisibilityAnimationOffset(aura::Window*) override { |
53 return gfx::Vector2d(0, 0); | 53 return gfx::Vector2d(0, 0); |
54 } | 54 } |
55 | 55 |
56 private: | 56 private: |
57 aura::Window* container_; | 57 aura::Window* container_; |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 // app list's widget is destroyed. | 201 // app list's widget is destroyed. |
202 TEST_F(AppListPresenterImplTest, WidgetDestroyed) { | 202 TEST_F(AppListPresenterImplTest, WidgetDestroyed) { |
203 presenter()->Show(GetDisplayId()); | 203 presenter()->Show(GetDisplayId()); |
204 EXPECT_TRUE(presenter()->GetTargetVisibility()); | 204 EXPECT_TRUE(presenter()->GetTargetVisibility()); |
205 presenter()->GetView()->GetWidget()->CloseNow(); | 205 presenter()->GetView()->GetWidget()->CloseNow(); |
206 EXPECT_FALSE(presenter()->GetTargetVisibility()); | 206 EXPECT_FALSE(presenter()->GetTargetVisibility()); |
207 EXPECT_FALSE(delegate()); | 207 EXPECT_FALSE(delegate()); |
208 } | 208 } |
209 | 209 |
210 } // namespace app_list | 210 } // namespace app_list |
OLD | NEW |