| 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 #import "chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.h" | 5 #import "chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.h" |
| 6 | 6 |
| 7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
| 8 | 8 |
| 9 #include "apps/app_window_registry.h" | 9 #include "apps/app_window_registry.h" |
| 10 #include "apps/ui/native_app_window.h" | 10 #include "apps/ui/native_app_window.h" |
| 11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
| 12 #include "base/mac/scoped_nsobject.h" | 12 #include "base/mac/scoped_nsobject.h" |
| 13 #include "base/strings/sys_string_conversions.h" | 13 #include "base/strings/sys_string_conversions.h" |
| 14 #include "chrome/browser/apps/app_browsertest_util.h" | 14 #include "chrome/browser/apps/app_browsertest_util.h" |
| 15 #include "chrome/browser/extensions/extension_service.h" | 15 #include "chrome/browser/extensions/extension_service.h" |
| 16 #include "chrome/browser/extensions/extension_test_message_listener.h" | 16 #include "chrome/browser/extensions/extension_test_message_listener.h" |
| 17 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
| 18 #include "chrome/browser/ui/browser_iterator.h" | 18 #include "chrome/browser/ui/browser_iterator.h" |
| 19 #include "chrome/browser/ui/browser_window.h" | 19 #include "chrome/browser/ui/browser_window.h" |
| 20 #include "chrome/common/chrome_switches.h" | 20 #include "chrome/common/chrome_switches.h" |
| 21 #include "extensions/browser/uninstall_reason.h" |
| 21 #include "extensions/common/extension.h" | 22 #include "extensions/common/extension.h" |
| 22 | 23 |
| 23 namespace { | 24 namespace { |
| 24 | 25 |
| 25 class AppShimMenuControllerBrowserTest | 26 class AppShimMenuControllerBrowserTest |
| 26 : public extensions::PlatformAppBrowserTest { | 27 : public extensions::PlatformAppBrowserTest { |
| 27 protected: | 28 protected: |
| 28 AppShimMenuControllerBrowserTest() | 29 AppShimMenuControllerBrowserTest() |
| 29 : app_1_(NULL), | 30 : app_1_(NULL), |
| 30 app_2_(NULL), | 31 app_2_(NULL), |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 ->GetAppWindowsForApp(app_1_->id()) | 144 ->GetAppWindowsForApp(app_1_->id()) |
| 144 .front(); | 145 .front(); |
| 145 [[NSNotificationCenter defaultCenter] | 146 [[NSNotificationCenter defaultCenter] |
| 146 postNotificationName:NSWindowDidBecomeMainNotification | 147 postNotificationName:NSWindowDidBecomeMainNotification |
| 147 object:app_1_app_window->GetNativeWindow()]; | 148 object:app_1_app_window->GetNativeWindow()]; |
| 148 | 149 |
| 149 CheckHasAppMenus(app_1_); | 150 CheckHasAppMenus(app_1_); |
| 150 ExtensionService::UninstallExtensionHelper( | 151 ExtensionService::UninstallExtensionHelper( |
| 151 extension_service(), | 152 extension_service(), |
| 152 app_1_->id(), | 153 app_1_->id(), |
| 153 ExtensionService::UNINSTALL_REASON_FOR_TESTING); | 154 extensions::UNINSTALL_REASON_FOR_TESTING); |
| 154 CheckNoAppMenus(); | 155 CheckNoAppMenus(); |
| 155 } | 156 } |
| 156 | 157 |
| 157 } // namespace | 158 } // namespace |
| OLD | NEW |