OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/common/shelf/shelf_delegate.h" | 5 #include "ash/common/shelf/shelf_delegate.h" |
6 #include "ash/common/wm_shell.h" | 6 #include "ash/shell.h" |
7 #include "ash/wm/window_util.h" | 7 #include "ash/wm/window_util.h" |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
12 #include "chrome/browser/chromeos/arc/arc_auth_notification.h" | 12 #include "chrome/browser/chromeos/arc/arc_auth_notification.h" |
13 #include "chrome/browser/chromeos/arc/arc_service_launcher.h" | 13 #include "chrome/browser/chromeos/arc/arc_service_launcher.h" |
14 #include "chrome/browser/chromeos/arc/arc_session_manager.h" | 14 #include "chrome/browser/chromeos/arc/arc_session_manager.h" |
15 #include "chrome/browser/chromeos/arc/arc_util.h" | 15 #include "chrome/browser/chromeos/arc/arc_util.h" |
16 #include "chrome/browser/extensions/extension_browsertest.h" | 16 #include "chrome/browser/extensions/extension_browsertest.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 } | 101 } |
102 | 102 |
103 return apps; | 103 return apps; |
104 } | 104 } |
105 | 105 |
106 ChromeLauncherController* chrome_controller() { | 106 ChromeLauncherController* chrome_controller() { |
107 return ChromeLauncherController::instance(); | 107 return ChromeLauncherController::instance(); |
108 } | 108 } |
109 | 109 |
110 ash::ShelfDelegate* shelf_delegate() { | 110 ash::ShelfDelegate* shelf_delegate() { |
111 return ash::WmShell::Get()->shelf_delegate(); | 111 return ash::Shell::Get()->shelf_delegate(); |
112 } | 112 } |
113 | 113 |
114 class AppAnimatedWaiter { | 114 class AppAnimatedWaiter { |
115 public: | 115 public: |
116 explicit AppAnimatedWaiter(const std::string& app_id) : app_id_(app_id) {} | 116 explicit AppAnimatedWaiter(const std::string& app_id) : app_id_(app_id) {} |
117 | 117 |
118 void Wait() { | 118 void Wait() { |
119 const base::TimeDelta threshold = | 119 const base::TimeDelta threshold = |
120 base::TimeDelta::FromMilliseconds(kAppAnimatedThresholdMs); | 120 base::TimeDelta::FromMilliseconds(kAppAnimatedThresholdMs); |
121 ArcAppDeferredLauncherController* controller = | 121 ArcAppDeferredLauncherController* controller = |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 app_host()->OnTaskDestroyed(2); | 546 app_host()->OnTaskDestroyed(2); |
547 EXPECT_EQ(controller2, GetAppItemController(shelf_id2)); | 547 EXPECT_EQ(controller2, GetAppItemController(shelf_id2)); |
548 // Destroy task #2, this kills shelf group 2 | 548 // Destroy task #2, this kills shelf group 2 |
549 app_host()->OnTaskDestroyed(3); | 549 app_host()->OnTaskDestroyed(3); |
550 EXPECT_FALSE(GetAppItemController(shelf_id2)); | 550 EXPECT_FALSE(GetAppItemController(shelf_id2)); |
551 | 551 |
552 // Disable ARC, this removes app and as result kills shelf group 3. | 552 // Disable ARC, this removes app and as result kills shelf group 3. |
553 arc::SetArcPlayStoreEnabledForProfile(profile(), false); | 553 arc::SetArcPlayStoreEnabledForProfile(profile(), false); |
554 EXPECT_FALSE(GetAppItemController(shelf_id3)); | 554 EXPECT_FALSE(GetAppItemController(shelf_id3)); |
555 } | 555 } |
OLD | NEW |