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

Unified Diff: extensions/shell/browser/shell_extension_system.h

Issue 642383003: Add the ability to load multiple apps into app_shell. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: windows Created 6 years, 2 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
Index: extensions/shell/browser/shell_extension_system.h
diff --git a/extensions/shell/browser/shell_extension_system.h b/extensions/shell/browser/shell_extension_system.h
index 08004cebeb599b1cb7291faa96138399182f1d1c..1fa1b726d72696eb473f58f598f23afcd8612dfb 100644
--- a/extensions/shell/browser/shell_extension_system.h
+++ b/extensions/shell/browser/shell_extension_system.h
@@ -9,6 +9,7 @@
#include "base/compiler_specific.h"
#include "extensions/browser/extension_system.h"
+#include "extensions/common/extension_set.h"
James Cook 2014/10/24 00:26:49 I don't think you need this header any more.
lfg 2014/10/24 15:23:15 Done.
#include "extensions/common/one_shot_event.h"
class BrowserContextKeyedServiceFactory;
@@ -38,17 +39,19 @@ class ShellExtensionSystem : public ExtensionSystem {
explicit ShellExtensionSystem(content::BrowserContext* browser_context);
~ShellExtensionSystem() override;
- // Loads an unpacked application from a directory. Returns true on success.
- bool LoadApp(const base::FilePath& app_dir);
+ // Loads an unpacked application from a directory. Returns the extension on
+ // success, or null otherwise.
+ const Extension* LoadApp(const base::FilePath& app_dir);
- // Launch the currently loaded app.
- void LaunchApp();
+ // Initializes the extension system.
+ void Init();
+
+ // Launch the app with id |extension_id|.
+ void LaunchApp(const ExtensionId& extension_id);
James Cook 2014/10/24 00:26:49 optional: A lot of code in extensions (most?) just
lfg 2014/10/24 15:23:15 Done.
// KeyedService implementation:
void Shutdown() override;
- scoped_refptr<Extension> extension() { return extension_; }
-
// ExtensionSystem implementation:
void InitForRegularProfile(bool extensions_enabled) override;
ExtensionService* extension_service() override;
@@ -81,11 +84,6 @@ class ShellExtensionSystem : public ExtensionSystem {
private:
content::BrowserContext* browser_context_; // Not owned.
- // Extension ID for the app.
- std::string app_id_;
-
- scoped_refptr<Extension> extension_;
-
// Data to be accessed on the IO thread. Must outlive process_manager_.
scoped_refptr<InfoMap> info_map_;

Powered by Google App Engine
This is Rietveld 408576698