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

Unified Diff: apps/shell/browser/shell_extension_system.cc

Issue 145723011: Add a specialized apps::NativeAppWindow for app_shell (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: similarity Created 6 years, 10 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: apps/shell/browser/shell_extension_system.cc
diff --git a/apps/shell/browser/shell_extension_system.cc b/apps/shell/browser/shell_extension_system.cc
index 324368fa76c7681a133da40b0223391447accf41..e47602b43304a86aa02a9e16a5eb76df1b5dc9e2 100644
--- a/apps/shell/browser/shell_extension_system.cc
+++ b/apps/shell/browser/shell_extension_system.cc
@@ -6,6 +6,7 @@
#include <string>
+#include "apps/shell_window_registry.h"
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "chrome/browser/chrome_notification_types.h"
@@ -59,6 +60,7 @@ bool ShellExtensionSystem::LoadAndLaunchApp(const base::FilePath& app_dir) {
<< " failed with: " << load_error;
return false;
}
+ app_id_ = extension->id();
// TODO(jamescook): We may want to do some of these things here:
// * Create a PermissionsUpdater.
@@ -97,6 +99,11 @@ bool ShellExtensionSystem::LoadAndLaunchApp(const base::FilePath& app_dir) {
return true;
}
+void ShellExtensionSystem::CloseApp() {
+ apps::ShellWindowRegistry::Get(browser_context_)
+ ->CloseAllShellWindowsForApp(app_id_);
+}
+
void ShellExtensionSystem::Shutdown() {
}

Powered by Google App Engine
This is Rietveld 408576698