summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/app_lifetime_monitor.cc1
-rw-r--r--apps/app_lifetime_monitor.h6
-rw-r--r--apps/app_lifetime_monitor_factory.cc4
-rw-r--r--apps/app_load_service.cc4
-rw-r--r--apps/app_load_service_factory.cc4
-rw-r--r--apps/app_restore_service.h2
-rw-r--r--apps/app_shim/extension_app_shim_handler_mac.cc13
-rw-r--r--apps/app_shim/extension_app_shim_handler_mac.h4
-rw-r--r--apps/app_shim/extension_app_shim_handler_mac_unittest.cc2
-rw-r--r--apps/apps.gypi2
-rw-r--r--apps/shell_window.cc10
-rw-r--r--apps/shell_window_registry.cc (renamed from chrome/browser/extensions/shell_window_registry.cc)12
-rw-r--r--apps/shell_window_registry.h (renamed from chrome/browser/extensions/shell_window_registry.h)16
-rw-r--r--chrome/browser/app_controller_mac.mm6
-rw-r--r--chrome/browser/app_controller_mac_browsertest.mm8
-rw-r--r--chrome/browser/chromeos/app_mode/app_session_lifetime.cc8
-rw-r--r--chrome/browser/extensions/DEPS1
-rw-r--r--chrome/browser/extensions/api/app_current_window_internal/app_current_window_internal_api.cc5
-rw-r--r--chrome/browser/extensions/api/app_window/app_window_api.cc7
-rw-r--r--chrome/browser/extensions/api/app_window/app_window_apitest.cc8
-rw-r--r--chrome/browser/extensions/api/developer_private/developer_private_api.cc3
-rw-r--r--chrome/browser/extensions/api/file_system/file_system_api.cc5
-rw-r--r--chrome/browser/extensions/api/identity/web_auth_flow.cc4
-rw-r--r--chrome/browser/extensions/api/identity/web_auth_flow.h6
-rw-r--r--chrome/browser/extensions/api/media_galleries/media_galleries_api.cc4
-rw-r--r--chrome/browser/extensions/api/tabs/tabs_api.cc2
-rw-r--r--chrome/browser/extensions/extension_service.cc1
-rw-r--r--chrome/browser/extensions/extension_tab_util.cc6
-rw-r--r--chrome/browser/extensions/platform_app_browsertest.cc3
-rw-r--r--chrome/browser/extensions/platform_app_browsertest_util.cc3
-rw-r--r--chrome/browser/extensions/web_view_interactive_browsertest.cc6
-rw-r--r--chrome/browser/extensions/window_open_apitest.cc4
-rw-r--r--chrome/browser/ui/ash/chrome_shell_delegate.cc4
-rw-r--r--chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc8
-rw-r--r--chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc2
-rw-r--r--chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app_browsertest.cc8
-rw-r--r--chrome/browser/ui/ash/launcher/shell_window_launcher_controller.cc2
-rw-r--r--chrome/browser/ui/ash/launcher/shell_window_launcher_controller.h6
-rw-r--r--chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc4
-rw-r--r--chrome/browser/ui/extensions/apps_metro_handler_win.cc4
-rw-r--r--chrome/browser/ui/views/select_file_dialog_extension.cc4
-rw-r--r--chrome/browser/ui/webui/extensions/extension_settings_handler.cc8
-rw-r--r--chrome/chrome_browser_extensions.gypi2
43 files changed, 111 insertions, 111 deletions
diff --git a/apps/app_lifetime_monitor.cc b/apps/app_lifetime_monitor.cc
index 8e4819a..8547be9 100644
--- a/apps/app_lifetime_monitor.cc
+++ b/apps/app_lifetime_monitor.cc
@@ -15,7 +15,6 @@ namespace apps {
using extensions::Extension;
using extensions::ExtensionHost;
-using extensions::ShellWindowRegistry;
AppLifetimeMonitor::AppLifetimeMonitor(Profile* profile)
: profile_(profile) {
diff --git a/apps/app_lifetime_monitor.h b/apps/app_lifetime_monitor.h
index f18a97d..2da6550 100644
--- a/apps/app_lifetime_monitor.h
+++ b/apps/app_lifetime_monitor.h
@@ -8,8 +8,8 @@
#include <string>
#include <vector>
+#include "apps/shell_window_registry.h"
#include "base/observer_list.h"
-#include "chrome/browser/extensions/shell_window_registry.h"
#include "components/browser_context_keyed_service/browser_context_keyed_service.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
@@ -26,7 +26,7 @@ namespace apps {
// events.
class AppLifetimeMonitor : public BrowserContextKeyedService,
public content::NotificationObserver,
- public extensions::ShellWindowRegistry::Observer {
+ public ShellWindowRegistry::Observer {
public:
class Observer {
public:
@@ -61,7 +61,7 @@ class AppLifetimeMonitor : public BrowserContextKeyedService,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
- // extensions::ShellWindowRegistry::Observer overrides:
+ // ShellWindowRegistry::Observer overrides:
virtual void OnShellWindowAdded(ShellWindow* shell_window) OVERRIDE;
virtual void OnShellWindowIconChanged(ShellWindow* shell_window) OVERRIDE;
virtual void OnShellWindowRemoved(ShellWindow* shell_window) OVERRIDE;
diff --git a/apps/app_lifetime_monitor_factory.cc b/apps/app_lifetime_monitor_factory.cc
index 4d828b0..1fb7994 100644
--- a/apps/app_lifetime_monitor_factory.cc
+++ b/apps/app_lifetime_monitor_factory.cc
@@ -5,7 +5,7 @@
#include "apps/app_lifetime_monitor_factory.h"
#include "apps/app_lifetime_monitor.h"
-#include "chrome/browser/extensions/shell_window_registry.h"
+#include "apps/shell_window_registry.h"
#include "chrome/browser/profiles/incognito_helpers.h"
#include "chrome/browser/profiles/profile.h"
#include "components/browser_context_keyed_service/browser_context_dependency_manager.h"
@@ -26,7 +26,7 @@ AppLifetimeMonitorFactory::AppLifetimeMonitorFactory()
: BrowserContextKeyedServiceFactory(
"AppLifetimeMonitor",
BrowserContextDependencyManager::GetInstance()) {
- DependsOn(extensions::ShellWindowRegistry::Factory::GetInstance());
+ DependsOn(ShellWindowRegistry::Factory::GetInstance());
}
AppLifetimeMonitorFactory::~AppLifetimeMonitorFactory() {}
diff --git a/apps/app_load_service.cc b/apps/app_load_service.cc
index d2423c0..a0a6a66 100644
--- a/apps/app_load_service.cc
+++ b/apps/app_load_service.cc
@@ -6,12 +6,12 @@
#include "apps/app_load_service_factory.h"
#include "apps/launcher.h"
+#include "apps/shell_window_registry.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/extensions/extension_host.h"
#include "chrome/browser/extensions/extension_prefs.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_system.h"
-#include "chrome/browser/extensions/shell_window_registry.h"
#include "chrome/browser/extensions/unpacked_installer.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/extensions/extension.h"
@@ -125,7 +125,7 @@ void AppLoadService::Observe(int type,
}
bool AppLoadService::HasShellWindows(const std::string& extension_id) {
- return !extensions::ShellWindowRegistry::Get(profile_)->
+ return !ShellWindowRegistry::Get(profile_)->
GetShellWindowsForApp(extension_id).empty();
}
diff --git a/apps/app_load_service_factory.cc b/apps/app_load_service_factory.cc
index 37c2d45..a68cf94 100644
--- a/apps/app_load_service_factory.cc
+++ b/apps/app_load_service_factory.cc
@@ -5,9 +5,9 @@
#include "apps/app_load_service_factory.h"
#include "apps/app_load_service.h"
+#include "apps/shell_window_registry.h"
#include "chrome/browser/extensions/extension_prefs_factory.h"
#include "chrome/browser/extensions/extension_system_factory.h"
-#include "chrome/browser/extensions/shell_window_registry.h"
#include "chrome/browser/profiles/incognito_helpers.h"
#include "chrome/browser/profiles/profile.h"
#include "components/browser_context_keyed_service/browser_context_dependency_manager.h"
@@ -30,7 +30,7 @@ AppLoadServiceFactory::AppLoadServiceFactory()
BrowserContextDependencyManager::GetInstance()) {
DependsOn(extensions::ExtensionPrefsFactory::GetInstance());
DependsOn(extensions::ExtensionSystemFactory::GetInstance());
- DependsOn(extensions::ShellWindowRegistry::Factory::GetInstance());
+ DependsOn(ShellWindowRegistry::Factory::GetInstance());
}
AppLoadServiceFactory::~AppLoadServiceFactory() {
diff --git a/apps/app_restore_service.h b/apps/app_restore_service.h
index 5a66005..425364e 100644
--- a/apps/app_restore_service.h
+++ b/apps/app_restore_service.h
@@ -9,7 +9,7 @@
#include <vector>
#include "apps/app_lifetime_monitor.h"
-#include "chrome/browser/extensions/shell_window_registry.h"
+#include "apps/shell_window_registry.h"
#include "components/browser_context_keyed_service/browser_context_keyed_service.h"
namespace extensions {
diff --git a/apps/app_shim/extension_app_shim_handler_mac.cc b/apps/app_shim/extension_app_shim_handler_mac.cc
index 9173767..130c7f1 100644
--- a/apps/app_shim/extension_app_shim_handler_mac.cc
+++ b/apps/app_shim/extension_app_shim_handler_mac.cc
@@ -9,6 +9,7 @@
#include "apps/app_shim/app_shim_messages.h"
#include "apps/native_app_window.h"
#include "apps/shell_window.h"
+#include "apps/shell_window_registry.h"
#include "base/files/file_path.h"
#include "base/logging.h"
#include "chrome/browser/browser_process.h"
@@ -16,7 +17,6 @@
#include "chrome/browser/extensions/extension_host.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_system.h"
-#include "chrome/browser/extensions/shell_window_registry.h"
#include "chrome/browser/lifetime/application_lifetime.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
@@ -44,7 +44,7 @@ void ProfileLoadedCallback(base::Callback<void(Profile*)> callback,
void TerminateIfNoShellWindows() {
bool shell_windows_left =
- extensions::ShellWindowRegistry::IsShellWindowRegisteredInAnyProfile(0);
+ apps::ShellWindowRegistry::IsShellWindowRegisteredInAnyProfile(0);
if (!shell_windows_left)
chrome::AttemptExit();
}
@@ -53,7 +53,7 @@ void TerminateIfNoShellWindows() {
namespace apps {
-typedef extensions::ShellWindowRegistry::ShellWindowList ShellWindowList;
+typedef ShellWindowRegistry::ShellWindowList ShellWindowList;
bool ExtensionAppShimHandler::Delegate::ProfileExistsForPath(
const base::FilePath& path) {
@@ -89,8 +89,7 @@ void ExtensionAppShimHandler::Delegate::LoadProfileAsync(
ShellWindowList ExtensionAppShimHandler::Delegate::GetWindows(
Profile* profile,
const std::string& extension_id) {
- return extensions::ShellWindowRegistry::Get(profile)->
- GetShellWindowsForApp(extension_id);
+ return ShellWindowRegistry::Get(profile)->GetShellWindowsForApp(extension_id);
}
const extensions::Extension*
@@ -167,7 +166,7 @@ void ExtensionAppShimHandler::QuitAppForWindow(ShellWindow* shell_window) {
handler->OnShimQuit(host);
} else {
// App shims might be disabled or the shim is still starting up.
- extensions::ShellWindowRegistry::Get(shell_window->profile())->
+ ShellWindowRegistry::Get(shell_window->profile())->
CloseAllShellWindowsForApp(shell_window->extension_id());
}
}
@@ -305,7 +304,7 @@ void ExtensionAppShimHandler::OnShimQuit(Host* host) {
const std::string& app_id = host->GetAppId();
const ShellWindowList windows =
delegate_->GetWindows(profile, app_id);
- for (extensions::ShellWindowRegistry::const_iterator it = windows.begin();
+ for (ShellWindowRegistry::const_iterator it = windows.begin();
it != windows.end(); ++it) {
(*it)->GetBaseWindow()->Close();
}
diff --git a/apps/app_shim/extension_app_shim_handler_mac.h b/apps/app_shim/extension_app_shim_handler_mac.h
index 616fd78..8a9f64e 100644
--- a/apps/app_shim/extension_app_shim_handler_mac.h
+++ b/apps/app_shim/extension_app_shim_handler_mac.h
@@ -10,9 +10,9 @@
#include "apps/app_lifetime_monitor.h"
#include "apps/app_shim/app_shim_handler_mac.h"
+#include "apps/shell_window_registry.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
-#include "chrome/browser/extensions/shell_window_registry.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
@@ -47,7 +47,7 @@ class ExtensionAppShimHandler : public AppShimHandler,
virtual void LoadProfileAsync(const base::FilePath& path,
base::Callback<void(Profile*)> callback);
- virtual extensions::ShellWindowRegistry::ShellWindowList GetWindows(
+ virtual ShellWindowRegistry::ShellWindowList GetWindows(
Profile* profile, const std::string& extension_id);
virtual const extensions::Extension* GetAppExtension(
diff --git a/apps/app_shim/extension_app_shim_handler_mac_unittest.cc b/apps/app_shim/extension_app_shim_handler_mac_unittest.cc
index 33941de7..636ba1b 100644
--- a/apps/app_shim/extension_app_shim_handler_mac_unittest.cc
+++ b/apps/app_shim/extension_app_shim_handler_mac_unittest.cc
@@ -16,7 +16,7 @@
namespace apps {
using extensions::Extension;
-typedef extensions::ShellWindowRegistry::ShellWindowList ShellWindowList;
+typedef ShellWindowRegistry::ShellWindowList ShellWindowList;
using ::testing::_;
using ::testing::Invoke;
diff --git a/apps/apps.gypi b/apps/apps.gypi
index 59f4c75..7e2c179 100644
--- a/apps/apps.gypi
+++ b/apps/apps.gypi
@@ -70,6 +70,8 @@
'shell_window.h',
'shell_window_geometry_cache.cc',
'shell_window_geometry_cache.h',
+ 'shell_window_registry.cc',
+ 'shell_window_registry.h',
'switches.cc',
'switches.h',
],
diff --git a/apps/shell_window.cc b/apps/shell_window.cc
index 12585aa..10ab851 100644
--- a/apps/shell_window.cc
+++ b/apps/shell_window.cc
@@ -6,13 +6,13 @@
#include "apps/native_app_window.h"
#include "apps/shell_window_geometry_cache.h"
+#include "apps/shell_window_registry.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/extensions/extension_process_manager.h"
#include "chrome/browser/extensions/extension_system.h"
-#include "chrome/browser/extensions/shell_window_registry.h"
#include "chrome/browser/extensions/suggest_permission_util.h"
#include "chrome/browser/lifetime/application_lifetime.h"
#include "chrome/browser/profiles/profile.h"
@@ -194,7 +194,7 @@ void ShellWindow::Init(const GURL& url,
UpdateExtensionAppIcon();
- extensions::ShellWindowRegistry::Get(profile_)->AddShellWindow(this);
+ ShellWindowRegistry::Get(profile_)->AddShellWindow(this);
}
ShellWindow::~ShellWindow() {
@@ -280,7 +280,7 @@ void ShellWindow::RequestToLockMouse(WebContents* web_contents,
}
void ShellWindow::OnNativeClose() {
- extensions::ShellWindowRegistry::Get(profile_)->RemoveShellWindow(this);
+ ShellWindowRegistry::Get(profile_)->RemoveShellWindow(this);
if (shell_window_contents_)
shell_window_contents_->NativeWindowClosed();
delete this;
@@ -293,7 +293,7 @@ void ShellWindow::OnNativeWindowChanged() {
}
void ShellWindow::OnNativeWindowActivated() {
- extensions::ShellWindowRegistry::Get(profile_)->ShellWindowActivated(this);
+ ShellWindowRegistry::Get(profile_)->ShellWindowActivated(this);
}
scoped_ptr<gfx::Image> ShellWindow::GetAppListIcon() {
@@ -374,7 +374,7 @@ void ShellWindow::UpdateAppIcon(const gfx::Image& image) {
return;
app_icon_ = image;
native_app_window_->UpdateWindowIcon();
- extensions::ShellWindowRegistry::Get(profile_)->ShellWindowIconChanged(this);
+ ShellWindowRegistry::Get(profile_)->ShellWindowIconChanged(this);
}
void ShellWindow::Fullscreen() {
diff --git a/chrome/browser/extensions/shell_window_registry.cc b/apps/shell_window_registry.cc
index d4275af..301bcf1 100644
--- a/chrome/browser/extensions/shell_window_registry.cc
+++ b/apps/shell_window_registry.cc
@@ -1,11 +1,11 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "apps/native_app_window.h"
#include "apps/shell_window.h"
+#include "apps/shell_window_registry.h"
#include "chrome/browser/browser_process.h"
-#include "chrome/browser/extensions/shell_window_registry.h"
#include "chrome/browser/profiles/incognito_helpers.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/common/extensions/extension.h"
@@ -17,8 +17,6 @@
#include "content/public/browser/site_instance.h"
#include "content/public/browser/web_contents.h"
-using apps::ShellWindow;
-
namespace {
// Create a key that identifies a ShellWindow in a RenderViewHost across App
@@ -27,9 +25,9 @@ namespace {
// |id|, the chrome-extension://extension-id/page.html URL will be used. If the
// RenderViewHost is not for a ShellWindow, return an empty string.
std::string GetWindowKeyForRenderViewHost(
- const extensions::ShellWindowRegistry* registry,
+ const apps::ShellWindowRegistry* registry,
content::RenderViewHost* render_view_host) {
- ShellWindow* shell_window =
+ apps::ShellWindow* shell_window =
registry->GetShellWindowForRenderViewHost(render_view_host);
if (!shell_window)
return std::string(); // Not a ShellWindow.
@@ -45,7 +43,7 @@ std::string GetWindowKeyForRenderViewHost(
} // namespace
-namespace extensions {
+namespace apps {
ShellWindowRegistry::ShellWindowRegistry(Profile* profile)
: profile_(profile),
diff --git a/chrome/browser/extensions/shell_window_registry.h b/apps/shell_window_registry.h
index fb5f48e..e23c5e9 100644
--- a/chrome/browser/extensions/shell_window_registry.h
+++ b/apps/shell_window_registry.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_EXTENSIONS_SHELL_WINDOW_REGISTRY_H_
-#define CHROME_BROWSER_EXTENSIONS_SHELL_WINDOW_REGISTRY_H_
+#ifndef APPS_SHELL_WINDOW_REGISTRY_H_
+#define APPS_SHELL_WINDOW_REGISTRY_H_
#include <list>
@@ -17,16 +17,14 @@
class Profile;
-namespace apps {
-class ShellWindow;
-}
-
namespace content {
class DevToolsAgentHost;
class RenderViewHost;
}
-namespace extensions {
+namespace apps {
+
+class ShellWindow;
// The ShellWindowRegistry tracks the ShellWindows for all platform apps for a
// particular profile.
@@ -150,4 +148,4 @@ class ShellWindowRegistry : public BrowserContextKeyedService {
} // namespace extensions
-#endif // CHROME_BROWSER_EXTENSIONS_SHELL_WINDOW_REGISTRY_H_
+#endif // APPS_SHELL_WINDOW_REGISTRY_H_
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm
index 859a539..d360a60 100644
--- a/chrome/browser/app_controller_mac.mm
+++ b/chrome/browser/app_controller_mac.mm
@@ -6,6 +6,7 @@
#include "apps/app_shim/extension_app_shim_handler_mac.h"
#include "apps/shell_window.h"
+#include "apps/shell_window_registry.h"
#include "base/auto_reset.h"
#include "base/bind.h"
#include "base/command_line.h"
@@ -28,7 +29,6 @@
#include "chrome/browser/download/download_service_factory.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_system.h"
-#include "chrome/browser/extensions/shell_window_registry.h"
#include "chrome/browser/first_run/first_run.h"
#include "chrome/browser/lifetime/application_lifetime.h"
#include "chrome/browser/printing/print_dialog_cloud.h"
@@ -388,7 +388,7 @@ class AppControllerProfileObserver : public ProfileInfoCacheObserver {
}
- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication*)app {
- using extensions::ShellWindowRegistry;
+ using apps::ShellWindowRegistry;
// If there are no windows, quit immediately.
if (chrome::BrowserIterator().done() &&
@@ -1425,7 +1425,7 @@ class AppControllerProfileObserver : public ProfileInfoCacheObserver {
- (void)showOrHideMenuItemsForPackagedApp:(NSNotification*)notification {
NSMenu* mainMenu = [NSApp mainMenu];
apps::ShellWindow* shellWindow =
- extensions::ShellWindowRegistry::GetShellWindowForNativeWindowAnyProfile(
+ apps::ShellWindowRegistry::GetShellWindowForNativeWindowAnyProfile(
[notification object]);
if (!shellWindow) {
diff --git a/chrome/browser/app_controller_mac_browsertest.mm b/chrome/browser/app_controller_mac_browsertest.mm
index 02059a5..0190fa2 100644
--- a/chrome/browser/app_controller_mac_browsertest.mm
+++ b/chrome/browser/app_controller_mac_browsertest.mm
@@ -4,6 +4,7 @@
#import <Cocoa/Cocoa.h>
+#include "apps/shell_window_registry.h"
#include "base/command_line.h"
#include "base/mac/scoped_nsobject.h"
#include "base/strings/sys_string_conversions.h"
@@ -11,7 +12,6 @@
#import "chrome/browser/app_controller_mac.h"
#include "chrome/browser/extensions/extension_test_message_listener.h"
#include "chrome/browser/extensions/platform_app_browsertest_util.h"
-#include "chrome/browser/extensions/shell_window_registry.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_window.h"
@@ -77,7 +77,7 @@ IN_PROC_BROWSER_TEST_F(AppControllerPlatformAppBrowserTest,
// When an app is focused, all Chrome menu items should be hidden, and a menu
// item for the app should be added.
apps::ShellWindow* app_1_shell_window =
- extensions::ShellWindowRegistry::Get(profile())->
+ apps::ShellWindowRegistry::Get(profile())->
GetShellWindowsForApp(app_1->id()).front();
[[NSNotificationCenter defaultCenter]
postNotificationName:NSWindowDidBecomeMainNotification
@@ -94,7 +94,7 @@ IN_PROC_BROWSER_TEST_F(AppControllerPlatformAppBrowserTest,
// When another app is focused, the menu item for the app should change.
apps::ShellWindow* app_2_shell_window =
- extensions::ShellWindowRegistry::Get(profile())->
+ apps::ShellWindowRegistry::Get(profile())->
GetShellWindowsForApp(app_2->id()).front();
[[NSNotificationCenter defaultCenter]
postNotificationName:NSWindowDidBecomeMainNotification
@@ -131,7 +131,7 @@ IN_PROC_BROWSER_TEST_F(AppControllerPlatformAppBrowserTest,
InstallAndLaunchPlatformApp("minimal");
ASSERT_TRUE(listener.WaitUntilSatisfied());
- NSWindow* app_window = extensions::ShellWindowRegistry::Get(profile())->
+ NSWindow* app_window = apps::ShellWindowRegistry::Get(profile())->
GetShellWindowsForApp(app->id()).front()->GetNativeWindow();
NSWindow* browser_window = browser()->window()->GetNativeWindow();
diff --git a/chrome/browser/chromeos/app_mode/app_session_lifetime.cc b/chrome/browser/chromeos/app_mode/app_session_lifetime.cc
index 48514f0..e140e882 100644
--- a/chrome/browser/chromeos/app_mode/app_session_lifetime.cc
+++ b/chrome/browser/chromeos/app_mode/app_session_lifetime.cc
@@ -4,17 +4,17 @@
#include "chrome/browser/chromeos/app_mode/app_session_lifetime.h"
+#include "apps/shell_window_registry.h"
#include "base/basictypes.h"
#include "base/lazy_instance.h"
#include "base/prefs/pref_service.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chromeos/app_mode/kiosk_app_update_service.h"
-#include "chrome/browser/extensions/shell_window_registry.h"
#include "chrome/browser/lifetime/application_lifetime.h"
#include "chrome/browser/policy/browser_policy_connector.h"
#include "chrome/common/pref_names.h"
-using extensions::ShellWindowRegistry;
+using apps::ShellWindowRegistry;
namespace chromeos {
@@ -35,7 +35,7 @@ class AppWindowWatcher : public ShellWindowRegistry::Observer {
}
private:
- // extensions::ShellWindowRegistry::Observer overrides:
+ // apps::ShellWindowRegistry::Observer overrides:
virtual void OnShellWindowAdded(apps::ShellWindow* shell_window) OVERRIDE {}
virtual void OnShellWindowIconChanged(apps::ShellWindow* shell_window)
OVERRIDE {}
@@ -46,7 +46,7 @@ class AppWindowWatcher : public ShellWindowRegistry::Observer {
}
}
- extensions::ShellWindowRegistry* window_registry_;
+ apps::ShellWindowRegistry* window_registry_;
DISALLOW_COPY_AND_ASSIGN(AppWindowWatcher);
};
diff --git a/chrome/browser/extensions/DEPS b/chrome/browser/extensions/DEPS
index 290e2e5..d16e654 100644
--- a/chrome/browser/extensions/DEPS
+++ b/chrome/browser/extensions/DEPS
@@ -8,6 +8,7 @@ include_rules = [
"+apps/launcher.h",
"+apps/native_app_window.h",
"+apps/shell_window.h",
+ "+apps/shell_window_registry.h",
# TODO(tfarina): Remove all these. crbug.com/125846.
# DO NOT ADD ANY MORE ITEMS TO THE LIST BELOW!
diff --git a/chrome/browser/extensions/api/app_current_window_internal/app_current_window_internal_api.cc b/chrome/browser/extensions/api/app_current_window_internal/app_current_window_internal_api.cc
index ef7fc9a..dcda353 100644
--- a/chrome/browser/extensions/api/app_current_window_internal/app_current_window_internal_api.cc
+++ b/chrome/browser/extensions/api/app_current_window_internal/app_current_window_internal_api.cc
@@ -6,8 +6,8 @@
#include "apps/native_app_window.h"
#include "apps/shell_window.h"
+#include "apps/shell_window_registry.h"
#include "base/command_line.h"
-#include "chrome/browser/extensions/shell_window_registry.h"
#include "chrome/common/extensions/api/app_current_window_internal.h"
#include "chrome/common/extensions/api/app_window.h"
#include "chrome/common/extensions/features/feature_channel.h"
@@ -32,7 +32,8 @@ const char kDevChannelOnly[] =
} // namespace
bool AppCurrentWindowInternalExtensionFunction::RunImpl() {
- ShellWindowRegistry* registry = ShellWindowRegistry::Get(profile());
+ apps::ShellWindowRegistry* registry =
+ apps::ShellWindowRegistry::Get(profile());
DCHECK(registry);
content::RenderViewHost* rvh = render_view_host();
if (!rvh)
diff --git a/chrome/browser/extensions/api/app_window/app_window_api.cc b/chrome/browser/extensions/api/app_window/app_window_api.cc
index bcb83d0..7fa2492 100644
--- a/chrome/browser/extensions/api/app_window/app_window_api.cc
+++ b/chrome/browser/extensions/api/app_window/app_window_api.cc
@@ -7,13 +7,13 @@
#include "apps/app_window_contents.h"
#include "apps/native_app_window.h"
#include "apps/shell_window.h"
+#include "apps/shell_window_registry.h"
#include "base/command_line.h"
#include "base/time/time.h"
#include "base/values.h"
#include "chrome/browser/app_mode/app_mode_utils.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/devtools/devtools_window.h"
-#include "chrome/browser/extensions/shell_window_registry.h"
#include "chrome/browser/extensions/window_controller.h"
#include "chrome/browser/ui/apps/chrome_shell_window_delegate.h"
#include "chrome/common/extensions/api/app_window.h"
@@ -150,7 +150,7 @@ bool AppWindowCreateFunction::RunImpl() {
create_params.window_key = *options->id;
if (!options->singleton || *options->singleton) {
- ShellWindow* window = ShellWindowRegistry::Get(profile())->
+ ShellWindow* window = apps::ShellWindowRegistry::Get(profile())->
GetShellWindowForAppAndKey(extension_id(),
create_params.window_key);
if (window) {
@@ -318,7 +318,8 @@ bool AppWindowCreateFunction::RunImpl() {
SetCreateResultFromShellWindow(shell_window, result);
SetResult(result);
- if (ShellWindowRegistry::Get(profile())->HadDevToolsAttached(created_view)) {
+ if (apps::ShellWindowRegistry::Get(profile())->
+ HadDevToolsAttached(created_view)) {
new DevToolsRestorer(this, created_view);
return true;
}
diff --git a/chrome/browser/extensions/api/app_window/app_window_apitest.cc b/chrome/browser/extensions/api/app_window/app_window_apitest.cc
index aee3c9c..a4f3909 100644
--- a/chrome/browser/extensions/api/app_window/app_window_apitest.cc
+++ b/chrome/browser/extensions/api/app_window/app_window_apitest.cc
@@ -4,11 +4,11 @@
#include "apps/native_app_window.h"
#include "apps/shell_window.h"
+#include "apps/shell_window_registry.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "chrome/browser/extensions/extension_test_message_listener.h"
#include "chrome/browser/extensions/platform_app_browsertest_util.h"
-#include "chrome/browser/extensions/shell_window_registry.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/test/base/testing_profile.h"
#include "ui/base/base_window.h"
@@ -23,15 +23,15 @@ using apps::ShellWindow;
namespace {
class TestShellWindowRegistryObserver
- : public extensions::ShellWindowRegistry::Observer {
+ : public apps::ShellWindowRegistry::Observer {
public:
explicit TestShellWindowRegistryObserver(Profile* profile)
: profile_(profile),
icon_updates_(0) {
- extensions::ShellWindowRegistry::Get(profile_)->AddObserver(this);
+ apps::ShellWindowRegistry::Get(profile_)->AddObserver(this);
}
virtual ~TestShellWindowRegistryObserver() {
- extensions::ShellWindowRegistry::Get(profile_)->RemoveObserver(this);
+ apps::ShellWindowRegistry::Get(profile_)->RemoveObserver(this);
}
// Overridden from ShellWindowRegistry::Observer:
diff --git a/chrome/browser/extensions/api/developer_private/developer_private_api.cc b/chrome/browser/extensions/api/developer_private/developer_private_api.cc
index 986598c..a7d8732 100644
--- a/chrome/browser/extensions/api/developer_private/developer_private_api.cc
+++ b/chrome/browser/extensions/api/developer_private/developer_private_api.cc
@@ -8,6 +8,7 @@
#include "apps/app_restore_service.h"
#include "apps/saved_files_service.h"
#include "apps/shell_window.h"
+#include "apps/shell_window_registry.h"
#include "base/base64.h"
#include "base/command_line.h"
#include "base/file_util.h"
@@ -27,7 +28,6 @@
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_system.h"
#include "chrome/browser/extensions/management_policy.h"
-#include "chrome/browser/extensions/shell_window_registry.h"
#include "chrome/browser/extensions/unpacked_installer.h"
#include "chrome/browser/extensions/updater/extension_updater.h"
#include "chrome/browser/platform_util.h"
@@ -67,6 +67,7 @@
#include "webkit/common/blob/shareable_file_reference.h"
using apps::ShellWindow;
+using apps::ShellWindowRegistry;
using content::RenderViewHost;
namespace extensions {
diff --git a/chrome/browser/extensions/api/file_system/file_system_api.cc b/chrome/browser/extensions/api/file_system/file_system_api.cc
index fe66380..7ebf9e2 100644
--- a/chrome/browser/extensions/api/file_system/file_system_api.cc
+++ b/chrome/browser/extensions/api/file_system/file_system_api.cc
@@ -6,6 +6,7 @@
#include "apps/saved_files_service.h"
#include "apps/shell_window.h"
+#include "apps/shell_window_registry.h"
#include "base/bind.h"
#include "base/file_util.h"
#include "base/files/file_path.h"
@@ -20,7 +21,6 @@
#include "chrome/browser/extensions/api/file_handlers/app_file_handler_util.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_system.h"
-#include "chrome/browser/extensions/shell_window_registry.h"
#include "chrome/browser/platform_util.h"
#include "chrome/browser/ui/chrome_select_file_policy.h"
#include "chrome/common/chrome_paths.h"
@@ -741,7 +741,8 @@ void FileSystemChooseEntryFunction::ShowPicker(
// platform-app only.
content::WebContents* web_contents = NULL;
if (extension_->is_platform_app()) {
- ShellWindowRegistry* registry = ShellWindowRegistry::Get(profile());
+ apps::ShellWindowRegistry* registry =
+ apps::ShellWindowRegistry::Get(profile());
DCHECK(registry);
ShellWindow* shell_window = registry->GetShellWindowForRenderViewHost(
render_view_host());
diff --git a/chrome/browser/extensions/api/identity/web_auth_flow.cc b/chrome/browser/extensions/api/identity/web_auth_flow.cc
index 60624a2..977f1f1 100644
--- a/chrome/browser/extensions/api/identity/web_auth_flow.cc
+++ b/chrome/browser/extensions/api/identity/web_auth_flow.cc
@@ -59,7 +59,7 @@ WebAuthFlow::~WebAuthFlow() {
WebContentsObserver::Observe(NULL);
if (!shell_window_key_.empty()) {
- ShellWindowRegistry::Get(profile_)->RemoveObserver(this);
+ apps::ShellWindowRegistry::Get(profile_)->RemoveObserver(this);
if (shell_window_ && shell_window_->web_contents())
shell_window_->web_contents()->Close();
@@ -67,7 +67,7 @@ WebAuthFlow::~WebAuthFlow() {
}
void WebAuthFlow::Start() {
- ShellWindowRegistry::Get(profile_)->AddObserver(this);
+ apps::ShellWindowRegistry::Get(profile_)->AddObserver(this);
// Attach a random ID string to the window so we can recoginize it
// in OnShellWindowAdded.
diff --git a/chrome/browser/extensions/api/identity/web_auth_flow.h b/chrome/browser/extensions/api/identity/web_auth_flow.h
index 077b1f0..e1a9852 100644
--- a/chrome/browser/extensions/api/identity/web_auth_flow.h
+++ b/chrome/browser/extensions/api/identity/web_auth_flow.h
@@ -7,7 +7,7 @@
#include <string>
-#include "chrome/browser/extensions/shell_window_registry.h"
+#include "apps/shell_window_registry.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/web_contents_observer.h"
@@ -45,7 +45,7 @@ namespace extensions {
// a window. If a window would be required, the flow fails.
class WebAuthFlow : public content::NotificationObserver,
public content::WebContentsObserver,
- public ShellWindowRegistry::Observer {
+ public apps::ShellWindowRegistry::Observer {
public:
enum Mode {
INTERACTIVE, // Show UI to the user if necessary.
@@ -91,7 +91,7 @@ class WebAuthFlow : public content::NotificationObserver,
private:
friend class ::WebAuthFlowTest;
- // ShellWindowRegistry::Observer implementation.
+ // ::ShellWindowRegistry::Observer implementation.
virtual void OnShellWindowAdded(apps::ShellWindow* shell_window) OVERRIDE;
virtual void OnShellWindowIconChanged(apps::ShellWindow* shell_window)
OVERRIDE;
diff --git a/chrome/browser/extensions/api/media_galleries/media_galleries_api.cc b/chrome/browser/extensions/api/media_galleries/media_galleries_api.cc
index 25a47d2..cc5fe09 100644
--- a/chrome/browser/extensions/api/media_galleries/media_galleries_api.cc
+++ b/chrome/browser/extensions/api/media_galleries/media_galleries_api.cc
@@ -11,13 +11,13 @@
#include <vector>
#include "apps/shell_window.h"
+#include "apps/shell_window_registry.h"
#include "base/memory/scoped_ptr.h"
#include "base/platform_file.h"
#include "base/stl_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/values.h"
#include "chrome/browser/browser_process.h"
-#include "chrome/browser/extensions/shell_window_registry.h"
#include "chrome/browser/media_galleries/media_file_system_registry.h"
#include "chrome/browser/media_galleries/media_galleries_dialog_controller.h"
#include "chrome/browser/storage_monitor/storage_monitor.h"
@@ -214,7 +214,7 @@ void MediaGalleriesGetMediaFileSystemsFunction::ShowDialog() {
// If there is no WebContentsModalDialogManager, then this contents is
// probably the background page for an app. Try to find a shell window to
// host the dialog.
- ShellWindow* window = ShellWindowRegistry::Get(profile())->
+ ShellWindow* window = apps::ShellWindowRegistry::Get(profile())->
GetCurrentShellWindowForApp(GetExtension()->id());
if (window) {
contents = window->web_contents();
diff --git a/chrome/browser/extensions/api/tabs/tabs_api.cc b/chrome/browser/extensions/api/tabs/tabs_api.cc
index cbe4a0d..d574db9 100644
--- a/chrome/browser/extensions/api/tabs/tabs_api.cc
+++ b/chrome/browser/extensions/api/tabs/tabs_api.cc
@@ -93,9 +93,9 @@
#endif // OS_WIN
#if defined(USE_ASH)
+#include "apps/shell_window_registry.h"
#include "ash/ash_switches.h"
#include "chrome/browser/extensions/api/tabs/ash_panel_contents.h"
-#include "chrome/browser/extensions/shell_window_registry.h"
#endif
using apps::ShellWindow;
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index f64decb..f4e5ae8 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -59,7 +59,6 @@
#include "chrome/browser/extensions/management_policy.h"
#include "chrome/browser/extensions/pending_extension_manager.h"
#include "chrome/browser/extensions/permissions_updater.h"
-#include "chrome/browser/extensions/shell_window_registry.h"
#include "chrome/browser/extensions/unpacked_installer.h"
#include "chrome/browser/extensions/update_observer.h"
#include "chrome/browser/extensions/updater/extension_updater.h"
diff --git a/chrome/browser/extensions/extension_tab_util.cc b/chrome/browser/extensions/extension_tab_util.cc
index b5d5ab9..8b427ab 100644
--- a/chrome/browser/extensions/extension_tab_util.cc
+++ b/chrome/browser/extensions/extension_tab_util.cc
@@ -5,8 +5,8 @@
#include "chrome/browser/extensions/extension_tab_util.h"
#include "apps/shell_window.h"
+#include "apps/shell_window_registry.h"
#include "chrome/browser/extensions/api/tabs/tabs_constants.h"
-#include "chrome/browser/extensions/shell_window_registry.h"
#include "chrome/browser/extensions/tab_helper.h"
#include "chrome/browser/extensions/window_controller.h"
#include "chrome/browser/extensions/window_controller_list.h"
@@ -44,8 +44,8 @@ namespace {
extensions::WindowController* GetShellWindowController(
const WebContents* contents) {
Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext());
- extensions::ShellWindowRegistry* registry =
- extensions::ShellWindowRegistry::Get(profile);
+ apps::ShellWindowRegistry* registry =
+ apps::ShellWindowRegistry::Get(profile);
if (!registry)
return NULL;
ShellWindow* shell_window =
diff --git a/chrome/browser/extensions/platform_app_browsertest.cc b/chrome/browser/extensions/platform_app_browsertest.cc
index 1f124a8..8126988 100644
--- a/chrome/browser/extensions/platform_app_browsertest.cc
+++ b/chrome/browser/extensions/platform_app_browsertest.cc
@@ -5,6 +5,7 @@
#include "apps/launcher.h"
#include "apps/native_app_window.h"
#include "apps/shell_window.h"
+#include "apps/shell_window_registry.h"
#include "base/bind.h"
#include "base/command_line.h"
#include "base/file_util.h"
@@ -28,7 +29,6 @@
#include "chrome/browser/extensions/extension_system.h"
#include "chrome/browser/extensions/extension_test_message_listener.h"
#include "chrome/browser/extensions/platform_app_browsertest_util.h"
-#include "chrome/browser/extensions/shell_window_registry.h"
#include "chrome/browser/tab_contents/render_view_context_menu.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/extensions/application_launch.h"
@@ -48,6 +48,7 @@
#include "url/gurl.h"
using apps::ShellWindow;
+using apps::ShellWindowRegistry;
using content::WebContents;
using web_modal::WebContentsModalDialogManager;
diff --git a/chrome/browser/extensions/platform_app_browsertest_util.cc b/chrome/browser/extensions/platform_app_browsertest_util.cc
index b896892..3348a00 100644
--- a/chrome/browser/extensions/platform_app_browsertest_util.cc
+++ b/chrome/browser/extensions/platform_app_browsertest_util.cc
@@ -6,11 +6,11 @@
#include "apps/app_window_contents.h"
#include "apps/native_app_window.h"
+#include "apps/shell_window_registry.h"
#include "base/command_line.h"
#include "base/strings/stringprintf.h"
#include "chrome/browser/extensions/api/tabs/tabs_api.h"
#include "chrome/browser/extensions/extension_function_test_utils.h"
-#include "chrome/browser/extensions/shell_window_registry.h"
#include "chrome/browser/ui/apps/chrome_shell_window_delegate.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/extensions/application_launch.h"
@@ -20,6 +20,7 @@
#include "extensions/common/switches.h"
using apps::ShellWindow;
+using apps::ShellWindowRegistry;
using content::WebContents;
namespace utils = extension_function_test_utils;
diff --git a/chrome/browser/extensions/web_view_interactive_browsertest.cc b/chrome/browser/extensions/web_view_interactive_browsertest.cc
index 95fcfb8..170fb9b 100644
--- a/chrome/browser/extensions/web_view_interactive_browsertest.cc
+++ b/chrome/browser/extensions/web_view_interactive_browsertest.cc
@@ -3,11 +3,11 @@
// found in the LICENSE file.
#include "apps/shell_window.h"
+#include "apps/shell_window_registry.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/extensions/extension_test_message_listener.h"
#include "chrome/browser/extensions/platform_app_browsertest_util.h"
-#include "chrome/browser/extensions/shell_window_registry.h"
#include "chrome/test/base/interactive_test_utils.h"
#include "chrome/test/base/test_launcher_utils.h"
#include "chrome/test/base/ui_test_utils.h"
@@ -59,8 +59,8 @@ class WebViewInteractiveTest
}
gfx::NativeWindow GetPlatformAppWindow() {
- const extensions::ShellWindowRegistry::ShellWindowList& shell_windows =
- extensions::ShellWindowRegistry::Get(
+ const apps::ShellWindowRegistry::ShellWindowList& shell_windows =
+ apps::ShellWindowRegistry::Get(
browser()->profile())->shell_windows();
return (*shell_windows.begin())->GetNativeWindow();
}
diff --git a/chrome/browser/extensions/window_open_apitest.cc b/chrome/browser/extensions/window_open_apitest.cc
index 4991a97..b16edc1bf 100644
--- a/chrome/browser/extensions/window_open_apitest.cc
+++ b/chrome/browser/extensions/window_open_apitest.cc
@@ -28,7 +28,7 @@
#include "testing/gtest/include/gtest/gtest.h"
#if defined(USE_ASH)
-#include "chrome/browser/extensions/shell_window_registry.h"
+#include "apps/shell_window_registry.h"
#endif
#if defined(USE_ASH) && !defined(OS_WIN)
@@ -53,7 +53,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_WindowOpen) {
int GetPanelCount(Browser* browser) {
#if defined(USE_ASH_PANELS)
- return static_cast<int>(extensions::ShellWindowRegistry::Get(
+ return static_cast<int>(apps::ShellWindowRegistry::Get(
browser->profile())->shell_windows().size());
#else
return PanelManager::GetInstance()->num_panels();
diff --git a/chrome/browser/ui/ash/chrome_shell_delegate.cc b/chrome/browser/ui/ash/chrome_shell_delegate.cc
index 1d0d4f6..2a22df0 100644
--- a/chrome/browser/ui/ash/chrome_shell_delegate.cc
+++ b/chrome/browser/ui/ash/chrome_shell_delegate.cc
@@ -6,6 +6,7 @@
#include "apps/native_app_window.h"
#include "apps/shell_window.h"
+#include "apps/shell_window_registry.h"
#include "ash/ash_switches.h"
#include "ash/host/root_window_host_factory.h"
#include "ash/launcher/launcher_types.h"
@@ -21,7 +22,6 @@
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/app_mode/app_mode_utils.h"
#include "chrome/browser/chrome_notification_types.h"
-#include "chrome/browser/extensions/shell_window_registry.h"
#include "chrome/browser/lifetime/application_lifetime.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/sessions/tab_restore_service.h"
@@ -187,7 +187,7 @@ void ChromeShellDelegate::ToggleFullscreen() {
}
// |window| may belong to a shell window.
- apps::ShellWindow* shell_window = extensions::ShellWindowRegistry::
+ apps::ShellWindow* shell_window = apps::ShellWindowRegistry::
GetShellWindowForNativeWindowAnyProfile(window);
if (shell_window) {
if (is_fullscreen)
diff --git a/chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc b/chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc
index d8cb05b..9b80b95 100644
--- a/chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/ui/ash/chrome_shell_delegate.h"
#include "apps/native_app_window.h"
+#include "apps/shell_window_registry.h"
#include "ash/keyboard_overlay/keyboard_overlay_view.h"
#include "ash/wm/window_util.h"
#include "base/command_line.h"
@@ -20,7 +21,6 @@
#include "chrome/browser/chromeos/system/ash_system_tray_delegate.h"
#include "chrome/browser/extensions/api/terminal/terminal_extension_helper.h"
#include "chrome/browser/extensions/extension_service.h"
-#include "chrome/browser/extensions/shell_window_registry.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/speech/tts_controller.h"
#include "chrome/browser/ui/ash/caps_lock_delegate_chromeos.h"
@@ -70,9 +70,9 @@ void ChromeShellDelegate::OpenFileManager(bool as_dialog) {
}
} else {
Profile* const profile = ProfileManager::GetDefaultProfileOrOffTheRecord();
- const extensions::ShellWindowRegistry* const registry =
- extensions::ShellWindowRegistry::Get(profile);
- const extensions::ShellWindowRegistry::ShellWindowList list =
+ const apps::ShellWindowRegistry* const registry =
+ apps::ShellWindowRegistry::Get(profile);
+ const apps::ShellWindowRegistry::ShellWindowList list =
registry->GetShellWindowsForApp(kFileBrowserDomain);
if (list.empty()) {
// Open the new window.
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc
index 1cae4cc..801538a 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc
@@ -6,6 +6,7 @@
#include "apps/native_app_window.h"
#include "apps/shell_window.h"
+#include "apps/shell_window_registry.h"
#include "ash/ash_switches.h"
#include "ash/launcher/launcher.h"
#include "ash/launcher/launcher_model.h"
@@ -25,7 +26,6 @@
#include "chrome/browser/extensions/extension_system.h"
#include "chrome/browser/extensions/extension_test_message_listener.h"
#include "chrome/browser/extensions/platform_app_browsertest_util.h"
-#include "chrome/browser/extensions/shell_window_registry.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_commands.h"
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app_browsertest.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app_browsertest.cc
index 8c0cfba..248b19a 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app_browsertest.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app_browsertest.cc
@@ -6,6 +6,7 @@
#include "apps/native_app_window.h"
#include "apps/shell_window.h"
+#include "apps/shell_window_registry.h"
#include "ash/ash_switches.h"
#include "ash/display/display_controller.h"
#include "ash/launcher/launcher.h"
@@ -26,7 +27,6 @@
#include "chrome/browser/extensions/extension_system.h"
#include "chrome/browser/extensions/extension_test_message_listener.h"
#include "chrome/browser/extensions/platform_app_browsertest_util.h"
-#include "chrome/browser/extensions/shell_window_registry.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/app_list/app_list_service.h"
#include "chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.h"
@@ -72,16 +72,16 @@ class TestEvent : public ui::Event {
};
class TestShellWindowRegistryObserver
- : public extensions::ShellWindowRegistry::Observer {
+ : public apps::ShellWindowRegistry::Observer {
public:
explicit TestShellWindowRegistryObserver(Profile* profile)
: profile_(profile),
icon_updates_(0) {
- extensions::ShellWindowRegistry::Get(profile_)->AddObserver(this);
+ apps::ShellWindowRegistry::Get(profile_)->AddObserver(this);
}
virtual ~TestShellWindowRegistryObserver() {
- extensions::ShellWindowRegistry::Get(profile_)->RemoveObserver(this);
+ apps::ShellWindowRegistry::Get(profile_)->RemoveObserver(this);
}
// Overridden from ShellWindowRegistry::Observer:
diff --git a/chrome/browser/ui/ash/launcher/shell_window_launcher_controller.cc b/chrome/browser/ui/ash/launcher/shell_window_launcher_controller.cc
index 779a8f9..618397c 100644
--- a/chrome/browser/ui/ash/launcher/shell_window_launcher_controller.cc
+++ b/chrome/browser/ui/ash/launcher/shell_window_launcher_controller.cc
@@ -28,7 +28,7 @@ std::string GetAppLauncherId(ShellWindow* shell_window) {
ShellWindowLauncherController::ShellWindowLauncherController(
ChromeLauncherController* owner)
: owner_(owner),
- registry_(extensions::ShellWindowRegistry::Get(owner->profile())),
+ registry_(apps::ShellWindowRegistry::Get(owner->profile())),
activation_client_(NULL) {
registry_->AddObserver(this);
if (ash::Shell::HasInstance()) {
diff --git a/chrome/browser/ui/ash/launcher/shell_window_launcher_controller.h b/chrome/browser/ui/ash/launcher/shell_window_launcher_controller.h
index c47c357..3669f72 100644
--- a/chrome/browser/ui/ash/launcher/shell_window_launcher_controller.h
+++ b/chrome/browser/ui/ash/launcher/shell_window_launcher_controller.h
@@ -9,7 +9,7 @@
#include <map>
#include <string>
-#include "chrome/browser/extensions/shell_window_registry.h"
+#include "apps/shell_window_registry.h"
#include "ui/aura/client/activation_change_observer.h"
#include "ui/aura/window_observer.h"
@@ -34,7 +34,7 @@ class ShellWindowLauncherItemController;
// aura window manager. It handles adding and removing launcher items from
// ChromeLauncherController.
class ShellWindowLauncherController
- : public extensions::ShellWindowRegistry::Observer,
+ : public apps::ShellWindowRegistry::Observer,
public aura::WindowObserver,
public aura::client::ActivationChangeObserver {
public:
@@ -68,7 +68,7 @@ class ShellWindowLauncherController
ShellWindowLauncherItemController* ControllerForWindow(aura::Window* window);
ChromeLauncherController* owner_;
- extensions::ShellWindowRegistry* registry_; // Unowned convenience pointer
+ apps::ShellWindowRegistry* registry_; // Unowned convenience pointer
aura::client::ActivationClient* activation_client_;
// Map of app launcher id to controller.
diff --git a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
index f66df35..1302645 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
+++ b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
@@ -10,6 +10,7 @@
#include "apps/native_app_window.h"
#include "apps/shell_window.h"
+#include "apps/shell_window_registry.h"
#include "base/base64.h"
#include "base/bind.h"
#include "base/i18n/rtl.h"
@@ -22,7 +23,6 @@
#include "base/time/time.h"
#include "chrome/browser/autofill/personal_data_manager_factory.h"
#include "chrome/browser/browser_process.h"
-#include "chrome/browser/extensions/shell_window_registry.h"
#include "chrome/browser/prefs/scoped_user_pref_update.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/autofill/autofill_credit_card_bubble_controller.h"
@@ -247,7 +247,7 @@ ui::BaseWindow* GetBaseWindowForWebContents(
gfx::NativeWindow native_window =
web_contents->GetView()->GetTopLevelNativeWindow();
apps::ShellWindow* shell_window =
- extensions::ShellWindowRegistry::
+ apps::ShellWindowRegistry::
GetShellWindowForNativeWindowAnyProfile(native_window);
return shell_window->GetBaseWindow();
}
diff --git a/chrome/browser/ui/extensions/apps_metro_handler_win.cc b/chrome/browser/ui/extensions/apps_metro_handler_win.cc
index 0f253b2..f59f675 100644
--- a/chrome/browser/ui/extensions/apps_metro_handler_win.cc
+++ b/chrome/browser/ui/extensions/apps_metro_handler_win.cc
@@ -5,7 +5,7 @@
#include "chrome/browser/ui/extensions/apps_metro_handler_win.h"
#include "apps/shell_window.h"
-#include "chrome/browser/extensions/shell_window_registry.h"
+#include "apps/shell_window_registry.h"
#include "chrome/browser/ui/simple_message_box.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -14,7 +14,7 @@
namespace chrome {
bool VerifySwitchToMetroForApps(gfx::NativeWindow parent_window) {
- if (!extensions::ShellWindowRegistry::IsShellWindowRegisteredInAnyProfile(
+ if (!apps::ShellWindowRegistry::IsShellWindowRegisteredInAnyProfile(
apps::ShellWindow::WINDOW_TYPE_DEFAULT)) {
return true;
}
diff --git a/chrome/browser/ui/views/select_file_dialog_extension.cc b/chrome/browser/ui/views/select_file_dialog_extension.cc
index 538dbed..e3324aa 100644
--- a/chrome/browser/ui/views/select_file_dialog_extension.cc
+++ b/chrome/browser/ui/views/select_file_dialog_extension.cc
@@ -6,6 +6,7 @@
#include "apps/native_app_window.h"
#include "apps/shell_window.h"
+#include "apps/shell_window_registry.h"
#include "base/bind.h"
#include "base/callback.h"
#include "base/logging.h"
@@ -17,7 +18,6 @@
#include "chrome/browser/extensions/extension_host.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_system.h"
-#include "chrome/browser/extensions/shell_window_registry.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sessions/session_tab_helper.h"
#include "chrome/browser/ui/browser.h"
@@ -270,7 +270,7 @@ void SelectFileDialogExtension::SelectFileImpl(
if (!owner_browser) {
// If an owner_window was supplied but we couldn't find a browser, this
// could be for a shell window.
- shell_window = extensions::ShellWindowRegistry::
+ shell_window = apps::ShellWindowRegistry::
GetShellWindowForNativeWindowAnyProfile(owner_window);
}
}
diff --git a/chrome/browser/ui/webui/extensions/extension_settings_handler.cc b/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
index 37c1c1a..ac1482c 100644
--- a/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
+++ b/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
@@ -8,6 +8,7 @@
#include "apps/app_restore_service.h"
#include "apps/saved_files_service.h"
#include "apps/shell_window.h"
+#include "apps/shell_window_registry.h"
#include "base/auto_reset.h"
#include "base/base64.h"
#include "base/bind.h"
@@ -34,7 +35,6 @@
#include "chrome/browser/extensions/extension_warning_set.h"
#include "chrome/browser/extensions/lazy_background_task_queue.h"
#include "chrome/browser/extensions/management_policy.h"
-#include "chrome/browser/extensions/shell_window_registry.h"
#include "chrome/browser/extensions/unpacked_installer.h"
#include "chrome/browser/extensions/updater/extension_updater.h"
#include "chrome/browser/google/google_util.h"
@@ -1037,13 +1037,13 @@ void ExtensionSettingsHandler::GetShellWindowPagesForExtensionProfile(
const Extension* extension,
Profile* profile,
std::vector<ExtensionPage>* result) {
- ShellWindowRegistry* registry = ShellWindowRegistry::Get(profile);
+ apps::ShellWindowRegistry* registry = apps::ShellWindowRegistry::Get(profile);
if (!registry) return;
- const ShellWindowRegistry::ShellWindowList windows =
+ const apps::ShellWindowRegistry::ShellWindowList windows =
registry->GetShellWindowsForApp(extension->id());
- for (ShellWindowRegistry::const_iterator it = windows.begin();
+ for (apps::ShellWindowRegistry::const_iterator it = windows.begin();
it != windows.end(); ++it) {
WebContents* web_contents = (*it)->web_contents();
RenderViewHost* host = web_contents->GetRenderViewHost();
diff --git a/chrome/chrome_browser_extensions.gypi b/chrome/chrome_browser_extensions.gypi
index 193f792..e0b89cf 100644
--- a/chrome/chrome_browser_extensions.gypi
+++ b/chrome/chrome_browser_extensions.gypi
@@ -745,8 +745,6 @@
'browser/extensions/script_bubble_controller.h',
'browser/extensions/script_executor.cc',
'browser/extensions/script_executor.h',
- 'browser/extensions/shell_window_registry.cc',
- 'browser/extensions/shell_window_registry.h',
'browser/extensions/standard_management_policy_provider.cc',
'browser/extensions/standard_management_policy_provider.h',
'browser/extensions/startup_helper.cc',