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 #import <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "apps/app_lifetime_monitor_factory.h" | 8 #include "apps/app_lifetime_monitor_factory.h" |
9 #include "apps/switches.h" | 9 #include "apps/switches.h" |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 // same event on the FILE thread, everything will be done by the time the | 283 // same event on the FILE thread, everything will be done by the time the |
284 // watcher's callback is executed. | 284 // watcher's callback is executed. |
285 scoped_refptr<WindowedFilePathWatcher> file_watcher = | 285 scoped_refptr<WindowedFilePathWatcher> file_watcher = |
286 new WindowedFilePathWatcher(shim_path); | 286 new WindowedFilePathWatcher(shim_path); |
287 web_app::UpdateAllShortcuts(base::string16(), profile, app); | 287 web_app::UpdateAllShortcuts(base::string16(), profile, app); |
288 file_watcher->Wait(); | 288 file_watcher->Wait(); |
289 } | 289 } |
290 | 290 |
291 Browser* GetFirstHostedAppWindow() { | 291 Browser* GetFirstHostedAppWindow() { |
292 BrowserList* browsers = | 292 BrowserList* browsers = |
293 BrowserList::GetInstance(chrome::HOST_DESKTOP_TYPE_NATIVE); | 293 BrowserList::GetInstance(ui::HOST_DESKTOP_TYPE_NATIVE); |
294 for (Browser* browser : *browsers) { | 294 for (Browser* browser : *browsers) { |
295 const extensions::Extension* extension = | 295 const extensions::Extension* extension = |
296 apps::ExtensionAppShimHandler::MaybeGetAppForBrowser(browser); | 296 apps::ExtensionAppShimHandler::MaybeGetAppForBrowser(browser); |
297 if (extension && extension->is_hosted_app()) | 297 if (extension && extension->is_hosted_app()) |
298 return browser; | 298 return browser; |
299 } | 299 } |
300 return nullptr; | 300 return nullptr; |
301 } | 301 } |
302 | 302 |
303 } // namespace | 303 } // namespace |
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
672 // the shim is rebuilt. | 672 // the shim is rebuilt. |
673 WindowedAppShimLaunchObserver(app->id()).Wait(); | 673 WindowedAppShimLaunchObserver(app->id()).Wait(); |
674 | 674 |
675 EXPECT_TRUE(GetFirstAppWindow()); | 675 EXPECT_TRUE(GetFirstAppWindow()); |
676 EXPECT_TRUE(HasAppShimHost(profile(), app->id())); | 676 EXPECT_TRUE(HasAppShimHost(profile(), app->id())); |
677 } | 677 } |
678 | 678 |
679 #endif // defined(ARCH_CPU_64_BITS) | 679 #endif // defined(ARCH_CPU_64_BITS) |
680 | 680 |
681 } // namespace apps | 681 } // namespace apps |
OLD | NEW |