Chromium Code Reviews| 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..8a4a88caa73eeb8c8c3f1c87ad47f7ba02623666 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,24 @@ 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* GetExtension( |
| + Profile* profile, const std::string& extension_id); |
| + virtual content::WebContents* LaunchApp( |
| + Profile* profile, |
| + const extensions::Extension* extension); |
| + virtual void LaunchShim(Profile* profile, |
| + const extensions::Extension* extension); |
| + |
| }; |
| ExtensionAppShimHandler(); |
| @@ -62,15 +80,11 @@ class ExtensionAppShimHandler : public AppShimHandler, |
| HostMap; |
| // Exposed for testing. |
| - void set_profile_manager_facade(ProfileManagerFacade* profile_manager_facade); |
| + void set_dependency_facade(Delegate* dependency_facade); |
|
tapted
2013/06/21 04:30:47
dependency_facade -> delegate
jackhou1
2013/06/21 05:46:27
Done.
|
| 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 +93,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_; |