| 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 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "apps/app_shim/app_shim_host_manager_mac.h" | 10 #include "apps/app_shim/app_shim_host_manager_mac.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 ExtensionAppShimHandler* handler) | 34 ExtensionAppShimHandler* handler) |
| 35 : profile_path_(profile_path), | 35 : profile_path_(profile_path), |
| 36 app_id_(app_id), | 36 app_id_(app_id), |
| 37 handler_(handler) {} | 37 handler_(handler) {} |
| 38 | 38 |
| 39 virtual void OnAppLaunchComplete(AppShimLaunchResult result) OVERRIDE {} | 39 virtual void OnAppLaunchComplete(AppShimLaunchResult result) OVERRIDE {} |
| 40 virtual void OnAppClosed() OVERRIDE { | 40 virtual void OnAppClosed() OVERRIDE { |
| 41 handler_->OnShimClose(this); | 41 handler_->OnShimClose(this); |
| 42 } | 42 } |
| 43 virtual void OnAppHide() OVERRIDE {} | 43 virtual void OnAppHide() OVERRIDE {} |
| 44 virtual void OnAppRequestUserAttention() OVERRIDE {} | 44 virtual void OnAppRequestUserAttention(AppShimAttentionType type) OVERRIDE {} |
| 45 virtual base::FilePath GetProfilePath() const OVERRIDE { | 45 virtual base::FilePath GetProfilePath() const OVERRIDE { |
| 46 return profile_path_; | 46 return profile_path_; |
| 47 } | 47 } |
| 48 virtual std::string GetAppId() const OVERRIDE { return app_id_; } | 48 virtual std::string GetAppId() const OVERRIDE { return app_id_; } |
| 49 | 49 |
| 50 private: | 50 private: |
| 51 base::FilePath profile_path_; | 51 base::FilePath profile_path_; |
| 52 std::string app_id_; | 52 std::string app_id_; |
| 53 ExtensionAppShimHandler* handler_; | 53 ExtensionAppShimHandler* handler_; |
| 54 | 54 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 atStart:NO]; | 123 atStart:NO]; |
| 124 | 124 |
| 125 // This will time out if the event above does not terminate Chrome. | 125 // This will time out if the event above does not terminate Chrome. |
| 126 content::RunMessageLoop(); | 126 content::RunMessageLoop(); |
| 127 | 127 |
| 128 EXPECT_FALSE(handler_->FindHost(profile(), extension_id_)); | 128 EXPECT_FALSE(handler_->FindHost(profile(), extension_id_)); |
| 129 EXPECT_TRUE(browser_shutdown::IsTryingToQuit()); | 129 EXPECT_TRUE(browser_shutdown::IsTryingToQuit()); |
| 130 } | 130 } |
| 131 | 131 |
| 132 } // namespace apps | 132 } // namespace apps |
| OLD | NEW |