| OLD | NEW |
| 1 /// Copyright 2014 The Chromium Authors. All rights reserved. | 1 /// Copyright 2014 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 "athena/activity/public/activity_factory.h" | 5 #include "athena/activity/public/activity_factory.h" |
| 6 #include "athena/activity/public/activity_manager.h" | 6 #include "athena/activity/public/activity_manager.h" |
| 7 #include "athena/content/app_activity.h" | 7 #include "athena/content/app_activity.h" |
| 8 #include "athena/content/app_activity_registry.h" | 8 #include "athena/content/app_activity_registry.h" |
| 9 #include "athena/content/public/app_registry.h" | 9 #include "athena/content/public/app_registry.h" |
| 10 #include "athena/extensions/public/extensions_delegate.h" | 10 #include "athena/extensions/public/extensions_delegate.h" |
| 11 #include "athena/resource_manager/public/resource_manager.h" | 11 #include "athena/resource_manager/public/resource_manager.h" |
| 12 #include "athena/test/base/athena_test_base.h" | 12 #include "athena/test/base/athena_test_base.h" |
| 13 #include "extensions/browser/install/extension_install_ui.h" |
| 13 #include "extensions/common/extension_set.h" | 14 #include "extensions/common/extension_set.h" |
| 14 #include "ui/aura/window.h" | 15 #include "ui/aura/window.h" |
| 15 #include "ui/views/view.h" | 16 #include "ui/views/view.h" |
| 16 #include "ui/views/widget/widget.h" | 17 #include "ui/views/widget/widget.h" |
| 17 | 18 |
| 18 namespace content { | 19 namespace content { |
| 19 class BrowserContext; | 20 class BrowserContext; |
| 20 } | 21 } |
| 21 | 22 |
| 22 namespace athena { | 23 namespace athena { |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 virtual bool UnloadApp(const std::string& app_id) override { | 117 virtual bool UnloadApp(const std::string& app_id) override { |
| 117 unload_called_++; | 118 unload_called_++; |
| 118 // Since we did not close anything we let the framework clean up. | 119 // Since we did not close anything we let the framework clean up. |
| 119 return false; | 120 return false; |
| 120 } | 121 } |
| 121 // Restarts an application. Returns true when the restart was initiated. | 122 // Restarts an application. Returns true when the restart was initiated. |
| 122 virtual bool LaunchApp(const std::string& app_id) override { | 123 virtual bool LaunchApp(const std::string& app_id) override { |
| 123 restart_called_++; | 124 restart_called_++; |
| 124 return true; | 125 return true; |
| 125 } | 126 } |
| 127 virtual scoped_ptr<extensions::ExtensionInstallUI> CreateExtensionInstallUI() |
| 128 override { |
| 129 return scoped_ptr<extensions::ExtensionInstallUI>(); |
| 130 } |
| 126 | 131 |
| 127 private: | 132 private: |
| 128 int unload_called_; | 133 int unload_called_; |
| 129 int restart_called_; | 134 int restart_called_; |
| 130 | 135 |
| 131 extensions::ExtensionSet extension_set_; | 136 extensions::ExtensionSet extension_set_; |
| 132 | 137 |
| 133 DISALLOW_COPY_AND_ASSIGN(TestExtensionsDelegate); | 138 DISALLOW_COPY_AND_ASSIGN(TestExtensionsDelegate); |
| 134 }; | 139 }; |
| 135 | 140 |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 // However - the restart in this test framework does not really restart and | 431 // However - the restart in this test framework does not really restart and |
| 427 // all objects should be still there.. | 432 // all objects should be still there.. |
| 428 EXPECT_EQ(1, AppRegistry::Get()->NumberOfApplications()); | 433 EXPECT_EQ(1, AppRegistry::Get()->NumberOfApplications()); |
| 429 EXPECT_TRUE(app_activity_registry->unloaded_activity_proxy()); | 434 EXPECT_TRUE(app_activity_registry->unloaded_activity_proxy()); |
| 430 Activity::Delete(app_activity_registry->unloaded_activity_proxy()); | 435 Activity::Delete(app_activity_registry->unloaded_activity_proxy()); |
| 431 EXPECT_EQ(0, AppRegistry::Get()->NumberOfApplications()); | 436 EXPECT_EQ(0, AppRegistry::Get()->NumberOfApplications()); |
| 432 } | 437 } |
| 433 | 438 |
| 434 } // namespace test | 439 } // namespace test |
| 435 } // namespace athena | 440 } // namespace athena |
| OLD | NEW |