| 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 // Tests behavior when quitting apps with app shims. | 5 // Tests behavior when quitting apps with app shims. |
| 6 | 6 |
| 7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
| 8 | 8 |
| 9 #include "apps/app_shim/app_shim_host_manager_mac.h" | 9 #include "apps/app_shim/app_shim_host_manager_mac.h" |
| 10 #include "apps/app_shim/extension_app_shim_handler_mac.h" | 10 #include "apps/app_shim/extension_app_shim_handler_mac.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 const std::string& app_id, | 32 const std::string& app_id, |
| 33 ExtensionAppShimHandler* handler) | 33 ExtensionAppShimHandler* handler) |
| 34 : profile_path_(profile_path), | 34 : profile_path_(profile_path), |
| 35 app_id_(app_id), | 35 app_id_(app_id), |
| 36 handler_(handler) {} | 36 handler_(handler) {} |
| 37 | 37 |
| 38 virtual void OnAppLaunchComplete(AppShimLaunchResult result) OVERRIDE {} | 38 virtual void OnAppLaunchComplete(AppShimLaunchResult result) OVERRIDE {} |
| 39 virtual void OnAppClosed() OVERRIDE { | 39 virtual void OnAppClosed() OVERRIDE { |
| 40 handler_->OnShimClose(this); | 40 handler_->OnShimClose(this); |
| 41 } | 41 } |
| 42 virtual void OnAppHide() OVERRIDE {} |
| 42 virtual void OnAppRequestUserAttention() OVERRIDE {} | 43 virtual void OnAppRequestUserAttention() OVERRIDE {} |
| 43 virtual base::FilePath GetProfilePath() const OVERRIDE { | 44 virtual base::FilePath GetProfilePath() const OVERRIDE { |
| 44 return profile_path_; | 45 return profile_path_; |
| 45 } | 46 } |
| 46 virtual std::string GetAppId() const OVERRIDE { return app_id_; } | 47 virtual std::string GetAppId() const OVERRIDE { return app_id_; } |
| 47 | 48 |
| 48 private: | 49 private: |
| 49 base::FilePath profile_path_; | 50 base::FilePath profile_path_; |
| 50 std::string app_id_; | 51 std::string app_id_; |
| 51 ExtensionAppShimHandler* handler_; | 52 ExtensionAppShimHandler* handler_; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 atStart:NO]; | 118 atStart:NO]; |
| 118 | 119 |
| 119 // This will time out if the event above does not terminate Chrome. | 120 // This will time out if the event above does not terminate Chrome. |
| 120 content::RunMessageLoop(); | 121 content::RunMessageLoop(); |
| 121 | 122 |
| 122 EXPECT_FALSE(handler_->FindHost(profile(), extension_id_)); | 123 EXPECT_FALSE(handler_->FindHost(profile(), extension_id_)); |
| 123 EXPECT_TRUE(browser_shutdown::IsTryingToQuit()); | 124 EXPECT_TRUE(browser_shutdown::IsTryingToQuit()); |
| 124 } | 125 } |
| 125 | 126 |
| 126 } // namespace apps | 127 } // namespace apps |
| OLD | NEW |