Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1023)

Unified Diff: apps/app_shim/extension_app_shim_handler_mac.h

Issue 17481002: Restructure ExtensionAppShimHandler testing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | apps/app_shim/extension_app_shim_handler_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « no previous file | apps/app_shim/extension_app_shim_handler_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698