#include "apps/app_lifetime_monitor.h"
#include "apps/app_shim/app_shim_handler_mac.h"
-#include "apps/shell_window_registry.h"
+#include "apps/app_window_registry.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "content/public/browser/notification_observer.h"
namespace apps {
-class ShellWindow;
+class AppWindow;
// This app shim handler that handles events for app shims that correspond to an
// extension.
virtual void LoadProfileAsync(const base::FilePath& path,
base::Callback<void(Profile*)> callback);
- virtual ShellWindowRegistry::ShellWindowList GetWindows(
- Profile* profile, const std::string& extension_id);
+ virtual AppWindowRegistry::AppWindowList GetWindows(
+ Profile* profile,
+ const std::string& extension_id);
virtual const extensions::Extension* GetAppExtension(
Profile* profile, const std::string& extension_id);
+ virtual void EnableExtension(Profile* profile,
+ const std::string& extension_id,
+ const base::Callback<void()>& callback);
virtual void LaunchApp(Profile* profile,
const extensions::Extension* extension,
const std::vector<base::FilePath>& files);
AppShimHandler::Host* FindHost(Profile* profile, const std::string& app_id);
- static void QuitAppForWindow(ShellWindow* shell_window);
+ static void QuitAppForWindow(AppWindow* app_window);
- static void HideAppForWindow(ShellWindow* shell_window);
+ static void HideAppForWindow(AppWindow* app_window);
- static void FocusAppForWindow(ShellWindow* shell_window);
+ static void FocusAppForWindow(AppWindow* app_window);
// Brings the window to the front without showing it and instructs the shim to
// request user attention. Returns false if there is no shim for this window.
- static bool RequestUserAttentionForWindow(ShellWindow* shell_window);
+ static bool RequestUserAttentionForWindow(AppWindow* app_window);
// AppShimHandler overrides:
virtual void OnShimLaunch(Host* host,
const std::vector<base::FilePath>& files,
Profile* profile);
+ // This is passed to Delegate::EnableViaPrompt for shim-initiated launches
+ // where the extension is disabled.
+ void OnExtensionEnabled(const base::FilePath& profile_path,
+ const std::string& app_id,
+ const std::vector<base::FilePath>& files);
+
scoped_ptr<Delegate> delegate_;
HostMap hosts_;