Index: apps/app_shim/extension_app_shim_handler_mac.h |
diff --git a/apps/app_shim/extension_app_shim_handler_mac.h b/apps/app_shim/extension_app_shim_handler_mac.h |
index 043a4d5373ae2104d76a7d99043f2b2e02ec37de..25d991ec8c705b4f0d27c8eaf4840db022581726 100644 |
--- a/apps/app_shim/extension_app_shim_handler_mac.h |
+++ b/apps/app_shim/extension_app_shim_handler_mac.h |
@@ -11,6 +11,7 @@ |
#include "apps/app_lifetime_monitor.h" |
#include "apps/app_shim/app_shim_handler_mac.h" |
#include "base/memory/scoped_ptr.h" |
+#include "chrome/browser/extensions/shell_window_registry.h" |
#include "content/public/browser/notification_observer.h" |
#include "content/public/browser/notification_registrar.h" |
@@ -20,6 +21,10 @@ namespace base { |
class FilePath; |
} |
+namespace content { |
+class WebContents; |
+} |
+ |
namespace extensions { |
class Extension; |
} |
@@ -32,11 +37,23 @@ class ExtensionAppShimHandler : public AppShimHandler, |
public content::NotificationObserver, |
public AppLifetimeMonitor::Observer { |
public: |
- class ProfileManagerFacade { |
+ class Delegate { |
public: |
- virtual ~ProfileManagerFacade() {} |
+ virtual ~Delegate() {} |
+ |
virtual bool ProfileExistsForPath(const base::FilePath& path); |
virtual Profile* ProfileForPath(const base::FilePath& path); |
+ |
+ virtual extensions::ShellWindowRegistry::ShellWindowList GetWindows( |
+ Profile* profile, const std::string& extension_id); |
+ |
+ virtual const extensions::Extension* GetAppExtension( |
+ Profile* profile, const std::string& extension_id); |
+ virtual void LaunchApp(Profile* profile, |
+ const extensions::Extension* extension); |
+ virtual void LaunchShim(Profile* profile, |
+ const extensions::Extension* extension); |
+ |
}; |
ExtensionAppShimHandler(); |
@@ -62,15 +79,11 @@ class ExtensionAppShimHandler : public AppShimHandler, |
HostMap; |
// Exposed for testing. |
- void set_profile_manager_facade(ProfileManagerFacade* profile_manager_facade); |
+ void set_delegate(Delegate* delegate); |
HostMap& hosts() { return hosts_; } |
content::NotificationRegistrar& registrar() { return registrar_; } |
private: |
- virtual bool LaunchApp(Profile* profile, |
- const std::string& app_id, |
- AppShimLaunchType launch_type); |
- |
// Listen to the NOTIFICATION_EXTENSION_HOST_DESTROYED message to detect when |
// an app closes. When that happens, call OnAppClosed on the relevant |
// AppShimHandler::Host which causes the app shim process to quit. |
@@ -79,7 +92,7 @@ class ExtensionAppShimHandler : public AppShimHandler, |
const content::NotificationSource& source, |
const content::NotificationDetails& details) OVERRIDE; |
- scoped_ptr<ProfileManagerFacade> profile_manager_facade_; |
+ scoped_ptr<Delegate> delegate_; |
HostMap hosts_; |