| 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 "chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h" | 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 #include "extensions/browser/app_window/app_window_contents.h" | 93 #include "extensions/browser/app_window/app_window_contents.h" |
| 94 #include "extensions/browser/app_window/app_window_registry.h" | 94 #include "extensions/browser/app_window/app_window_registry.h" |
| 95 #include "extensions/browser/app_window/native_app_window.h" | 95 #include "extensions/browser/app_window/native_app_window.h" |
| 96 #include "extensions/common/extension.h" | 96 #include "extensions/common/extension.h" |
| 97 #include "extensions/common/manifest_constants.h" | 97 #include "extensions/common/manifest_constants.h" |
| 98 #include "testing/gtest/include/gtest/gtest.h" | 98 #include "testing/gtest/include/gtest/gtest.h" |
| 99 #include "ui/aura/client/window_tree_client.h" | 99 #include "ui/aura/client/window_tree_client.h" |
| 100 #include "ui/aura/window.h" | 100 #include "ui/aura/window.h" |
| 101 #include "ui/base/models/menu_model.h" | 101 #include "ui/base/models/menu_model.h" |
| 102 #include "ui/display/display.h" | 102 #include "ui/display/display.h" |
| 103 #include "ui/display/display_switches.h" |
| 103 #include "ui/display/screen.h" | 104 #include "ui/display/screen.h" |
| 104 #include "ui/views/widget/widget.h" | 105 #include "ui/views/widget/widget.h" |
| 105 | 106 |
| 106 using base::ASCIIToUTF16; | 107 using base::ASCIIToUTF16; |
| 107 using extensions::Extension; | 108 using extensions::Extension; |
| 108 using extensions::Manifest; | 109 using extensions::Manifest; |
| 109 using extensions::UnloadedExtensionInfo; | 110 using extensions::UnloadedExtensionInfo; |
| 110 using arc::mojom::OrientationLock; | 111 using arc::mojom::OrientationLock; |
| 111 | 112 |
| 112 namespace { | 113 namespace { |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 protected: | 308 protected: |
| 308 ChromeLauncherControllerImplTest() | 309 ChromeLauncherControllerImplTest() |
| 309 : BrowserWithTestWindowTest(Browser::TYPE_TABBED, false), | 310 : BrowserWithTestWindowTest(Browser::TYPE_TABBED, false), |
| 310 test_controller_(NULL), | 311 test_controller_(NULL), |
| 311 extension_service_(NULL) {} | 312 extension_service_(NULL) {} |
| 312 | 313 |
| 313 ~ChromeLauncherControllerImplTest() override {} | 314 ~ChromeLauncherControllerImplTest() override {} |
| 314 | 315 |
| 315 void SetUp() override { | 316 void SetUp() override { |
| 316 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 317 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
| 317 command_line->AppendSwitch(ash::switches::kAshUseFirstDisplayAsInternal); | 318 command_line->AppendSwitch(switches::kUseFirstDisplayAsInternal); |
| 318 command_line->AppendSwitch(ash::switches::kAshEnableTouchViewTesting); | 319 command_line->AppendSwitch(ash::switches::kAshEnableTouchViewTesting); |
| 319 | 320 |
| 320 app_list::AppListSyncableServiceFactory::SetUseInTesting(); | 321 app_list::AppListSyncableServiceFactory::SetUseInTesting(); |
| 321 | 322 |
| 322 BrowserWithTestWindowTest::SetUp(); | 323 BrowserWithTestWindowTest::SetUp(); |
| 323 | 324 |
| 324 if (!profile_manager_) { | 325 if (!profile_manager_) { |
| 325 profile_manager_.reset( | 326 profile_manager_.reset( |
| 326 new TestingProfileManager(TestingBrowserProcess::GetGlobal())); | 327 new TestingProfileManager(TestingBrowserProcess::GetGlobal())); |
| 327 ASSERT_TRUE(profile_manager_->SetUp()); | 328 ASSERT_TRUE(profile_manager_->SetUp()); |
| (...skipping 3578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3906 EXPECT_TRUE(launcher_controller_->GetArcDeferredLauncher()->HasApp(app_id)); | 3907 EXPECT_TRUE(launcher_controller_->GetArcDeferredLauncher()->HasApp(app_id)); |
| 3907 | 3908 |
| 3908 std::string window_app_id("org.chromium.arc.1"); | 3909 std::string window_app_id("org.chromium.arc.1"); |
| 3909 CreateArcWindow(window_app_id); | 3910 CreateArcWindow(window_app_id); |
| 3910 arc_test_.app_instance()->SendTaskCreated(1, | 3911 arc_test_.app_instance()->SendTaskCreated(1, |
| 3911 arc_test_.fake_default_apps()[0]); | 3912 arc_test_.fake_default_apps()[0]); |
| 3912 | 3913 |
| 3913 EXPECT_NE(0, launcher_controller_->GetShelfIDForAppID(app_id)); | 3914 EXPECT_NE(0, launcher_controller_->GetShelfIDForAppID(app_id)); |
| 3914 EXPECT_FALSE(launcher_controller_->GetArcDeferredLauncher()->HasApp(app_id)); | 3915 EXPECT_FALSE(launcher_controller_->GetArcDeferredLauncher()->HasApp(app_id)); |
| 3915 } | 3916 } |
| OLD | NEW |