summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhashimoto <hashimoto@chromium.org>2014-08-29 02:46:57 -0700
committerCommit bot <commit-bot@chromium.org>2014-08-29 09:47:52 +0000
commitad3c6870f41f0b057697ea8dec59cc8cf8108745 (patch)
tree285a8312794c1fad48a95385d3c8d1de73af398b
parentfe5226eee8343a325c6b4d5d0e75f94c96c4616e (diff)
downloadchromium_src-ad3c6870f41f0b057697ea8dec59cc8cf8108745.zip
chromium_src-ad3c6870f41f0b057697ea8dec59cc8cf8108745.tar.gz
chromium_src-ad3c6870f41f0b057697ea8dec59cc8cf8108745.tar.bz2
Move AppWindow to extensions
Move AppWindow, AppWindowRegistry and AppsClient from apps/ to extensions/browser/app_window Change the namespace from apps to extensions. Fix GYP and DEPS. BUG=403726 TBR=sky@chromium.org for include and namespace changes Review URL: https://codereview.chromium.org/494033002 Cr-Commit-Position: refs/heads/master@{#292599}
-rw-r--r--apps/BUILD.gn6
-rw-r--r--apps/app_lifetime_monitor.cc4
-rw-r--r--apps/app_lifetime_monitor.h14
-rw-r--r--apps/app_lifetime_monitor_factory.cc4
-rw-r--r--apps/app_load_service.cc2
-rw-r--r--apps/app_load_service_factory.cc4
-rw-r--r--apps/app_restore_service.cc2
-rw-r--r--apps/app_restore_service.h2
-rw-r--r--apps/app_shim/app_shim_handler_mac.cc4
-rw-r--r--apps/app_shim/extension_app_shim_handler_mac.cc13
-rw-r--r--apps/app_shim/extension_app_shim_handler_mac.h18
-rw-r--r--apps/app_shim/extension_app_shim_handler_mac_unittest.cc4
-rw-r--r--apps/app_window_contents.cc1
-rw-r--r--apps/app_window_contents.h8
-rw-r--r--apps/apps.gypi6
-rw-r--r--apps/ui/views/native_app_window_views.cc4
-rw-r--r--apps/ui/views/native_app_window_views.h17
-rw-r--r--athena/activity/public/activity_factory.h7
-rw-r--r--athena/content/content_activity_factory.h3
-rw-r--r--athena/content/shell/content_activity_factory.cc2
-rw-r--r--athena/test/sample_activity_factory.cc2
-rw-r--r--athena/test/sample_activity_factory.h3
-rw-r--r--chrome/browser/app_controller_mac.mm4
-rw-r--r--chrome/browser/app_controller_mac_browsertest.mm4
-rw-r--r--chrome/browser/apps/app_browsertest.cc6
-rw-r--r--chrome/browser/apps/app_browsertest_util.cc8
-rw-r--r--chrome/browser/apps/app_browsertest_util.h22
-rw-r--r--chrome/browser/apps/app_window_interactive_uitest.cc3
-rw-r--r--chrome/browser/apps/ephemeral_app_browsertest.cc2
-rw-r--r--chrome/browser/apps/event_page_browsertest.cc2
-rw-r--r--chrome/browser/apps/web_view_browsertest.cc4
-rw-r--r--chrome/browser/apps/web_view_interactive_browsertest.cc10
-rw-r--r--chrome/browser/browser_process_impl.cc2
-rw-r--r--chrome/browser/chromeos/app_mode/app_session_lifetime.cc13
-rw-r--r--chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc14
-rw-r--r--chrome/browser/chromeos/file_manager/file_manager_browsertest.cc10
-rw-r--r--chrome/browser/chromeos/login/app_launch_controller.cc15
-rw-r--r--chrome/browser/chromeos/login/demo_mode/demo_app_launcher_browsertest.cc4
-rw-r--r--chrome/browser/chromeos/login/kiosk_browsertest.cc15
-rw-r--r--chrome/browser/chromeos/login/test/app_window_waiter.cc8
-rw-r--r--chrome/browser/chromeos/login/test/app_window_waiter.h16
-rw-r--r--chrome/browser/chromeos/policy/device_local_account_browsertest.cc14
-rw-r--r--chrome/browser/extensions/DEPS2
-rw-r--r--chrome/browser/extensions/api/app_current_window_internal/app_current_window_internal_api.cc8
-rw-r--r--chrome/browser/extensions/api/app_current_window_internal/app_current_window_internal_api.h40
-rw-r--r--chrome/browser/extensions/api/app_window/app_window_api.cc24
-rw-r--r--chrome/browser/extensions/api/app_window/app_window_api.h11
-rw-r--r--chrome/browser/extensions/api/app_window/app_window_apitest.cc14
-rw-r--r--chrome/browser/extensions/api/developer_private/developer_private_api.cc6
-rw-r--r--chrome/browser/extensions/api/feedback_private/feedback_browsertest.cc8
-rw-r--r--chrome/browser/extensions/api/file_system/file_system_api.cc11
-rw-r--r--chrome/browser/extensions/api/identity/web_auth_flow.cc7
-rw-r--r--chrome/browser/extensions/api/identity/web_auth_flow.h10
-rw-r--r--chrome/browser/extensions/api/media_galleries/media_galleries_api.cc8
-rw-r--r--chrome/browser/extensions/api/tabs/ash_panel_contents.cc2
-rw-r--r--chrome/browser/extensions/api/tabs/ash_panel_contents.h12
-rw-r--r--chrome/browser/extensions/api/tabs/tabs_api.cc5
-rw-r--r--chrome/browser/extensions/extension_tab_util.cc7
-rw-r--r--chrome/browser/extensions/startup_helper.cc10
-rw-r--r--chrome/browser/extensions/window_open_apitest.cc6
-rw-r--r--chrome/browser/media/media_capture_devices_dispatcher.cc10
-rw-r--r--chrome/browser/policy/policy_browsertest.cc30
-rw-r--r--chrome/browser/power/process_power_collector.cc10
-rw-r--r--chrome/browser/power/process_power_collector_unittest.cc22
-rw-r--r--chrome/browser/ui/apps/apps_metro_handler_win.cc8
-rw-r--r--chrome/browser/ui/apps/chrome_apps_client.cc10
-rw-r--r--chrome/browser/ui/apps/chrome_apps_client.h16
-rw-r--r--chrome/browser/ui/ash/accelerator_commands_browsertest.cc20
-rw-r--r--chrome/browser/ui/ash/chrome_new_window_delegate_chromeos.cc2
-rw-r--r--chrome/browser/ui/ash/chrome_shell_delegate.cc2
-rw-r--r--chrome/browser/ui/ash/launcher/app_window_launcher_controller.cc12
-rw-r--r--chrome/browser/ui/ash/launcher/app_window_launcher_controller.h23
-rw-r--r--chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.cc4
-rw-r--r--chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h19
-rw-r--r--chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc13
-rw-r--r--chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc24
-rw-r--r--chrome/browser/ui/ash/launcher/chrome_launcher_controller_win.cc8
-rw-r--r--chrome/browser/ui/ash/launcher/multi_profile_app_window_launcher_controller.cc21
-rw-r--r--chrome/browser/ui/ash/launcher/multi_profile_app_window_launcher_controller.h14
-rw-r--r--chrome/browser/ui/ash/media_delegate_chromeos.cc10
-rw-r--r--chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.cc28
-rw-r--r--chrome/browser/ui/ash/system_tray_delegate_chromeos.cc15
-rw-r--r--chrome/browser/ui/ash/system_tray_delegate_chromeos.h8
-rw-r--r--chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc8
-rw-r--r--chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.mm21
-rw-r--r--chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac_browsertest.mm26
-rw-r--r--chrome/browser/ui/cocoa/apps/chrome_apps_client_cocoa.mm4
-rw-r--r--chrome/browser/ui/cocoa/apps/native_app_window_cocoa.h12
-rw-r--r--chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm6
-rw-r--r--chrome/browser/ui/cocoa/apps/native_app_window_cocoa_browsertest.mm28
-rw-r--r--chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac.cc8
-rw-r--r--chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac_interactive_uitest.cc21
-rw-r--r--chrome/browser/ui/views/app_list/win/app_list_controller_delegate_win.cc8
-rw-r--r--chrome/browser/ui/views/apps/chrome_apps_client_views.cc4
-rw-r--r--chrome/browser/ui/views/apps/chrome_apps_client_views_win.cc4
-rw-r--r--chrome/browser/ui/views/apps/chrome_native_app_window_views.cc4
-rw-r--r--chrome/browser/ui/views/apps/chrome_native_app_window_views.h8
-rw-r--r--chrome/browser/ui/views/apps/chrome_native_app_window_views_win.cc10
-rw-r--r--chrome/browser/ui/views/apps/chrome_native_app_window_views_win.h2
-rw-r--r--chrome/browser/ui/views/select_file_dialog_extension.cc8
-rw-r--r--chrome/browser/ui/webui/extensions/extension_settings_handler.cc10
-rw-r--r--chrome/browser/ui/webui/options/browser_options_handler.cc2
-rw-r--r--chrome/browser/ui/webui/options/options_handlers_helper.cc10
-rw-r--r--chrome/browser/ui/webui/options/website_settings_handler.cc4
-rw-r--r--chrome/chrome_tests.gypi4
-rw-r--r--chrome/test/base/testing_browser_process.cc2
-rw-r--r--extensions/browser/BUILD.gn7
-rw-r--r--extensions/browser/DEPS1
-rw-r--r--extensions/browser/app_window/app_window.cc (renamed from apps/app_window.cc)115
-rw-r--r--extensions/browser/app_window/app_window.h (renamed from apps/app_window.h)55
-rw-r--r--extensions/browser/app_window/app_window_browsertest.cc (renamed from apps/app_window_browsertest.cc)9
-rw-r--r--extensions/browser/app_window/app_window_interactive_uitest.cc (renamed from apps/app_window_interactive_uitest.cc)7
-rw-r--r--extensions/browser/app_window/app_window_registry.cc (renamed from apps/app_window_registry.cc)19
-rw-r--r--extensions/browser/app_window/app_window_registry.h (renamed from apps/app_window_registry.h)53
-rw-r--r--extensions/browser/app_window/apps_client.cc (renamed from apps/ui/apps_client.cc)6
-rw-r--r--extensions/browser/app_window/apps_client.h (renamed from apps/ui/apps_client.h)25
-rw-r--r--extensions/extensions.gyp7
117 files changed, 655 insertions, 689 deletions
diff --git a/apps/BUILD.gn b/apps/BUILD.gn
index 5cc0849..acbfe889 100644
--- a/apps/BUILD.gn
+++ b/apps/BUILD.gn
@@ -19,12 +19,8 @@ static_library("apps") {
"app_restore_service.h",
"app_restore_service_factory.cc",
"app_restore_service_factory.h",
- "app_window.cc",
- "app_window.h",
"app_window_contents.cc",
"app_window_contents.h",
- "app_window_registry.cc",
- "app_window_registry.h",
"browser_context_keyed_service_factories.cc",
"browser_context_keyed_service_factories.h",
"custom_launcher_page_contents.cc",
@@ -38,8 +34,6 @@ static_library("apps") {
"saved_files_service_factory.h",
"switches.cc",
"switches.h",
- "ui/apps_client.cc",
- "ui/apps_client.h",
]
configs += [ "//build/config/compiler:wexit_time_destructors" ]
diff --git a/apps/app_lifetime_monitor.cc b/apps/app_lifetime_monitor.cc
index 84b6c82..16323e9 100644
--- a/apps/app_lifetime_monitor.cc
+++ b/apps/app_lifetime_monitor.cc
@@ -4,17 +4,19 @@
#include "apps/app_lifetime_monitor.h"
-#include "apps/app_window.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/profiles/profile.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_service.h"
+#include "extensions/browser/app_window/app_window.h"
#include "extensions/browser/extension_host.h"
#include "extensions/browser/notification_types.h"
#include "extensions/common/extension.h"
namespace apps {
+using extensions::AppWindow;
+using extensions::AppWindowRegistry;
using extensions::Extension;
using extensions::ExtensionHost;
diff --git a/apps/app_lifetime_monitor.h b/apps/app_lifetime_monitor.h
index bc46e0e..9dfee75 100644
--- a/apps/app_lifetime_monitor.h
+++ b/apps/app_lifetime_monitor.h
@@ -8,11 +8,11 @@
#include <string>
#include <vector>
-#include "apps/app_window_registry.h"
#include "base/observer_list.h"
#include "components/keyed_service/core/keyed_service.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
+#include "extensions/browser/app_window/app_window_registry.h"
namespace extensions {
class Extension;
@@ -26,7 +26,7 @@ namespace apps {
// events.
class AppLifetimeMonitor : public KeyedService,
public content::NotificationObserver,
- public AppWindowRegistry::Observer {
+ public extensions::AppWindowRegistry::Observer {
public:
class Observer {
public:
@@ -60,15 +60,15 @@ class AppLifetimeMonitor : public KeyedService,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
- // AppWindowRegistry::Observer overrides:
- virtual void OnAppWindowRemoved(AppWindow* app_window) OVERRIDE;
- virtual void OnAppWindowHidden(apps::AppWindow* app_window) OVERRIDE;
- virtual void OnAppWindowShown(apps::AppWindow* app_window) OVERRIDE;
+ // extensions::AppWindowRegistry::Observer overrides:
+ virtual void OnAppWindowRemoved(extensions::AppWindow* app_window) OVERRIDE;
+ virtual void OnAppWindowHidden(extensions::AppWindow* app_window) OVERRIDE;
+ virtual void OnAppWindowShown(extensions::AppWindow* app_window) OVERRIDE;
// KeyedService overrides:
virtual void Shutdown() OVERRIDE;
- bool HasVisibleAppWindows(apps::AppWindow* app_window) const;
+ bool HasVisibleAppWindows(extensions::AppWindow* app_window) const;
void NotifyAppStart(const std::string& app_id);
void NotifyAppActivated(const std::string& app_id);
diff --git a/apps/app_lifetime_monitor_factory.cc b/apps/app_lifetime_monitor_factory.cc
index e02297d..d561fdd 100644
--- a/apps/app_lifetime_monitor_factory.cc
+++ b/apps/app_lifetime_monitor_factory.cc
@@ -5,9 +5,9 @@
#include "apps/app_lifetime_monitor_factory.h"
#include "apps/app_lifetime_monitor.h"
-#include "apps/app_window_registry.h"
#include "chrome/browser/profiles/profile.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
+#include "extensions/browser/app_window/app_window_registry.h"
#include "extensions/browser/extensions_browser_client.h"
namespace apps {
@@ -26,7 +26,7 @@ AppLifetimeMonitorFactory::AppLifetimeMonitorFactory()
: BrowserContextKeyedServiceFactory(
"AppLifetimeMonitor",
BrowserContextDependencyManager::GetInstance()) {
- DependsOn(AppWindowRegistry::Factory::GetInstance());
+ DependsOn(extensions::AppWindowRegistry::Factory::GetInstance());
}
AppLifetimeMonitorFactory::~AppLifetimeMonitorFactory() {}
diff --git a/apps/app_load_service.cc b/apps/app_load_service.cc
index 9560851..efafb1b 100644
--- a/apps/app_load_service.cc
+++ b/apps/app_load_service.cc
@@ -6,7 +6,6 @@
#include "apps/app_load_service_factory.h"
#include "apps/app_restore_service.h"
-#include "apps/app_window_registry.h"
#include "apps/launcher.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/unpacked_installer.h"
@@ -14,6 +13,7 @@
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
+#include "extensions/browser/app_window/app_window_registry.h"
#include "extensions/browser/extension_host.h"
#include "extensions/browser/extension_prefs.h"
#include "extensions/browser/extension_system.h"
diff --git a/apps/app_load_service_factory.cc b/apps/app_load_service_factory.cc
index 23ffd1e..0733667 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/app_window_registry.h"
#include "chrome/browser/profiles/profile.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
+#include "extensions/browser/app_window/app_window_registry.h"
#include "extensions/browser/extension_prefs_factory.h"
#include "extensions/browser/extension_system_provider.h"
#include "extensions/browser/extensions_browser_client.h"
@@ -31,7 +31,7 @@ AppLoadServiceFactory::AppLoadServiceFactory()
DependsOn(
extensions::ExtensionsBrowserClient::Get()->GetExtensionSystemFactory());
DependsOn(extensions::ExtensionPrefsFactory::GetInstance());
- DependsOn(AppWindowRegistry::Factory::GetInstance());
+ DependsOn(extensions::AppWindowRegistry::Factory::GetInstance());
}
AppLoadServiceFactory::~AppLoadServiceFactory() {
diff --git a/apps/app_restore_service.cc b/apps/app_restore_service.cc
index 7388cdc1..a68c59e 100644
--- a/apps/app_restore_service.cc
+++ b/apps/app_restore_service.cc
@@ -6,11 +6,11 @@
#include "apps/app_lifetime_monitor_factory.h"
#include "apps/app_restore_service_factory.h"
-#include "apps/app_window.h"
#include "apps/launcher.h"
#include "apps/saved_files_service.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/profiles/profile.h"
+#include "extensions/browser/app_window/app_window.h"
#include "extensions/browser/extension_host.h"
#include "extensions/browser/extension_prefs.h"
#include "extensions/browser/extension_registry.h"
diff --git a/apps/app_restore_service.h b/apps/app_restore_service.h
index 33a407a..125d50c 100644
--- a/apps/app_restore_service.h
+++ b/apps/app_restore_service.h
@@ -9,8 +9,8 @@
#include <vector>
#include "apps/app_lifetime_monitor.h"
-#include "apps/app_window_registry.h"
#include "components/keyed_service/core/keyed_service.h"
+#include "extensions/browser/app_window/app_window_registry.h"
namespace extensions {
class Extension;
diff --git a/apps/app_shim/app_shim_handler_mac.cc b/apps/app_shim/app_shim_handler_mac.cc
index 7e67e73..3153bd4 100644
--- a/apps/app_shim/app_shim_handler_mac.cc
+++ b/apps/app_shim/app_shim_handler_mac.cc
@@ -6,7 +6,6 @@
#include <map>
-#include "apps/app_window_registry.h"
#include "base/bind.h"
#include "base/logging.h"
#include "base/memory/singleton.h"
@@ -17,6 +16,7 @@
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_service.h"
+#include "extensions/browser/app_window/app_window_registry.h"
namespace apps {
@@ -24,7 +24,7 @@ namespace {
void TerminateIfNoAppWindows() {
bool app_windows_left =
- apps::AppWindowRegistry::IsAppWindowRegisteredInAnyProfile(0);
+ extensions::AppWindowRegistry::IsAppWindowRegisteredInAnyProfile(0);
if (!app_windows_left &&
!AppListService::Get(chrome::HOST_DESKTOP_TYPE_NATIVE)
->IsAppListVisible()) {
diff --git a/apps/app_shim/extension_app_shim_handler_mac.cc b/apps/app_shim/extension_app_shim_handler_mac.cc
index f15ad4e..8e90324 100644
--- a/apps/app_shim/extension_app_shim_handler_mac.cc
+++ b/apps/app_shim/extension_app_shim_handler_mac.cc
@@ -7,8 +7,6 @@
#include "apps/app_lifetime_monitor_factory.h"
#include "apps/app_shim/app_shim_host_manager_mac.h"
#include "apps/app_shim/app_shim_messages.h"
-#include "apps/app_window.h"
-#include "apps/app_window_registry.h"
#include "apps/launcher.h"
#include "base/files/file_path.h"
#include "base/logging.h"
@@ -25,16 +23,20 @@
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
+#include "extensions/browser/app_window/app_window.h"
+#include "extensions/browser/app_window/app_window_registry.h"
#include "extensions/browser/app_window/native_app_window.h"
#include "extensions/browser/extension_host.h"
#include "extensions/browser/extension_registry.h"
#include "ui/base/cocoa/focus_window_set.h"
+using extensions::AppWindow;
+using extensions::AppWindowRegistry;
using extensions::ExtensionRegistry;
namespace {
-typedef apps::AppWindowRegistry::AppWindowList AppWindowList;
+typedef AppWindowRegistry::AppWindowList AppWindowList;
void ProfileLoadedCallback(base::Callback<void(Profile*)> callback,
Profile* profile,
@@ -50,7 +52,7 @@ void ProfileLoadedCallback(base::Callback<void(Profile*)> callback,
void SetAppHidden(Profile* profile, const std::string& app_id, bool hidden) {
AppWindowList windows =
- apps::AppWindowRegistry::Get(profile)->GetAppWindowsForApp(app_id);
+ AppWindowRegistry::Get(profile)->GetAppWindowsForApp(app_id);
for (AppWindowList::const_reverse_iterator it = windows.rbegin();
it != windows.rend();
++it) {
@@ -262,8 +264,7 @@ void ExtensionAppShimHandler::FocusAppForWindow(AppWindow* app_window) {
APP_SHIM_FOCUS_NORMAL,
std::vector<base::FilePath>());
} else {
- FocusWindows(
- apps::AppWindowRegistry::Get(profile)->GetAppWindowsForApp(app_id));
+ FocusWindows(AppWindowRegistry::Get(profile)->GetAppWindowsForApp(app_id));
}
}
diff --git a/apps/app_shim/extension_app_shim_handler_mac.h b/apps/app_shim/extension_app_shim_handler_mac.h
index bc8efb1..6bebb04 100644
--- a/apps/app_shim/extension_app_shim_handler_mac.h
+++ b/apps/app_shim/extension_app_shim_handler_mac.h
@@ -11,11 +11,11 @@
#include "apps/app_lifetime_monitor.h"
#include "apps/app_shim/app_shim_handler_mac.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"
#include "content/public/browser/notification_registrar.h"
+#include "extensions/browser/app_window/app_window_registry.h"
class Profile;
@@ -28,13 +28,12 @@ class WebContents;
}
namespace extensions {
+class AppWindow;
class Extension;
}
namespace apps {
-class AppWindow;
-
// This app shim handler that handles events for app shims that correspond to an
// extension.
class ExtensionAppShimHandler : public AppShimHandler,
@@ -50,7 +49,7 @@ class ExtensionAppShimHandler : public AppShimHandler,
virtual void LoadProfileAsync(const base::FilePath& path,
base::Callback<void(Profile*)> callback);
- virtual AppWindowRegistry::AppWindowList GetWindows(
+ virtual extensions::AppWindowRegistry::AppWindowList GetWindows(
Profile* profile,
const std::string& extension_id);
@@ -73,20 +72,21 @@ class ExtensionAppShimHandler : public AppShimHandler,
AppShimHandler::Host* FindHost(Profile* profile, const std::string& app_id);
- static void QuitAppForWindow(AppWindow* app_window);
+ static void QuitAppForWindow(extensions::AppWindow* app_window);
- static void HideAppForWindow(AppWindow* app_window);
+ static void HideAppForWindow(extensions::AppWindow* app_window);
- static void FocusAppForWindow(AppWindow* app_window);
+ static void FocusAppForWindow(extensions::AppWindow* app_window);
// Brings the window to the front without showing it and instructs the shim to
// request user attention. If there is no shim, show the app and return false.
- static bool ActivateAndRequestUserAttentionForWindow(AppWindow* app_window);
+ static bool ActivateAndRequestUserAttentionForWindow(
+ extensions::AppWindow* app_window);
// Instructs the shim to request user attention. Returns false if there is no
// shim for this window.
static void RequestUserAttentionForWindow(
- AppWindow* app_window,
+ extensions::AppWindow* app_window,
AppShimAttentionType attention_type);
// Called by AppControllerMac when Chrome hides.
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 573a48f..27791d9 100644
--- a/apps/app_shim/extension_app_shim_handler_mac_unittest.cc
+++ b/apps/app_shim/extension_app_shim_handler_mac_unittest.cc
@@ -18,7 +18,7 @@
namespace apps {
using extensions::Extension;
-typedef AppWindowRegistry::AppWindowList AppWindowList;
+typedef extensions::AppWindowRegistry::AppWindowList AppWindowList;
using ::testing::_;
using ::testing::Invoke;
@@ -176,7 +176,7 @@ class ExtensionAppShimHandlerTest : public testing::Test {
// In most tests, we don't care about the result of GetWindows, it just
// needs to be non-empty.
AppWindowList app_window_list;
- app_window_list.push_back(static_cast<AppWindow*>(NULL));
+ app_window_list.push_back(static_cast<extensions::AppWindow*>(NULL));
EXPECT_CALL(*delegate_, GetWindows(_, _))
.WillRepeatedly(Return(app_window_list));
diff --git a/apps/app_window_contents.cc b/apps/app_window_contents.cc
index 783564a..8461e24 100644
--- a/apps/app_window_contents.cc
+++ b/apps/app_window_contents.cc
@@ -21,6 +21,7 @@
#include "extensions/common/extension_messages.h"
namespace app_window = extensions::api::app_window;
+using extensions::AppWindow;
namespace apps {
diff --git a/apps/app_window_contents.h b/apps/app_window_contents.h
index 8762913..fb3534e 100644
--- a/apps/app_window_contents.h
+++ b/apps/app_window_contents.h
@@ -5,11 +5,11 @@
#ifndef APPS_APP_WINDOW_CONTENTS_H_
#define APPS_APP_WINDOW_CONTENTS_H_
-#include "apps/app_window.h"
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/web_contents_observer.h"
+#include "extensions/browser/app_window/app_window.h"
#include "extensions/browser/extension_function_dispatcher.h"
#include "url/gurl.h"
@@ -27,11 +27,11 @@ namespace apps {
// WebContents instance and observes it for the purpose of passing
// messages to the extensions system.
class AppWindowContentsImpl
- : public AppWindowContents,
+ : public extensions::AppWindowContents,
public content::WebContentsObserver,
public extensions::ExtensionFunctionDispatcher::Delegate {
public:
- explicit AppWindowContentsImpl(AppWindow* host);
+ explicit AppWindowContentsImpl(extensions::AppWindow* host);
virtual ~AppWindowContentsImpl();
// AppWindowContents
@@ -58,7 +58,7 @@ class AppWindowContentsImpl
const std::vector<extensions::DraggableRegion>& regions);
void SuspendRenderViewHost(content::RenderViewHost* rvh);
- AppWindow* host_; // This class is owned by |host_|
+ extensions::AppWindow* host_; // This class is owned by |host_|
GURL url_;
scoped_ptr<content::WebContents> web_contents_;
scoped_ptr<extensions::ExtensionFunctionDispatcher>
diff --git a/apps/apps.gypi b/apps/apps.gypi
index 724799d..ddf0c99 100644
--- a/apps/apps.gypi
+++ b/apps/apps.gypi
@@ -38,12 +38,8 @@
'app_restore_service.h',
'app_restore_service_factory.cc',
'app_restore_service_factory.h',
- 'app_window.cc',
- 'app_window.h',
'app_window_contents.cc',
'app_window_contents.h',
- 'app_window_registry.cc',
- 'app_window_registry.h',
'browser_context_keyed_service_factories.cc',
'browser_context_keyed_service_factories.h',
'custom_launcher_page_contents.cc',
@@ -57,8 +53,6 @@
'saved_files_service_factory.h',
'switches.cc',
'switches.h',
- 'ui/apps_client.cc',
- 'ui/apps_client.h',
'ui/views/app_window_frame_view.cc',
'ui/views/app_window_frame_view.h',
'ui/views/native_app_window_views.cc',
diff --git a/apps/ui/views/native_app_window_views.cc b/apps/ui/views/native_app_window_views.cc
index d3c478b..4579c73 100644
--- a/apps/ui/views/native_app_window_views.cc
+++ b/apps/ui/views/native_app_window_views.cc
@@ -4,11 +4,11 @@
#include "apps/ui/views/native_app_window_views.h"
-#include "apps/app_window.h"
#include "base/threading/sequenced_worker_pool.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
+#include "extensions/browser/app_window/app_window.h"
#include "extensions/common/draggable_region.h"
#include "third_party/skia/include/core/SkRegion.h"
#include "ui/gfx/path.h"
@@ -20,6 +20,8 @@
#include "ui/aura/window.h"
#endif
+using extensions::AppWindow;
+
namespace apps {
NativeAppWindowViews::NativeAppWindowViews()
diff --git a/apps/ui/views/native_app_window_views.h b/apps/ui/views/native_app_window_views.h
index 94bc960..9988b17 100644
--- a/apps/ui/views/native_app_window_views.h
+++ b/apps/ui/views/native_app_window_views.h
@@ -5,9 +5,9 @@
#ifndef APPS_UI_VIEWS_NATIVE_APP_WINDOW_VIEWS_H_
#define APPS_UI_VIEWS_NATIVE_APP_WINDOW_VIEWS_H_
-#include "apps/app_window.h"
#include "base/observer_list.h"
#include "content/public/browser/web_contents_observer.h"
+#include "extensions/browser/app_window/app_window.h"
#include "extensions/browser/app_window/native_app_window.h"
#include "extensions/browser/app_window/size_constraints.h"
#include "ui/gfx/rect.h"
@@ -50,8 +50,8 @@ class NativeAppWindowViews : public extensions::NativeAppWindow,
public:
NativeAppWindowViews();
virtual ~NativeAppWindowViews();
- void Init(AppWindow* app_window,
- const AppWindow::CreateParams& create_params);
+ void Init(extensions::AppWindow* app_window,
+ const extensions::AppWindow::CreateParams& create_params);
// Signal that CanHaveTransparentBackground has changed.
void OnCanHaveAlphaEnabledChanged();
@@ -62,16 +62,17 @@ class NativeAppWindowViews : public extensions::NativeAppWindow,
void set_web_view_for_testing(views::WebView* view) { web_view_ = view; }
protected:
- AppWindow* app_window() { return app_window_; }
- const AppWindow* app_window() const { return app_window_; }
+ extensions::AppWindow* app_window() { return app_window_; }
+ const extensions::AppWindow* app_window() const { return app_window_; }
const views::Widget* widget() const { return widget_; }
views::WebView* web_view() { return web_view_; }
// Initializes |widget_| for |app_window|.
- virtual void InitializeWindow(AppWindow* app_window,
- const AppWindow::CreateParams& create_params);
+ virtual void InitializeWindow(
+ extensions::AppWindow* app_window,
+ const extensions::AppWindow::CreateParams& create_params);
// ui::BaseWindow implementation.
virtual bool IsActive() const OVERRIDE;
@@ -174,7 +175,7 @@ class NativeAppWindowViews : public extensions::NativeAppWindow,
// Informs modal dialogs that they need to update their positions.
void OnViewWasResized();
- AppWindow* app_window_; // Not owned.
+ extensions::AppWindow* app_window_; // Not owned.
views::WebView* web_view_;
views::Widget* widget_;
diff --git a/athena/activity/public/activity_factory.h b/athena/activity/public/activity_factory.h
index 557f3b1..91f1ec7 100644
--- a/athena/activity/public/activity_factory.h
+++ b/athena/activity/public/activity_factory.h
@@ -8,15 +8,12 @@
#include "athena/athena_export.h"
#include "url/gurl.h"
-namespace apps {
-class AppWindow;
-}
-
namespace content {
class BrowserContext;
}
namespace extensions {
+class AppWindow;
class ShellAppWindow;
}
@@ -48,7 +45,7 @@ class ATHENA_EXPORT ActivityFactory {
const std::string& id) = 0;
// Create an activity of an app with |app_window| for chrome environment.
- virtual Activity* CreateAppActivity(apps::AppWindow* app_window) = 0;
+ virtual Activity* CreateAppActivity(extensions::AppWindow* app_window) = 0;
};
} // namespace athena
diff --git a/athena/content/content_activity_factory.h b/athena/content/content_activity_factory.h
index bf3031c..d118c81 100644
--- a/athena/content/content_activity_factory.h
+++ b/athena/content/content_activity_factory.h
@@ -20,7 +20,8 @@ class ContentActivityFactory : public ActivityFactory {
const GURL& url) OVERRIDE;
virtual Activity* CreateAppActivity(extensions::ShellAppWindow* app_window,
const std::string& app_id) OVERRIDE;
- virtual Activity* CreateAppActivity(apps::AppWindow* app_window) OVERRIDE;
+ virtual Activity* CreateAppActivity(
+ extensions::AppWindow* app_window) OVERRIDE;
private:
DISALLOW_COPY_AND_ASSIGN(ContentActivityFactory);
diff --git a/athena/content/shell/content_activity_factory.cc b/athena/content/shell/content_activity_factory.cc
index 538ca26..03e637d 100644
--- a/athena/content/shell/content_activity_factory.cc
+++ b/athena/content/shell/content_activity_factory.cc
@@ -15,7 +15,7 @@ Activity* ContentActivityFactory::CreateAppActivity(
}
Activity* ContentActivityFactory::CreateAppActivity(
- apps::AppWindow* app_window) {
+ extensions::AppWindow* app_window) {
return NULL;
}
diff --git a/athena/test/sample_activity_factory.cc b/athena/test/sample_activity_factory.cc
index b043e17..55bddeb 100644
--- a/athena/test/sample_activity_factory.cc
+++ b/athena/test/sample_activity_factory.cc
@@ -44,7 +44,7 @@ Activity* SampleActivityFactory::CreateAppActivity(
}
Activity* SampleActivityFactory::CreateAppActivity(
- apps::AppWindow* app_window) {
+ extensions::AppWindow* app_window) {
return new SampleActivity(
kDefaultAppColor, kDefaultAppContentColor, base::UTF8ToUTF16("App"));
}
diff --git a/athena/test/sample_activity_factory.h b/athena/test/sample_activity_factory.h
index 5dd9e1a..0002daa 100644
--- a/athena/test/sample_activity_factory.h
+++ b/athena/test/sample_activity_factory.h
@@ -21,7 +21,8 @@ class SampleActivityFactory : public ActivityFactory {
const GURL& url) OVERRIDE;
virtual Activity* CreateAppActivity(extensions::ShellAppWindow* app_window,
const std::string& app_id) OVERRIDE;
- virtual Activity* CreateAppActivity(apps::AppWindow* app_window) OVERRIDE;
+ virtual Activity* CreateAppActivity(
+ extensions::AppWindow* app_window) OVERRIDE;
private:
DISALLOW_COPY_AND_ASSIGN(SampleActivityFactory);
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm
index ac2a19e..4bbc7c9 100644
--- a/chrome/browser/app_controller_mac.mm
+++ b/chrome/browser/app_controller_mac.mm
@@ -5,7 +5,6 @@
#import "chrome/browser/app_controller_mac.h"
#include "apps/app_shim/extension_app_shim_handler_mac.h"
-#include "apps/app_window_registry.h"
#include "base/auto_reset.h"
#include "base/bind.h"
#include "base/command_line.h"
@@ -87,6 +86,7 @@
#include "content/public/browser/notification_types.h"
#include "content/public/browser/plugin_service.h"
#include "content/public/browser/user_metrics.h"
+#include "extensions/browser/app_window/app_window_registry.h"
#include "extensions/browser/extension_system.h"
#include "net/base/filename_util.h"
#include "ui/base/cocoa/focus_window_set.h"
@@ -433,7 +433,7 @@ class AppControllerProfileObserver : public ProfileInfoCacheObserver {
- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication*)app {
// If there are no windows, quit immediately.
if (chrome::BrowserIterator().done() &&
- !apps::AppWindowRegistry::IsAppWindowRegisteredInAnyProfile(0)) {
+ !extensions::AppWindowRegistry::IsAppWindowRegisteredInAnyProfile(0)) {
return NSTerminateNow;
}
diff --git a/chrome/browser/app_controller_mac_browsertest.mm b/chrome/browser/app_controller_mac_browsertest.mm
index 37fe938..0d0aba4 100644
--- a/chrome/browser/app_controller_mac_browsertest.mm
+++ b/chrome/browser/app_controller_mac_browsertest.mm
@@ -9,7 +9,6 @@
#import <objc/message.h>
#import <objc/runtime.h>
-#include "apps/app_window_registry.h"
#include "base/command_line.h"
#include "base/mac/foundation_util.h"
#include "base/mac/scoped_nsobject.h"
@@ -34,6 +33,7 @@
#include "chrome/test/base/ui_test_utils.h"
#include "components/signin/core/common/profile_management_switches.h"
#include "content/public/browser/web_contents.h"
+#include "extensions/browser/app_window/app_window_registry.h"
#include "extensions/common/extension.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
@@ -124,7 +124,7 @@ IN_PROC_BROWSER_TEST_F(AppControllerPlatformAppBrowserTest,
InstallAndLaunchPlatformApp("minimal");
ASSERT_TRUE(listener.WaitUntilSatisfied());
- NSWindow* app_window = apps::AppWindowRegistry::Get(profile())
+ NSWindow* app_window = extensions::AppWindowRegistry::Get(profile())
->GetAppWindowsForApp(app->id())
.front()
->GetNativeWindow();
diff --git a/chrome/browser/apps/app_browsertest.cc b/chrome/browser/apps/app_browsertest.cc
index c859db2..578c154 100644
--- a/chrome/browser/apps/app_browsertest.cc
+++ b/chrome/browser/apps/app_browsertest.cc
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "apps/app_window.h"
-#include "apps/app_window_registry.h"
#include "apps/launcher.h"
#include "base/bind.h"
#include "base/command_line.h"
@@ -37,6 +35,8 @@
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/test/test_utils.h"
+#include "extensions/browser/app_window/app_window.h"
+#include "extensions/browser/app_window/app_window_registry.h"
#include "extensions/browser/app_window/native_app_window.h"
#include "extensions/browser/event_router.h"
#include "extensions/browser/extension_prefs.h"
@@ -55,8 +55,6 @@
#include "chromeos/dbus/fake_power_manager_client.h"
#endif
-using apps::AppWindow;
-using apps::AppWindowRegistry;
using content::WebContents;
using web_modal::WebContentsModalDialogManager;
diff --git a/chrome/browser/apps/app_browsertest_util.cc b/chrome/browser/apps/app_browsertest_util.cc
index 42fc891..2c61ffe 100644
--- a/chrome/browser/apps/app_browsertest_util.cc
+++ b/chrome/browser/apps/app_browsertest_util.cc
@@ -5,7 +5,6 @@
#include "chrome/browser/apps/app_browsertest_util.h"
#include "apps/app_window_contents.h"
-#include "apps/app_window_registry.h"
#include "base/command_line.h"
#include "base/strings/stringprintf.h"
#include "chrome/browser/extensions/api/tabs/tabs_api.h"
@@ -17,11 +16,10 @@
#include "content/public/browser/notification_service.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/test_utils.h"
+#include "extensions/browser/app_window/app_window_registry.h"
#include "extensions/browser/app_window/native_app_window.h"
#include "extensions/common/switches.h"
-using apps::AppWindow;
-using apps::AppWindowRegistry;
using content::WebContents;
namespace {
@@ -128,7 +126,7 @@ AppWindow* PlatformAppBrowserTest::GetFirstAppWindow() {
return GetFirstAppWindowForBrowser(browser());
}
-apps::AppWindow* PlatformAppBrowserTest::GetFirstAppWindowForApp(
+AppWindow* PlatformAppBrowserTest::GetFirstAppWindowForApp(
const std::string& app_id) {
AppWindowRegistry* app_registry =
AppWindowRegistry::Get(browser()->profile());
@@ -229,7 +227,7 @@ void PlatformAppBrowserTest::CallAdjustBoundsToBeVisibleOnScreenForAppWindow(
bounds);
}
-apps::AppWindow* PlatformAppBrowserTest::CreateTestAppWindow(
+AppWindow* PlatformAppBrowserTest::CreateTestAppWindow(
const std::string& window_create_options) {
ExtensionTestMessageListener launched_listener("launched", true);
ExtensionTestMessageListener loaded_listener("window_loaded", false);
diff --git a/chrome/browser/apps/app_browsertest_util.h b/chrome/browser/apps/app_browsertest_util.h
index 50676ab..ad1ebd7 100644
--- a/chrome/browser/apps/app_browsertest_util.h
+++ b/chrome/browser/apps/app_browsertest_util.h
@@ -5,9 +5,9 @@
#ifndef CHROME_BROWSER_APPS_APP_BROWSERTEST_UTIL_H_
#define CHROME_BROWSER_APPS_APP_BROWSERTEST_UTIL_H_
-#include "apps/app_window.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "content/public/common/page_transition_types.h"
+#include "extensions/browser/app_window/app_window.h"
namespace base {
class CommandLine;
@@ -30,7 +30,7 @@ class PlatformAppBrowserTest : public ExtensionApiTest {
virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE;
// Gets the first app window that is found for a given browser.
- static apps::AppWindow* GetFirstAppWindowForBrowser(Browser* browser);
+ static AppWindow* GetFirstAppWindowForBrowser(Browser* browser);
protected:
// Runs the app named |name| out of the platform_apps subdirectory. Waits
@@ -61,10 +61,10 @@ class PlatformAppBrowserTest : public ExtensionApiTest {
// Gets the first app window that is found (most tests only deal with one
// platform app window, so this is good enough).
- apps::AppWindow* GetFirstAppWindow();
+ AppWindow* GetFirstAppWindow();
// Gets the first app window for an app.
- apps::AppWindow* GetFirstAppWindowForApp(const std::string& app_id);
+ AppWindow* GetFirstAppWindowForApp(const std::string& app_id);
// Runs chrome.windows.getAll for the given extension and returns the number
// of windows that the function returns.
@@ -90,18 +90,17 @@ class PlatformAppBrowserTest : public ExtensionApiTest {
void SetCommandLineArg(const std::string& test_file);
// Creates an empty app window for |extension|.
- apps::AppWindow* CreateAppWindow(const Extension* extension);
+ AppWindow* CreateAppWindow(const Extension* extension);
- apps::AppWindow* CreateAppWindowFromParams(
- const Extension* extension,
- const apps::AppWindow::CreateParams& params);
+ AppWindow* CreateAppWindowFromParams(const Extension* extension,
+ const AppWindow::CreateParams& params);
// Closes |window| and waits until it's gone.
- void CloseAppWindow(apps::AppWindow* window);
+ void CloseAppWindow(AppWindow* window);
// Call AdjustBoundsToBeVisibleOnScreen of |window|.
void CallAdjustBoundsToBeVisibleOnScreenForAppWindow(
- apps::AppWindow* window,
+ AppWindow* window,
const gfx::Rect& cached_bounds,
const gfx::Rect& cached_screen_bounds,
const gfx::Rect& current_screen_bounds,
@@ -112,8 +111,7 @@ class PlatformAppBrowserTest : public ExtensionApiTest {
// the caller in order to terminate the test - use CloseAppWindow().
// |window_create_options| are the options that will be passed to
// chrome.app.window.create() in the test app.
- apps::AppWindow* CreateTestAppWindow(
- const std::string& window_create_options);
+ AppWindow* CreateTestAppWindow(const std::string& window_create_options);
private:
DISALLOW_COPY_AND_ASSIGN(PlatformAppBrowserTest);
diff --git a/chrome/browser/apps/app_window_interactive_uitest.cc b/chrome/browser/apps/app_window_interactive_uitest.cc
index cd1158e..aab3337 100644
--- a/chrome/browser/apps/app_window_interactive_uitest.cc
+++ b/chrome/browser/apps/app_window_interactive_uitest.cc
@@ -20,6 +20,7 @@
#include "ui/views/win/hwnd_util.h"
#endif
+using extensions::AppWindow;
using extensions::NativeAppWindow;
// Helper class that has to be created in the stack to check if the fullscreen
@@ -362,7 +363,7 @@ void AppWindowInteractiveTest::TestOuterBoundsHelper(
launched_listener.Reset();
ASSERT_TRUE(launched_listener.WaitUntilSatisfied());
- apps::AppWindow* window = GetFirstAppWindowForApp(app->id());
+ AppWindow* window = GetFirstAppWindowForApp(app->id());
gfx::Rect window_bounds;
gfx::Size min_size, max_size;
diff --git a/chrome/browser/apps/ephemeral_app_browsertest.cc b/chrome/browser/apps/ephemeral_app_browsertest.cc
index 14389ab..690f11b 100644
--- a/chrome/browser/apps/ephemeral_app_browsertest.cc
+++ b/chrome/browser/apps/ephemeral_app_browsertest.cc
@@ -309,7 +309,7 @@ void EphemeralAppTestBase::DisableEphemeralApp(
void EphemeralAppTestBase::CloseApp(const std::string& app_id) {
EXPECT_EQ(1U, GetAppWindowCountForApp(app_id));
- apps::AppWindow* app_window = GetFirstAppWindowForApp(app_id);
+ extensions::AppWindow* app_window = GetFirstAppWindowForApp(app_id);
ASSERT_TRUE(app_window);
CloseAppWindow(app_window);
}
diff --git a/chrome/browser/apps/event_page_browsertest.cc b/chrome/browser/apps/event_page_browsertest.cc
index 76c48b3..2e7acac 100644
--- a/chrome/browser/apps/event_page_browsertest.cc
+++ b/chrome/browser/apps/event_page_browsertest.cc
@@ -27,7 +27,7 @@ class AppEventPageTest : public PlatformAppBrowserTest {
// Close the app window.
EXPECT_EQ(1U, GetAppWindowCount());
- apps::AppWindow* app_window = GetFirstAppWindow();
+ extensions::AppWindow* app_window = GetFirstAppWindow();
ASSERT_TRUE(app_window);
CloseAppWindow(app_window);
diff --git a/chrome/browser/apps/web_view_browsertest.cc b/chrome/browser/apps/web_view_browsertest.cc
index f576f3b..3a95660 100644
--- a/chrome/browser/apps/web_view_browsertest.cc
+++ b/chrome/browser/apps/web_view_browsertest.cc
@@ -1280,7 +1280,7 @@ IN_PROC_BROWSER_TEST_F(WebViewTest, MAYBE_InterstitialTeardown) {
WaitForInterstitial(guest_web_contents);
// Now close the app while interstitial page being shown in guest.
- apps::AppWindow* window = GetFirstAppWindow();
+ extensions::AppWindow* window = GetFirstAppWindow();
window->GetBaseWindow()->Close();
}
@@ -1907,7 +1907,7 @@ IN_PROC_BROWSER_TEST_F(WebViewTest, ChromeVoxInjection) {
IN_PROC_BROWSER_TEST_F(WebViewTest, MAYBE_TearDownTest) {
const extensions::Extension* extension =
LoadAndLaunchPlatformApp("web_view/teardown", "guest-loaded");
- apps::AppWindow* window = NULL;
+ extensions::AppWindow* window = NULL;
if (!GetAppWindowCount())
window = CreateAppWindow(extension);
else
diff --git a/chrome/browser/apps/web_view_interactive_browsertest.cc b/chrome/browser/apps/web_view_interactive_browsertest.cc
index 94c172c..7d5ddcf 100644
--- a/chrome/browser/apps/web_view_interactive_browsertest.cc
+++ b/chrome/browser/apps/web_view_interactive_browsertest.cc
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "apps/app_window.h"
-#include "apps/app_window_registry.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/app/chrome_command_ids.h"
@@ -24,6 +22,8 @@
#include "content/public/browser/web_contents.h"
#include "content/public/common/content_switches.h"
#include "content/public/test/browser_test_utils.h"
+#include "extensions/browser/app_window/app_window.h"
+#include "extensions/browser/app_window/app_window_registry.h"
#include "extensions/browser/guest_view/guest_view_base.h"
#include "extensions/browser/guest_view/guest_view_manager.h"
#include "extensions/browser/guest_view/guest_view_manager_factory.h"
@@ -33,7 +33,7 @@
#include "ui/base/test/ui_controls.h"
#include "ui/events/keycodes/keyboard_codes.h"
-using apps::AppWindow;
+using extensions::AppWindow;
class TestGuestViewManager : public extensions::GuestViewManager {
public:
@@ -133,8 +133,8 @@ class WebViewInteractiveTest
}
gfx::NativeWindow GetPlatformAppWindow() {
- const apps::AppWindowRegistry::AppWindowList& app_windows =
- apps::AppWindowRegistry::Get(browser()->profile())->app_windows();
+ const extensions::AppWindowRegistry::AppWindowList& app_windows =
+ extensions::AppWindowRegistry::Get(browser()->profile())->app_windows();
return (*app_windows.begin())->GetNativeWindow();
}
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index 35beb91..a1147ab 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -200,7 +200,7 @@ BrowserProcessImpl::BrowserProcessImpl(
#endif
#if defined(ENABLE_EXTENSIONS)
- apps::AppsClient::Set(ChromeAppsClient::GetInstance());
+ extensions::AppsClient::Set(ChromeAppsClient::GetInstance());
extension_event_router_forwarder_ = new extensions::EventRouterForwarder;
ExtensionRendererState::GetInstance()->Init();
diff --git a/chrome/browser/chromeos/app_mode/app_session_lifetime.cc b/chrome/browser/chromeos/app_mode/app_session_lifetime.cc
index 7095824..555d25a 100644
--- a/chrome/browser/chromeos/app_mode/app_session_lifetime.cc
+++ b/chrome/browser/chromeos/app_mode/app_session_lifetime.cc
@@ -4,8 +4,6 @@
#include "chrome/browser/chromeos/app_mode/app_session_lifetime.h"
-#include "apps/app_window.h"
-#include "apps/app_window_registry.h"
#include "base/basictypes.h"
#include "base/bind.h"
#include "base/lazy_instance.h"
@@ -28,8 +26,11 @@
#include "chromeos/network/network_state_handler.h"
#include "components/user_manager/user_manager.h"
#include "content/public/browser/web_contents.h"
+#include "extensions/browser/app_window/app_window.h"
+#include "extensions/browser/app_window/app_window_registry.h"
-using apps::AppWindowRegistry;
+using extensions::AppWindow;
+using extensions::AppWindowRegistry;
namespace chromeos {
@@ -50,8 +51,8 @@ class AppWindowHandler : public AppWindowRegistry::Observer {
}
private:
- // apps::AppWindowRegistry::Observer overrides:
- virtual void OnAppWindowRemoved(apps::AppWindow* app_window) OVERRIDE {
+ // extensions::AppWindowRegistry::Observer overrides:
+ virtual void OnAppWindowRemoved(AppWindow* app_window) OVERRIDE {
if (window_registry_->app_windows().empty()) {
if (DemoAppLauncher::IsDemoAppSession(
user_manager::UserManager::Get()->GetActiveUser()->email())) {
@@ -69,7 +70,7 @@ class AppWindowHandler : public AppWindowRegistry::Observer {
}
}
- apps::AppWindowRegistry* window_registry_;
+ AppWindowRegistry* window_registry_;
DISALLOW_COPY_AND_ASSIGN(AppWindowHandler);
};
diff --git a/chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc b/chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc
index 094e5ff..9bf3259 100644
--- a/chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc
@@ -4,8 +4,6 @@
#include "chrome/browser/chromeos/extensions/file_manager/private_api_misc.h"
-#include "apps/app_window.h"
-#include "apps/app_window_registry.h"
#include "ash/frame/frame_util.h"
#include "base/files/file_path.h"
#include "base/prefs/pref_service.h"
@@ -39,6 +37,8 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/page_zoom.h"
+#include "extensions/browser/app_window/app_window.h"
+#include "extensions/browser/app_window/app_window_registry.h"
#include "google_apis/drive/auth_service.h"
#include "ui/base/webui/web_ui_util.h"
#include "url/gurl.h"
@@ -50,9 +50,9 @@ const char kCWSScope[] = "https://www.googleapis.com/auth/chromewebstore";
const char kGoogleCastApiExtensionId[] = "mafeflapfdfljijmlienjedomfjfmhpd";
// Obtains the current app window.
-apps::AppWindow* GetCurrentAppWindow(ChromeSyncExtensionFunction* function) {
- apps::AppWindowRegistry* const app_window_registry =
- apps::AppWindowRegistry::Get(function->GetProfile());
+AppWindow* GetCurrentAppWindow(ChromeSyncExtensionFunction* function) {
+ AppWindowRegistry* const app_window_registry =
+ AppWindowRegistry::Get(function->GetProfile());
content::WebContents* const contents = function->GetAssociatedWebContents();
content::RenderViewHost* const render_view_host =
contents ? contents->GetRenderViewHost() : NULL;
@@ -383,7 +383,7 @@ bool FileBrowserPrivateGetProfilesFunction::RunSync() {
profiles = GetLoggedInProfileInfoList(GetAssociatedWebContents());
// Obtains the display profile ID.
- apps::AppWindow* const app_window = GetCurrentAppWindow(this);
+ AppWindow* const app_window = GetCurrentAppWindow(this);
chrome::MultiUserWindowManager* const window_manager =
chrome::MultiUserWindowManager::GetInstance();
const std::string current_profile_id =
@@ -424,7 +424,7 @@ bool FileBrowserPrivateVisitDesktopFunction::RunSync() {
}
// Look for the current app window.
- apps::AppWindow* const app_window = GetCurrentAppWindow(this);
+ AppWindow* const app_window = GetCurrentAppWindow(this);
if (!app_window) {
SetError("Target window is not found.");
return false;
diff --git a/chrome/browser/chromeos/file_manager/file_manager_browsertest.cc b/chrome/browser/chromeos/file_manager/file_manager_browsertest.cc
index d1051d3..7ccd60b 100644
--- a/chrome/browser/chromeos/file_manager/file_manager_browsertest.cc
+++ b/chrome/browser/chromeos/file_manager/file_manager_browsertest.cc
@@ -11,8 +11,6 @@
#include <deque>
#include <string>
-#include "apps/app_window.h"
-#include "apps/app_window_registry.h"
#include "base/bind.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
@@ -44,6 +42,8 @@
#include "content/public/browser/notification_service.h"
#include "content/public/test/test_utils.h"
#include "extensions/browser/api/test/test_api.h"
+#include "extensions/browser/app_window/app_window.h"
+#include "extensions/browser/app_window/app_window_registry.h"
#include "extensions/browser/notification_types.h"
#include "extensions/common/extension.h"
#include "google_apis/drive/drive_api_parser.h"
@@ -1158,12 +1158,12 @@ class MultiProfileFileManagerBrowserTest : public FileManagerBrowserTestBase {
} else if (name == "getWindowOwnerId") {
chrome::MultiUserWindowManager* const window_manager =
chrome::MultiUserWindowManager::GetInstance();
- apps::AppWindowRegistry* const app_window_registry =
- apps::AppWindowRegistry::Get(profile());
+ extensions::AppWindowRegistry* const app_window_registry =
+ extensions::AppWindowRegistry::Get(profile());
DCHECK(window_manager);
DCHECK(app_window_registry);
- const apps::AppWindowRegistry::AppWindowList& list =
+ const extensions::AppWindowRegistry::AppWindowList& list =
app_window_registry->GetAppWindowsForApp(
file_manager::kFileManagerAppId);
return list.size() == 1u ?
diff --git a/chrome/browser/chromeos/login/app_launch_controller.cc b/chrome/browser/chromeos/login/app_launch_controller.cc
index 99b7873..32263f6 100644
--- a/chrome/browser/chromeos/login/app_launch_controller.cc
+++ b/chrome/browser/chromeos/login/app_launch_controller.cc
@@ -4,8 +4,6 @@
#include "chrome/browser/chromeos/login/app_launch_controller.h"
-#include "apps/app_window.h"
-#include "apps/app_window_registry.h"
#include "base/bind.h"
#include "base/callback.h"
#include "base/files/file_path.h"
@@ -33,6 +31,8 @@
#include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
#include "components/user_manager/user_manager.h"
#include "content/public/browser/notification_service.h"
+#include "extensions/browser/app_window/app_window.h"
+#include "extensions/browser/app_window/app_window_registry.h"
#include "net/base/network_change_notifier.h"
namespace chromeos {
@@ -57,13 +57,14 @@ AppLaunchController::ReturnBoolCallback*
// AppLaunchController::AppWindowWatcher
class AppLaunchController::AppWindowWatcher
- : public apps::AppWindowRegistry::Observer {
+ : public extensions::AppWindowRegistry::Observer {
public:
explicit AppWindowWatcher(AppLaunchController* controller,
const std::string& app_id)
: controller_(controller),
app_id_(app_id),
- window_registry_(apps::AppWindowRegistry::Get(controller->profile_)),
+ window_registry_(
+ extensions::AppWindowRegistry::Get(controller->profile_)),
weak_factory_(this) {
if (!window_registry_->GetAppWindowsForApp(app_id).empty()) {
base::MessageLoop::current()->PostTask(
@@ -80,8 +81,8 @@ class AppLaunchController::AppWindowWatcher
}
private:
- // apps::AppWindowRegistry::Observer overrides:
- virtual void OnAppWindowAdded(apps::AppWindow* app_window) OVERRIDE {
+ // extensions::AppWindowRegistry::Observer overrides:
+ virtual void OnAppWindowAdded(extensions::AppWindow* app_window) OVERRIDE {
if (app_window->extension_id() == app_id_) {
window_registry_->RemoveObserver(this);
NotifyAppWindowCreated();
@@ -94,7 +95,7 @@ class AppLaunchController::AppWindowWatcher
AppLaunchController* controller_;
std::string app_id_;
- apps::AppWindowRegistry* window_registry_;
+ extensions::AppWindowRegistry* window_registry_;
base::WeakPtrFactory<AppWindowWatcher> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(AppWindowWatcher);
diff --git a/chrome/browser/chromeos/login/demo_mode/demo_app_launcher_browsertest.cc b/chrome/browser/chromeos/login/demo_mode/demo_app_launcher_browsertest.cc
index c65f0cf..9e5b88a 100644
--- a/chrome/browser/chromeos/login/demo_mode/demo_app_launcher_browsertest.cc
+++ b/chrome/browser/chromeos/login/demo_mode/demo_app_launcher_browsertest.cc
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "apps/app_window_registry.h"
#include "base/basictypes.h"
#include "base/command_line.h"
#include "base/compiler_specific.h"
@@ -22,6 +21,7 @@
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
#include "content/public/test/test_utils.h"
+#include "extensions/browser/app_window/app_window_registry.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace chromeos {
@@ -47,7 +47,7 @@ Profile* WaitForProfile() {
bool VerifyDemoAppLaunch() {
Profile* profile = WaitForProfile();
- return AppWindowWaiter(apps::AppWindowRegistry::Get(profile),
+ return AppWindowWaiter(extensions::AppWindowRegistry::Get(profile),
DemoAppLauncher::kDemoAppId).Wait() != NULL;
}
diff --git a/chrome/browser/chromeos/login/kiosk_browsertest.cc b/chrome/browser/chromeos/login/kiosk_browsertest.cc
index b2052de..6e9061a 100644
--- a/chrome/browser/chromeos/login/kiosk_browsertest.cc
+++ b/chrome/browser/chromeos/login/kiosk_browsertest.cc
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "apps/app_window.h"
-#include "apps/app_window_registry.h"
#include "ash/desktop_background/desktop_background_controller.h"
#include "ash/desktop_background/desktop_background_controller_observer.h"
#include "ash/shell.h"
@@ -53,6 +51,8 @@
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_service.h"
#include "content/public/test/browser_test_utils.h"
+#include "extensions/browser/app_window/app_window.h"
+#include "extensions/browser/app_window/app_window_registry.h"
#include "extensions/browser/app_window/native_app_window.h"
#include "extensions/browser/extension_system.h"
#include "google_apis/gaia/gaia_constants.h"
@@ -404,9 +404,9 @@ class KioskTest : public OobeBaseTest {
EXPECT_TRUE(app);
// App should appear with its window.
- apps::AppWindowRegistry* app_window_registry =
- apps::AppWindowRegistry::Get(app_profile);
- apps::AppWindow* window =
+ extensions::AppWindowRegistry* app_window_registry =
+ extensions::AppWindowRegistry::Get(app_profile);
+ extensions::AppWindow* window =
AppWindowWaiter(app_window_registry, test_app_id_).Wait();
EXPECT_TRUE(window);
@@ -1303,9 +1303,10 @@ IN_PROC_BROWSER_TEST_F(KioskEnterpriseTest, EnterpriseKioskApp) {
chromeos::KioskAppLaunchError::Get());
// Wait for the window to appear.
- apps::AppWindow* window =
+ extensions::AppWindow* window =
AppWindowWaiter(
- apps::AppWindowRegistry::Get(ProfileManager::GetPrimaryUserProfile()),
+ extensions::AppWindowRegistry::Get(
+ ProfileManager::GetPrimaryUserProfile()),
kTestEnterpriseKioskApp).Wait();
ASSERT_TRUE(window);
diff --git a/chrome/browser/chromeos/login/test/app_window_waiter.cc b/chrome/browser/chromeos/login/test/app_window_waiter.cc
index f9be212..75a3397 100644
--- a/chrome/browser/chromeos/login/test/app_window_waiter.cc
+++ b/chrome/browser/chromeos/login/test/app_window_waiter.cc
@@ -4,11 +4,11 @@
#include "chrome/browser/chromeos/login/test/app_window_waiter.h"
-#include "apps/app_window.h"
+#include "extensions/browser/app_window/app_window.h"
namespace chromeos {
-AppWindowWaiter::AppWindowWaiter(apps::AppWindowRegistry* registry,
+AppWindowWaiter::AppWindowWaiter(extensions::AppWindowRegistry* registry,
const std::string& app_id)
: registry_(registry), app_id_(app_id), window_(NULL) {
registry_->AddObserver(this);
@@ -18,7 +18,7 @@ AppWindowWaiter::~AppWindowWaiter() {
registry_->RemoveObserver(this);
}
-apps::AppWindow* AppWindowWaiter::Wait() {
+extensions::AppWindow* AppWindowWaiter::Wait() {
window_ = registry_->GetCurrentAppWindowForApp(app_id_);
if (window_)
return window_;
@@ -28,7 +28,7 @@ apps::AppWindow* AppWindowWaiter::Wait() {
return window_;
}
-void AppWindowWaiter::OnAppWindowAdded(apps::AppWindow* app_window) {
+void AppWindowWaiter::OnAppWindowAdded(extensions::AppWindow* app_window) {
if (!run_loop_.running())
return;
diff --git a/chrome/browser/chromeos/login/test/app_window_waiter.h b/chrome/browser/chromeos/login/test/app_window_waiter.h
index 3e796de..91eadcd 100644
--- a/chrome/browser/chromeos/login/test/app_window_waiter.h
+++ b/chrome/browser/chromeos/login/test/app_window_waiter.h
@@ -7,12 +7,12 @@
#include <string>
-#include "apps/app_window_registry.h"
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/run_loop.h"
+#include "extensions/browser/app_window/app_window_registry.h"
-namespace apps {
+namespace extensions {
class AppWindow;
}
@@ -20,22 +20,22 @@ namespace chromeos {
// Helper class that monitors app windows to wait for a window to appear.
// Use a new instance for each use, one instance will only work for one Wait.
-class AppWindowWaiter : public apps::AppWindowRegistry::Observer {
+class AppWindowWaiter : public extensions::AppWindowRegistry::Observer {
public:
- AppWindowWaiter(apps::AppWindowRegistry* registry,
+ AppWindowWaiter(extensions::AppWindowRegistry* registry,
const std::string& app_id);
virtual ~AppWindowWaiter();
- apps::AppWindow* Wait();
+ extensions::AppWindow* Wait();
// AppWindowRegistry::Observer:
- virtual void OnAppWindowAdded(apps::AppWindow* app_window) OVERRIDE;
+ virtual void OnAppWindowAdded(extensions::AppWindow* app_window) OVERRIDE;
private:
- apps::AppWindowRegistry* registry_;
+ extensions::AppWindowRegistry* registry_;
std::string app_id_;
base::RunLoop run_loop_;
- apps::AppWindow* window_;
+ extensions::AppWindow* window_;
DISALLOW_COPY_AND_ASSIGN(AppWindowWaiter);
};
diff --git a/chrome/browser/chromeos/policy/device_local_account_browsertest.cc b/chrome/browser/chromeos/policy/device_local_account_browsertest.cc
index 5cf0f9b..89e9898 100644
--- a/chrome/browser/chromeos/policy/device_local_account_browsertest.cc
+++ b/chrome/browser/chromeos/policy/device_local_account_browsertest.cc
@@ -7,8 +7,6 @@
#include <string>
#include <vector>
-#include "apps/app_window.h"
-#include "apps/app_window_registry.h"
#include "ash/shell.h"
#include "ash/system/chromeos/session/logout_confirmation_controller.h"
#include "ash/system/chromeos/session/logout_confirmation_dialog.h"
@@ -114,6 +112,8 @@
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/test_utils.h"
#include "crypto/rsa_private_key.h"
+#include "extensions/browser/app_window/app_window.h"
+#include "extensions/browser/app_window/app_window_registry.h"
#include "extensions/browser/app_window/native_app_window.h"
#include "extensions/browser/extension_system.h"
#include "extensions/browser/management_policy.h"
@@ -386,7 +386,7 @@ bool IsSessionStarted() {
class DeviceLocalAccountTest : public DevicePolicyCrosBrowserTest,
public user_manager::UserManager::Observer,
public chrome::BrowserListObserver,
- public apps::AppWindowRegistry::Observer {
+ public extensions::AppWindowRegistry::Observer {
protected:
DeviceLocalAccountTest()
: user_id_1_(GenerateDeviceLocalAccountUserId(
@@ -520,12 +520,12 @@ class DeviceLocalAccountTest : public DevicePolicyCrosBrowserTest,
run_loop_->Quit();
}
- virtual void OnAppWindowAdded(apps::AppWindow* app_window) OVERRIDE {
+ virtual void OnAppWindowAdded(extensions::AppWindow* app_window) OVERRIDE {
if (run_loop_)
run_loop_->Quit();
}
- virtual void OnAppWindowRemoved(apps::AppWindow* app_window) OVERRIDE {
+ virtual void OnAppWindowRemoved(extensions::AppWindow* app_window) OVERRIDE {
if (run_loop_)
run_loop_->Quit();
}
@@ -1287,8 +1287,8 @@ IN_PROC_BROWSER_TEST_F(DeviceLocalAccountTest, LastWindowClosedLogoutReminder) {
Profile* profile = GetProfileForTest();
ASSERT_TRUE(profile);
- apps::AppWindowRegistry* app_window_registry =
- apps::AppWindowRegistry::Get(profile);
+ extensions::AppWindowRegistry* app_window_registry =
+ extensions::AppWindowRegistry::Get(profile);
app_window_registry->AddObserver(this);
// Verify that the logout confirmation dialog is not showing.
diff --git a/chrome/browser/extensions/DEPS b/chrome/browser/extensions/DEPS
index a91962e..c10cbdd 100644
--- a/chrome/browser/extensions/DEPS
+++ b/chrome/browser/extensions/DEPS
@@ -4,8 +4,6 @@ include_rules = [
# chrome/browser/extensions, the restriction of not being able
# to depend on apps will be lifted.
"-apps",
- "+apps/app_window.h",
- "+apps/app_window_registry.h",
"-chrome/browser/apps",
"+components/crx_file",
"+components/user_manager",
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 36b63e9..2f826d7 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
@@ -4,13 +4,13 @@
#include "chrome/browser/extensions/api/app_current_window_internal/app_current_window_internal_api.h"
-#include "apps/app_window.h"
-#include "apps/app_window_registry.h"
#include "base/command_line.h"
#include "chrome/browser/profiles/profile.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"
+#include "extensions/browser/app_window/app_window.h"
+#include "extensions/browser/app_window/app_window_registry.h"
#include "extensions/browser/app_window/native_app_window.h"
#include "extensions/browser/app_window/size_constraints.h"
#include "extensions/common/features/simple_feature.h"
@@ -29,7 +29,6 @@ namespace SetBadgeIcon = app_current_window_internal::SetBadgeIcon;
namespace SetShape = app_current_window_internal::SetShape;
namespace SetAlwaysOnTop = app_current_window_internal::SetAlwaysOnTop;
-using apps::AppWindow;
using app_current_window_internal::Bounds;
using app_current_window_internal::Region;
using app_current_window_internal::RegionRect;
@@ -119,8 +118,7 @@ BoundsType GetBoundsType(const std::string& type_as_string) {
} // namespace bounds
bool AppCurrentWindowInternalExtensionFunction::RunSync() {
- apps::AppWindowRegistry* registry =
- apps::AppWindowRegistry::Get(GetProfile());
+ AppWindowRegistry* registry = AppWindowRegistry::Get(GetProfile());
DCHECK(registry);
content::RenderViewHost* rvh = render_view_host();
if (!rvh)
diff --git a/chrome/browser/extensions/api/app_current_window_internal/app_current_window_internal_api.h b/chrome/browser/extensions/api/app_current_window_internal/app_current_window_internal_api.h
index 1af11ff..9d4c85f 100644
--- a/chrome/browser/extensions/api/app_current_window_internal/app_current_window_internal_api.h
+++ b/chrome/browser/extensions/api/app_current_window_internal/app_current_window_internal_api.h
@@ -7,19 +7,17 @@
#include "chrome/browser/extensions/chrome_extension_function.h"
-namespace apps {
-class AppWindow;
-}
-
namespace extensions {
+class AppWindow;
+
class AppCurrentWindowInternalExtensionFunction
: public ChromeSyncExtensionFunction {
protected:
virtual ~AppCurrentWindowInternalExtensionFunction() {}
// Invoked with the current app window.
- virtual bool RunWithWindow(apps::AppWindow* window) = 0;
+ virtual bool RunWithWindow(AppWindow* window) = 0;
private:
virtual bool RunSync() OVERRIDE;
@@ -33,7 +31,7 @@ class AppCurrentWindowInternalFocusFunction
protected:
virtual ~AppCurrentWindowInternalFocusFunction() {}
- virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
+ virtual bool RunWithWindow(AppWindow* window) OVERRIDE;
};
class AppCurrentWindowInternalFullscreenFunction
@@ -44,7 +42,7 @@ class AppCurrentWindowInternalFullscreenFunction
protected:
virtual ~AppCurrentWindowInternalFullscreenFunction() {}
- virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
+ virtual bool RunWithWindow(AppWindow* window) OVERRIDE;
};
class AppCurrentWindowInternalMaximizeFunction
@@ -55,7 +53,7 @@ class AppCurrentWindowInternalMaximizeFunction
protected:
virtual ~AppCurrentWindowInternalMaximizeFunction() {}
- virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
+ virtual bool RunWithWindow(AppWindow* window) OVERRIDE;
};
class AppCurrentWindowInternalMinimizeFunction
@@ -66,7 +64,7 @@ class AppCurrentWindowInternalMinimizeFunction
protected:
virtual ~AppCurrentWindowInternalMinimizeFunction() {}
- virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
+ virtual bool RunWithWindow(AppWindow* window) OVERRIDE;
};
class AppCurrentWindowInternalRestoreFunction
@@ -77,7 +75,7 @@ class AppCurrentWindowInternalRestoreFunction
protected:
virtual ~AppCurrentWindowInternalRestoreFunction() {}
- virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
+ virtual bool RunWithWindow(AppWindow* window) OVERRIDE;
};
class AppCurrentWindowInternalDrawAttentionFunction
@@ -88,7 +86,7 @@ class AppCurrentWindowInternalDrawAttentionFunction
protected:
virtual ~AppCurrentWindowInternalDrawAttentionFunction() {}
- virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
+ virtual bool RunWithWindow(AppWindow* window) OVERRIDE;
};
class AppCurrentWindowInternalClearAttentionFunction
@@ -99,7 +97,7 @@ class AppCurrentWindowInternalClearAttentionFunction
protected:
virtual ~AppCurrentWindowInternalClearAttentionFunction() {}
- virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
+ virtual bool RunWithWindow(AppWindow* window) OVERRIDE;
};
class AppCurrentWindowInternalShowFunction
@@ -110,7 +108,7 @@ class AppCurrentWindowInternalShowFunction
protected:
virtual ~AppCurrentWindowInternalShowFunction() {}
- virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
+ virtual bool RunWithWindow(AppWindow* window) OVERRIDE;
};
class AppCurrentWindowInternalHideFunction
@@ -121,7 +119,7 @@ class AppCurrentWindowInternalHideFunction
protected:
virtual ~AppCurrentWindowInternalHideFunction() {}
- virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
+ virtual bool RunWithWindow(AppWindow* window) OVERRIDE;
};
class AppCurrentWindowInternalSetBoundsFunction
@@ -131,7 +129,7 @@ class AppCurrentWindowInternalSetBoundsFunction
APP_CURRENTWINDOWINTERNAL_SETBOUNDS)
protected:
virtual ~AppCurrentWindowInternalSetBoundsFunction() {}
- virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
+ virtual bool RunWithWindow(AppWindow* window) OVERRIDE;
};
class AppCurrentWindowInternalSetSizeConstraintsFunction
@@ -141,7 +139,7 @@ class AppCurrentWindowInternalSetSizeConstraintsFunction
APP_CURRENTWINDOWINTERNAL_SETSIZECONSTRAINTS)
protected:
virtual ~AppCurrentWindowInternalSetSizeConstraintsFunction() {}
- virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
+ virtual bool RunWithWindow(AppWindow* window) OVERRIDE;
};
class AppCurrentWindowInternalSetIconFunction
@@ -152,7 +150,7 @@ class AppCurrentWindowInternalSetIconFunction
protected:
virtual ~AppCurrentWindowInternalSetIconFunction() {}
- virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
+ virtual bool RunWithWindow(AppWindow* window) OVERRIDE;
};
class AppCurrentWindowInternalSetBadgeIconFunction
@@ -163,7 +161,7 @@ class AppCurrentWindowInternalSetBadgeIconFunction
protected:
virtual ~AppCurrentWindowInternalSetBadgeIconFunction() {}
- virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
+ virtual bool RunWithWindow(AppWindow* window) OVERRIDE;
};
class AppCurrentWindowInternalClearBadgeFunction
@@ -174,7 +172,7 @@ class AppCurrentWindowInternalClearBadgeFunction
protected:
virtual ~AppCurrentWindowInternalClearBadgeFunction() {}
- virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
+ virtual bool RunWithWindow(AppWindow* window) OVERRIDE;
};
class AppCurrentWindowInternalSetShapeFunction
@@ -185,7 +183,7 @@ class AppCurrentWindowInternalSetShapeFunction
protected:
virtual ~AppCurrentWindowInternalSetShapeFunction() {}
- virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
+ virtual bool RunWithWindow(AppWindow* window) OVERRIDE;
};
class AppCurrentWindowInternalSetAlwaysOnTopFunction
@@ -196,7 +194,7 @@ class AppCurrentWindowInternalSetAlwaysOnTopFunction
protected:
virtual ~AppCurrentWindowInternalSetAlwaysOnTopFunction() {}
- virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
+ virtual bool RunWithWindow(AppWindow* window) OVERRIDE;
};
} // namespace extensions
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 653352a..767f2f0 100644
--- a/chrome/browser/extensions/api/app_window/app_window_api.cc
+++ b/chrome/browser/extensions/api/app_window/app_window_api.cc
@@ -4,10 +4,7 @@
#include "chrome/browser/extensions/api/app_window/app_window_api.h"
-#include "apps/app_window.h"
#include "apps/app_window_contents.h"
-#include "apps/app_window_registry.h"
-#include "apps/ui/apps_client.h"
#include "base/command_line.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
@@ -20,6 +17,9 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/url_constants.h"
+#include "extensions/browser/app_window/app_window.h"
+#include "extensions/browser/app_window/app_window_registry.h"
+#include "extensions/browser/app_window/apps_client.h"
#include "extensions/browser/app_window/native_app_window.h"
#include "extensions/browser/extensions_browser_client.h"
#include "extensions/browser/image_util.h"
@@ -31,8 +31,6 @@
#include "ui/gfx/rect.h"
#include "url/gurl.h"
-using apps::AppWindow;
-
namespace app_window = extensions::api::app_window;
namespace Create = app_window::Create;
@@ -87,7 +85,7 @@ bool CheckBoundsConflict(const scoped_ptr<int>& inner_property,
// AppWindow::CreateParams.
void CopyBoundsSpec(
const extensions::api::app_window::BoundsSpecification* input_spec,
- apps::AppWindow::BoundsSpecification* create_spec) {
+ AppWindow::BoundsSpecification* create_spec) {
if (!input_spec)
return;
@@ -160,7 +158,7 @@ bool AppWindowCreateFunction::RunAsync() {
}
if (!options->singleton || *options->singleton) {
- AppWindow* window = apps::AppWindowRegistry::Get(browser_context())
+ AppWindow* window = AppWindowRegistry::Get(browser_context())
->GetAppWindowForAppAndKey(
extension_id(), create_params.window_key);
if (window) {
@@ -195,7 +193,7 @@ bool AppWindowCreateFunction::RunAsync() {
if (!GetBoundsSpec(*options, &create_params, &error_))
return false;
- if (!apps::AppsClient::Get()->IsCurrentChannelOlderThanDev() ||
+ if (!AppsClient::Get()->IsCurrentChannelOlderThanDev() ||
extension()->location() == extensions::Manifest::COMPONENT) {
if (options->type == extensions::api::app_window::WINDOW_TYPE_PANEL) {
create_params.window_type = AppWindow::WINDOW_TYPE_PANEL;
@@ -214,7 +212,7 @@ bool AppWindowCreateFunction::RunAsync() {
"312745D9BF916161191143F6490085EEA0434997",
"53041A2FA309EECED01FFC751E7399186E860B2C"
};
- if (apps::AppsClient::Get()->IsCurrentChannelOlderThanDev() &&
+ if (AppsClient::Get()->IsCurrentChannelOlderThanDev() &&
!extensions::SimpleFeature::IsIdInList(
extension_id(),
std::set<std::string>(whitelist,
@@ -281,7 +279,7 @@ bool AppWindowCreateFunction::RunAsync() {
render_view_host_->GetProcess()->GetID();
AppWindow* app_window =
- apps::AppsClient::Get()->CreateAppWindow(browser_context(), extension());
+ AppsClient::Get()->CreateAppWindow(browser_context(), extension());
app_window->Init(
url, new apps::AppWindowContentsImpl(app_window), create_params);
@@ -302,9 +300,9 @@ bool AppWindowCreateFunction::RunAsync() {
app_window->GetSerializedState(result);
SetResult(result);
- if (apps::AppWindowRegistry::Get(browser_context())
+ if (AppWindowRegistry::Get(browser_context())
->HadDevToolsAttached(created_view)) {
- apps::AppsClient::Get()->OpenDevToolsWindow(
+ AppsClient::Get()->OpenDevToolsWindow(
app_window->web_contents(),
base::Bind(&AppWindowCreateFunction::SendResponse, this, true));
return true;
@@ -318,7 +316,7 @@ bool AppWindowCreateFunction::RunAsync() {
bool AppWindowCreateFunction::GetBoundsSpec(
const extensions::api::app_window::CreateWindowOptions& options,
- apps::AppWindow::CreateParams* params,
+ AppWindow::CreateParams* params,
std::string* error) {
DCHECK(params);
DCHECK(error);
diff --git a/chrome/browser/extensions/api/app_window/app_window_api.h b/chrome/browser/extensions/api/app_window/app_window_api.h
index 06694e2..1648182 100644
--- a/chrome/browser/extensions/api/app_window/app_window_api.h
+++ b/chrome/browser/extensions/api/app_window/app_window_api.h
@@ -5,7 +5,7 @@
#ifndef CHROME_BROWSER_EXTENSIONS_API_APP_WINDOW_APP_WINDOW_API_H_
#define CHROME_BROWSER_EXTENSIONS_API_APP_WINDOW_APP_WINDOW_API_H_
-#include "apps/app_window.h"
+#include "extensions/browser/app_window/app_window.h"
#include "extensions/browser/extension_function.h"
namespace extensions {
@@ -28,15 +28,14 @@ class AppWindowCreateFunction : public AsyncExtensionFunction {
private:
bool GetBoundsSpec(
const extensions::api::app_window::CreateWindowOptions& options,
- apps::AppWindow::CreateParams* params,
+ AppWindow::CreateParams* params,
std::string* error);
- apps::AppWindow::Frame GetFrameFromString(const std::string& frame_string);
+ AppWindow::Frame GetFrameFromString(const std::string& frame_string);
bool GetFrameOptions(
const extensions::api::app_window::CreateWindowOptions& options,
- apps::AppWindow::CreateParams* create_params);
- void UpdateFrameOptionsForChannel(
- apps::AppWindow::CreateParams* create_params);
+ AppWindow::CreateParams* create_params);
+ void UpdateFrameOptionsForChannel(AppWindow::CreateParams* create_params);
bool inject_html_titlebar_;
};
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 7227be3..6d63e15 100644
--- a/chrome/browser/extensions/api/app_window/app_window_apitest.cc
+++ b/chrome/browser/extensions/api/app_window/app_window_apitest.cc
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "apps/app_window.h"
-#include "apps/app_window_registry.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "chrome/browser/apps/app_browsertest_util.h"
@@ -11,6 +9,8 @@
#include "chrome/browser/ui/browser.h"
#include "chrome/common/extensions/features/feature_channel.h"
#include "chrome/test/base/testing_profile.h"
+#include "extensions/browser/app_window/app_window.h"
+#include "extensions/browser/app_window/app_window_registry.h"
#include "extensions/browser/app_window/native_app_window.h"
#include "ui/base/base_window.h"
#include "ui/gfx/rect.h"
@@ -19,18 +19,18 @@
#include "ui/base/win/shell.h"
#endif
-using apps::AppWindow;
+namespace extensions {
namespace {
-class TestAppWindowRegistryObserver : public apps::AppWindowRegistry::Observer {
+class TestAppWindowRegistryObserver : public AppWindowRegistry::Observer {
public:
explicit TestAppWindowRegistryObserver(Profile* profile)
: profile_(profile), icon_updates_(0) {
- apps::AppWindowRegistry::Get(profile_)->AddObserver(this);
+ AppWindowRegistry::Get(profile_)->AddObserver(this);
}
virtual ~TestAppWindowRegistryObserver() {
- apps::AppWindowRegistry::Get(profile_)->RemoveObserver(this);
+ AppWindowRegistry::Get(profile_)->RemoveObserver(this);
}
// Overridden from AppWindowRegistry::Observer:
@@ -49,8 +49,6 @@ class TestAppWindowRegistryObserver : public apps::AppWindowRegistry::Observer {
} // namespace
-namespace extensions {
-
// Tests chrome.app.window.setIcon.
IN_PROC_BROWSER_TEST_F(ExperimentalPlatformAppBrowserTest, WindowsApiSetIcon) {
scoped_ptr<TestAppWindowRegistryObserver> test_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 9b190c5..37736c4 100644
--- a/chrome/browser/extensions/api/developer_private/developer_private_api.cc
+++ b/chrome/browser/extensions/api/developer_private/developer_private_api.cc
@@ -5,8 +5,6 @@
#include "chrome/browser/extensions/api/developer_private/developer_private_api.h"
#include "apps/app_load_service.h"
-#include "apps/app_window.h"
-#include "apps/app_window_registry.h"
#include "apps/saved_files_service.h"
#include "base/base64.h"
#include "base/bind.h"
@@ -48,6 +46,8 @@
#include "content/public/browser/site_instance.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/browser/web_contents.h"
+#include "extensions/browser/app_window/app_window.h"
+#include "extensions/browser/app_window/app_window_registry.h"
#include "extensions/browser/extension_error.h"
#include "extensions/browser/extension_prefs.h"
#include "extensions/browser/extension_registry.h"
@@ -78,8 +78,6 @@
#include "webkit/browser/fileapi/isolated_context.h"
#include "webkit/common/blob/shareable_file_reference.h"
-using apps::AppWindow;
-using apps::AppWindowRegistry;
using content::RenderViewHost;
namespace extensions {
diff --git a/chrome/browser/extensions/api/feedback_private/feedback_browsertest.cc b/chrome/browser/extensions/api/feedback_private/feedback_browsertest.cc
index 152ebc9..421c94a 100644
--- a/chrome/browser/extensions/api/feedback_private/feedback_browsertest.cc
+++ b/chrome/browser/extensions/api/feedback_private/feedback_browsertest.cc
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "apps/app_window.h"
-#include "apps/app_window_registry.h"
#include "base/bind.h"
#include "chrome/browser/apps/app_browsertest_util.h"
#include "chrome/browser/browser_process.h"
@@ -16,13 +14,11 @@
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/public/common/content_switches.h"
+#include "extensions/browser/app_window/app_window.h"
+#include "extensions/browser/app_window/app_window_registry.h"
#include "extensions/browser/event_router.h"
#include "extensions/browser/extension_system.h"
-using apps::AppWindow;
-using apps::AppWindowRegistry;
-using extensions::Extension;
-
namespace {
void StopMessageLoopCallback() {
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 84b6e00..7129cda 100644
--- a/chrome/browser/extensions/api/file_system/file_system_api.cc
+++ b/chrome/browser/extensions/api/file_system/file_system_api.cc
@@ -6,8 +6,6 @@
#include <set>
-#include "apps/app_window.h"
-#include "apps/app_window_registry.h"
#include "apps/saved_files_service.h"
#include "base/bind.h"
#include "base/files/file_path.h"
@@ -35,6 +33,8 @@
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
+#include "extensions/browser/app_window/app_window.h"
+#include "extensions/browser/app_window/app_window_registry.h"
#include "extensions/browser/extension_prefs.h"
#include "extensions/browser/extension_system.h"
#include "extensions/browser/granted_file_entry.h"
@@ -60,7 +60,6 @@
using apps::SavedFileEntry;
using apps::SavedFilesService;
-using apps::AppWindow;
using storage::IsolatedContext;
const char kInvalidCallingPage[] = "Invalid calling page. This function can't "
@@ -490,8 +489,7 @@ void FileSystemChooseEntryFunction::ShowPicker(
// platform-app only.
content::WebContents* web_contents = NULL;
if (extension_->is_platform_app()) {
- apps::AppWindowRegistry* registry =
- apps::AppWindowRegistry::Get(GetProfile());
+ AppWindowRegistry* registry = AppWindowRegistry::Get(GetProfile());
DCHECK(registry);
AppWindow* app_window =
registry->GetAppWindowForRenderViewHost(render_view_host());
@@ -611,8 +609,7 @@ void FileSystemChooseEntryFunction::FilesSelected(
if (is_directory_) {
// Get the WebContents for the app window to be the parent window of the
// confirmation dialog if necessary.
- apps::AppWindowRegistry* registry =
- apps::AppWindowRegistry::Get(GetProfile());
+ AppWindowRegistry* registry = AppWindowRegistry::Get(GetProfile());
DCHECK(registry);
AppWindow* app_window =
registry->GetAppWindowForRenderViewHost(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 8c5200d..df7594c 100644
--- a/chrome/browser/extensions/api/identity/web_auth_flow.cc
+++ b/chrome/browser/extensions/api/identity/web_auth_flow.cc
@@ -4,7 +4,6 @@
#include "chrome/browser/extensions/api/identity/web_auth_flow.h"
-#include "apps/app_window.h"
#include "base/base64.h"
#include "base/debug/trace_event.h"
#include "base/location.h"
@@ -26,13 +25,13 @@
#include "content/public/browser/resource_request_details.h"
#include "content/public/browser/web_contents.h"
#include "crypto/random.h"
+#include "extensions/browser/app_window/app_window.h"
#include "extensions/browser/event_router.h"
#include "extensions/browser/extension_system.h"
#include "extensions/browser/guest_view/guest_view_base.h"
#include "grit/browser_resources.h"
#include "url/gurl.h"
-using apps::AppWindow;
using content::RenderViewHost;
using content::ResourceRedirectDetails;
using content::WebContents;
@@ -63,7 +62,7 @@ WebAuthFlow::~WebAuthFlow() {
WebContentsObserver::Observe(NULL);
if (!app_window_key_.empty()) {
- apps::AppWindowRegistry::Get(profile_)->RemoveObserver(this);
+ AppWindowRegistry::Get(profile_)->RemoveObserver(this);
if (app_window_ && app_window_->web_contents())
app_window_->web_contents()->Close();
@@ -71,7 +70,7 @@ WebAuthFlow::~WebAuthFlow() {
}
void WebAuthFlow::Start() {
- apps::AppWindowRegistry::Get(profile_)->AddObserver(this);
+ AppWindowRegistry::Get(profile_)->AddObserver(this);
// Attach a random ID string to the window so we can recoginize it
// in OnAppWindowAdded.
diff --git a/chrome/browser/extensions/api/identity/web_auth_flow.h b/chrome/browser/extensions/api/identity/web_auth_flow.h
index 0067c0e..1225472 100644
--- a/chrome/browser/extensions/api/identity/web_auth_flow.h
+++ b/chrome/browser/extensions/api/identity/web_auth_flow.h
@@ -7,10 +7,10 @@
#include <string>
-#include "apps/app_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"
+#include "extensions/browser/app_window/app_window_registry.h"
#include "ui/gfx/rect.h"
#include "url/gurl.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 apps::AppWindowRegistry::Observer {
+ public AppWindowRegistry::Observer {
public:
enum Mode {
INTERACTIVE, // Show UI to the user if necessary.
@@ -92,8 +92,8 @@ class WebAuthFlow : public content::NotificationObserver,
friend class ::WebAuthFlowTest;
// ::AppWindowRegistry::Observer implementation.
- virtual void OnAppWindowAdded(apps::AppWindow* app_window) OVERRIDE;
- virtual void OnAppWindowRemoved(apps::AppWindow* app_window) OVERRIDE;
+ virtual void OnAppWindowAdded(AppWindow* app_window) OVERRIDE;
+ virtual void OnAppWindowRemoved(AppWindow* app_window) OVERRIDE;
// NotificationObserver implementation.
virtual void Observe(int type,
@@ -126,7 +126,7 @@ class WebAuthFlow : public content::NotificationObserver,
GURL provider_url_;
Mode mode_;
- apps::AppWindow* app_window_;
+ AppWindow* app_window_;
std::string app_window_key_;
bool embedded_window_created_;
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 1dd6f81..d2c6eb0 100644
--- a/chrome/browser/extensions/api/media_galleries/media_galleries_api.cc
+++ b/chrome/browser/extensions/api/media_galleries/media_galleries_api.cc
@@ -10,8 +10,6 @@
#include <string>
#include <vector>
-#include "apps/app_window.h"
-#include "apps/app_window_registry.h"
#include "base/callback.h"
#include "base/lazy_instance.h"
#include "base/numerics/safe_conversions.h"
@@ -46,6 +44,8 @@
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
+#include "extensions/browser/app_window/app_window.h"
+#include "extensions/browser/app_window/app_window_registry.h"
#include "extensions/browser/blob_holder.h"
#include "extensions/browser/extension_prefs.h"
#include "extensions/browser/extension_system.h"
@@ -157,8 +157,8 @@ WebContents* GetWebContents(content::RenderViewHost* rvh,
// If there is no WebContentsModalDialogManager, then this contents is
// probably the background page for an app. Try to find a app window to
// host the dialog.
- apps::AppWindow* window = apps::AppWindowRegistry::Get(profile)
- ->GetCurrentAppWindowForApp(app_id);
+ AppWindow* window = AppWindowRegistry::Get(profile)
+ ->GetCurrentAppWindowForApp(app_id);
contents = window ? window->web_contents() : NULL;
}
return contents;
diff --git a/chrome/browser/extensions/api/tabs/ash_panel_contents.cc b/chrome/browser/extensions/api/tabs/ash_panel_contents.cc
index 1750c01..93d8e5e 100644
--- a/chrome/browser/extensions/api/tabs/ash_panel_contents.cc
+++ b/chrome/browser/extensions/api/tabs/ash_panel_contents.cc
@@ -21,7 +21,7 @@
#include "extensions/common/extension_messages.h"
#include "ui/gfx/image/image.h"
-using apps::AppWindow;
+using extensions::AppWindow;
using extensions::NativeAppWindow;
// AshPanelWindowController ----------------------------------------------------
diff --git a/chrome/browser/extensions/api/tabs/ash_panel_contents.h b/chrome/browser/extensions/api/tabs/ash_panel_contents.h
index 55ff4f5..8384464 100644
--- a/chrome/browser/extensions/api/tabs/ash_panel_contents.h
+++ b/chrome/browser/extensions/api/tabs/ash_panel_contents.h
@@ -7,11 +7,11 @@
#include <vector>
-#include "apps/app_window.h"
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/ui/ash/launcher/launcher_favicon_loader.h"
#include "content/public/browser/web_contents_observer.h"
+#include "extensions/browser/app_window/app_window.h"
#include "extensions/browser/extension_function_dispatcher.h"
class AshPanelWindowController;
@@ -25,21 +25,21 @@ namespace extensions {
struct DraggableRegion;
}
-// apps::AppWindowContents class specific to panel windows created by v1
+// extensions::AppWindowContents class specific to panel windows created by v1
// extenstions. This class maintains a WebContents instance and observes it for
// the purpose of passing messages to the extensions system. It also creates
// an extensions::WindowController instance for interfacing with the v1
// extensions API.
class AshPanelContents
- : public apps::AppWindowContents,
+ : public extensions::AppWindowContents,
public content::WebContentsObserver,
public LauncherFaviconLoader::Delegate,
public extensions::ExtensionFunctionDispatcher::Delegate {
public:
- explicit AshPanelContents(apps::AppWindow* host);
+ explicit AshPanelContents(extensions::AppWindow* host);
virtual ~AshPanelContents();
- // apps::AppWindowContents
+ // extensions::AppWindowContents
virtual void Initialize(content::BrowserContext* context,
const GURL& url) OVERRIDE;
virtual void LoadContents(int32 creator_process_id) OVERRIDE;
@@ -67,7 +67,7 @@ class AshPanelContents
void OnRequest(const ExtensionHostMsg_Request_Params& params);
- apps::AppWindow* host_;
+ extensions::AppWindow* host_;
GURL url_;
scoped_ptr<content::WebContents> web_contents_;
scoped_ptr<extensions::ExtensionFunctionDispatcher>
diff --git a/chrome/browser/extensions/api/tabs/tabs_api.cc b/chrome/browser/extensions/api/tabs/tabs_api.cc
index f379b70..11ec253 100644
--- a/chrome/browser/extensions/api/tabs/tabs_api.cc
+++ b/chrome/browser/extensions/api/tabs/tabs_api.cc
@@ -8,7 +8,6 @@
#include <limits>
#include <vector>
-#include "apps/app_window.h"
#include "base/bind.h"
#include "base/command_line.h"
#include "base/logging.h"
@@ -65,6 +64,7 @@
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/url_constants.h"
+#include "extensions/browser/app_window/app_window.h"
#include "extensions/browser/extension_function_dispatcher.h"
#include "extensions/browser/extension_function_util.h"
#include "extensions/browser/extension_host.h"
@@ -85,12 +85,11 @@
#include "ui/base/ui_base_types.h"
#if defined(USE_ASH)
-#include "apps/app_window_registry.h"
#include "ash/ash_switches.h"
#include "chrome/browser/extensions/api/tabs/ash_panel_contents.h"
+#include "extensions/browser/app_window/app_window_registry.h"
#endif
-using apps::AppWindow;
using content::BrowserThread;
using content::NavigationController;
using content::NavigationEntry;
diff --git a/chrome/browser/extensions/extension_tab_util.cc b/chrome/browser/extensions/extension_tab_util.cc
index 4fc76cb..ffc2b95 100644
--- a/chrome/browser/extensions/extension_tab_util.cc
+++ b/chrome/browser/extensions/extension_tab_util.cc
@@ -4,8 +4,6 @@
#include "chrome/browser/extensions/extension_tab_util.h"
-#include "apps/app_window.h"
-#include "apps/app_window_registry.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "chrome/browser/extensions/api/tabs/tabs_constants.h"
@@ -30,6 +28,8 @@
#include "content/public/browser/favicon_status.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/web_contents.h"
+#include "extensions/browser/app_window/app_window.h"
+#include "extensions/browser/app_window/app_window_registry.h"
#include "extensions/common/constants.h"
#include "extensions/common/error_utils.h"
#include "extensions/common/extension.h"
@@ -40,7 +40,6 @@
#include "extensions/common/permissions/permissions_data.h"
#include "url/gurl.h"
-using apps::AppWindow;
using content::NavigationEntry;
using content::WebContents;
@@ -52,7 +51,7 @@ namespace keys = tabs_constants;
WindowController* GetAppWindowController(const WebContents* contents) {
Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext());
- apps::AppWindowRegistry* registry = apps::AppWindowRegistry::Get(profile);
+ AppWindowRegistry* registry = AppWindowRegistry::Get(profile);
if (!registry)
return NULL;
AppWindow* app_window =
diff --git a/chrome/browser/extensions/startup_helper.cc b/chrome/browser/extensions/startup_helper.cc
index f9f1228..25cd85e 100644
--- a/chrome/browser/extensions/startup_helper.cc
+++ b/chrome/browser/extensions/startup_helper.cc
@@ -26,8 +26,8 @@
#include "ipc/ipc_message.h"
#if defined(OS_WIN)
-#include "apps/app_window.h"
-#include "apps/app_window_registry.h"
+#include "extensions/browser/app_window/app_window.h"
+#include "extensions/browser/app_window/app_window_registry.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_util.h"
#endif
@@ -58,10 +58,10 @@ CreateEphemeralAppInstaller(
return installer;
}
- apps::AppWindowRegistry* app_window_registry =
- apps::AppWindowRegistry::Get(profile);
+ extensions::AppWindowRegistry* app_window_registry =
+ extensions::AppWindowRegistry::Get(profile);
DCHECK(app_window_registry);
- apps::AppWindow* app_window =
+ extensions::AppWindow* app_window =
app_window_registry->GetCurrentAppWindowForApp(app_id);
if (!app_window)
return installer;
diff --git a/chrome/browser/extensions/window_open_apitest.cc b/chrome/browser/extensions/window_open_apitest.cc
index db6f3fd..3a39615 100644
--- a/chrome/browser/extensions/window_open_apitest.cc
+++ b/chrome/browser/extensions/window_open_apitest.cc
@@ -34,7 +34,7 @@
#include "testing/gtest/include/gtest/gtest.h"
#if defined(USE_ASH)
-#include "apps/app_window_registry.h"
+#include "extensions/browser/app_window/app_window_registry.h"
#endif
#if defined(USE_ASH) && defined(OS_CHROMEOS)
@@ -59,8 +59,8 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_WindowOpen) {
int GetPanelCount(Browser* browser) {
#if defined(USE_ASH_PANELS)
- return static_cast<int>(
- apps::AppWindowRegistry::Get(browser->profile())->app_windows().size());
+ return static_cast<int>(extensions::AppWindowRegistry::Get(
+ browser->profile())->app_windows().size());
#else
return PanelManager::GetInstance()->num_panels();
#endif
diff --git a/chrome/browser/media/media_capture_devices_dispatcher.cc b/chrome/browser/media/media_capture_devices_dispatcher.cc
index 1db0f88..ffb3aa2 100644
--- a/chrome/browser/media/media_capture_devices_dispatcher.cc
+++ b/chrome/browser/media/media_capture_devices_dispatcher.cc
@@ -4,8 +4,6 @@
#include "chrome/browser/media/media_capture_devices_dispatcher.h"
-#include "apps/app_window.h"
-#include "apps/app_window_registry.h"
#include "base/command_line.h"
#include "base/logging.h"
#include "base/metrics/field_trial.h"
@@ -40,6 +38,8 @@
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/media_stream_request.h"
+#include "extensions/browser/app_window/app_window.h"
+#include "extensions/browser/app_window/app_window_registry.h"
#include "extensions/common/constants.h"
#include "extensions/common/extension.h"
#include "extensions/common/permissions/permissions_data.h"
@@ -236,10 +236,10 @@ gfx::NativeWindow FindParentWindowForWebContents(
if (browser && browser->window())
return browser->window()->GetNativeWindow();
- const apps::AppWindowRegistry::AppWindowList& window_list =
- apps::AppWindowRegistry::Get(
+ const extensions::AppWindowRegistry::AppWindowList& window_list =
+ extensions::AppWindowRegistry::Get(
web_contents->GetBrowserContext())->app_windows();
- for (apps::AppWindowRegistry::AppWindowList::const_iterator iter =
+ for (extensions::AppWindowRegistry::AppWindowList::const_iterator iter =
window_list.begin();
iter != window_list.end(); ++iter) {
if ((*iter)->web_contents() == web_contents)
diff --git a/chrome/browser/policy/policy_browsertest.cc b/chrome/browser/policy/policy_browsertest.cc
index c687417..921d58f 100644
--- a/chrome/browser/policy/policy_browsertest.cc
+++ b/chrome/browser/policy/policy_browsertest.cc
@@ -158,11 +158,11 @@
#endif
#if !defined(OS_MACOSX)
-#include "apps/app_window.h"
-#include "apps/app_window_registry.h"
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "chrome/browser/ui/extensions/application_launch.h"
+#include "extensions/browser/app_window/app_window.h"
+#include "extensions/browser/app_window/app_window_registry.h"
#include "extensions/browser/app_window/native_app_window.h"
#include "ui/base/window_open_disposition.h"
#endif
@@ -540,26 +540,27 @@ void WebContentsLoadedOrDestroyedWatcher::DidStopLoading(
#if !defined(OS_MACOSX)
// Observer used to wait for the creation of a new app window.
-class TestAddAppWindowObserver : public apps::AppWindowRegistry::Observer {
+class TestAddAppWindowObserver
+ : public extensions::AppWindowRegistry::Observer {
public:
- explicit TestAddAppWindowObserver(apps::AppWindowRegistry* registry);
+ explicit TestAddAppWindowObserver(extensions::AppWindowRegistry* registry);
virtual ~TestAddAppWindowObserver();
- // apps::AppWindowRegistry::Observer:
- virtual void OnAppWindowAdded(apps::AppWindow* app_window) OVERRIDE;
+ // extensions::AppWindowRegistry::Observer:
+ virtual void OnAppWindowAdded(extensions::AppWindow* app_window) OVERRIDE;
- apps::AppWindow* WaitForAppWindow();
+ extensions::AppWindow* WaitForAppWindow();
private:
- apps::AppWindowRegistry* registry_; // Not owned.
- apps::AppWindow* window_; // Not owned.
+ extensions::AppWindowRegistry* registry_; // Not owned.
+ extensions::AppWindow* window_; // Not owned.
base::RunLoop run_loop_;
DISALLOW_COPY_AND_ASSIGN(TestAddAppWindowObserver);
};
TestAddAppWindowObserver::TestAddAppWindowObserver(
- apps::AppWindowRegistry* registry)
+ extensions::AppWindowRegistry* registry)
: registry_(registry), window_(NULL) {
registry_->AddObserver(this);
}
@@ -568,12 +569,13 @@ TestAddAppWindowObserver::~TestAddAppWindowObserver() {
registry_->RemoveObserver(this);
}
-void TestAddAppWindowObserver::OnAppWindowAdded(apps::AppWindow* app_window) {
+void TestAddAppWindowObserver::OnAppWindowAdded(
+ extensions::AppWindow* app_window) {
window_ = app_window;
run_loop_.Quit();
}
-apps::AppWindow* TestAddAppWindowObserver::WaitForAppWindow() {
+extensions::AppWindow* TestAddAppWindowObserver::WaitForAppWindow() {
run_loop_.Run();
return window_;
}
@@ -2222,12 +2224,12 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, FullscreenAllowedApp) {
// Launch an app that tries to open a fullscreen window.
TestAddAppWindowObserver add_window_observer(
- apps::AppWindowRegistry::Get(browser()->profile()));
+ extensions::AppWindowRegistry::Get(browser()->profile()));
OpenApplication(AppLaunchParams(browser()->profile(),
extension,
extensions::LAUNCH_CONTAINER_NONE,
NEW_WINDOW));
- apps::AppWindow* window = add_window_observer.WaitForAppWindow();
+ extensions::AppWindow* window = add_window_observer.WaitForAppWindow();
ASSERT_TRUE(window);
// Verify that the window is not in fullscreen mode.
diff --git a/chrome/browser/power/process_power_collector.cc b/chrome/browser/power/process_power_collector.cc
index 71a16f8..da85573 100644
--- a/chrome/browser/power/process_power_collector.cc
+++ b/chrome/browser/power/process_power_collector.cc
@@ -4,8 +4,6 @@
#include "chrome/browser/power/process_power_collector.h"
-#include "apps/app_window.h"
-#include "apps/app_window_registry.h"
#include "base/process/process_handle.h"
#include "base/process/process_metrics.h"
#include "chrome/browser/browser_process.h"
@@ -17,6 +15,8 @@
#include "content/public/browser/browser_context.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/web_contents.h"
+#include "extensions/browser/app_window/app_window.h"
+#include "extensions/browser/app_window/app_window_registry.h"
#include "url/gurl.h"
#if defined(OS_CHROMEOS)
@@ -127,9 +127,9 @@ double ProcessPowerCollector::SynchronizeProcesses() {
for (std::vector<Profile*>::const_iterator it = open_profiles.begin();
it != open_profiles.end();
++it) {
- const apps::AppWindowRegistry::AppWindowList& app_windows =
- apps::AppWindowRegistry::Get(*it)->app_windows();
- for (apps::AppWindowRegistry::AppWindowList::const_iterator itr =
+ const extensions::AppWindowRegistry::AppWindowList& app_windows =
+ extensions::AppWindowRegistry::Get(*it)->app_windows();
+ for (extensions::AppWindowRegistry::AppWindowList::const_iterator itr =
app_windows.begin();
itr != app_windows.end();
++itr) {
diff --git a/chrome/browser/power/process_power_collector_unittest.cc b/chrome/browser/power/process_power_collector_unittest.cc
index df5d2a98..a112410 100644
--- a/chrome/browser/power/process_power_collector_unittest.cc
+++ b/chrome/browser/power/process_power_collector_unittest.cc
@@ -5,8 +5,6 @@
#include "chrome/browser/power/process_power_collector.h"
#include "apps/app_window_contents.h"
-#include "apps/app_window_registry.h"
-#include "apps/ui/apps_client.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/apps/chrome_app_delegate.h"
#include "chrome/browser/ui/browser_commands.h"
@@ -19,6 +17,8 @@
#include "content/public/browser/site_instance.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/mock_render_process_host.h"
+#include "extensions/browser/app_window/app_window_registry.h"
+#include "extensions/browser/app_window/apps_client.h"
#include "extensions/browser/app_window/native_app_window.h"
#include "extensions/common/extension.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -88,7 +88,7 @@ class BrowserProcessPowerTest : public BrowserWithTestWindowTest {
scoped_ptr<TestingProfileManager> profile_manager_;
};
-class TestAppWindowContents : public apps::AppWindowContents {
+class TestAppWindowContents : public extensions::AppWindowContents {
public:
explicit TestAppWindowContents(content::WebContents* web_contents)
: web_contents_(web_contents) {}
@@ -287,21 +287,22 @@ TEST_F(BrowserProcessPowerTest, AppsRecordPowerUsage) {
&error));
EXPECT_TRUE(extension.get()) << error;
// Increment the apps count to avoid a DCHECK later.
- apps::AppsClient::Get()->IncrementKeepAliveCount();
+ extensions::AppsClient::Get()->IncrementKeepAliveCount();
Profile* current_profile =
profile_manager_->CreateTestingProfile("Test user");
GURL url("chrome-extension://aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
- apps::AppWindow* window = new apps::AppWindow(
+ extensions::AppWindow* window = new extensions::AppWindow(
current_profile, new ChromeAppDelegate(), extension.get());
content::WebContents* web_contents(
content::WebContents::Create(content::WebContents::CreateParams(
current_profile,
content::SiteInstance::CreateForURL(current_profile, url))));
- window->SetAppWindowContentsForTesting(scoped_ptr<apps::AppWindowContents>(
- new TestAppWindowContents(web_contents)));
- apps::AppWindowRegistry* app_registry =
- apps::AppWindowRegistry::Get(current_profile);
+ window->SetAppWindowContentsForTesting(
+ scoped_ptr<extensions::AppWindowContents>(
+ new TestAppWindowContents(web_contents)));
+ extensions::AppWindowRegistry* app_registry =
+ extensions::AppWindowRegistry::Get(current_profile);
app_registry->AddAppWindow(window);
collector->set_cpu_usage_callback_for_testing(
@@ -312,7 +313,8 @@ TEST_F(BrowserProcessPowerTest, AppsRecordPowerUsage) {
EXPECT_EQ(1u, collector->metrics_map_for_testing()->size());
// Clear the AppWindowContents before trying to close.
- window->SetAppWindowContentsForTesting(scoped_ptr<apps::AppWindowContents>());
+ window->SetAppWindowContentsForTesting(
+ scoped_ptr<extensions::AppWindowContents>());
window->OnNativeClose();
collector->UpdatePowerConsumptionForTesting();
EXPECT_EQ(0u, collector->metrics_map_for_testing()->size());
diff --git a/chrome/browser/ui/apps/apps_metro_handler_win.cc b/chrome/browser/ui/apps/apps_metro_handler_win.cc
index 8d212e8..49af8e8 100644
--- a/chrome/browser/ui/apps/apps_metro_handler_win.cc
+++ b/chrome/browser/ui/apps/apps_metro_handler_win.cc
@@ -4,12 +4,12 @@
#include "chrome/browser/ui/apps/apps_metro_handler_win.h"
-#include "apps/app_window.h"
-#include "apps/app_window_registry.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/ui/simple_message_box.h"
#include "chrome/grit/chromium_strings.h"
#include "chrome/grit/generated_resources.h"
+#include "extensions/browser/app_window/app_window.h"
+#include "extensions/browser/app_window/app_window_registry.h"
#include "ui/base/l10n/l10n_util.h"
bool VerifyASHSwitchForApps(gfx::NativeWindow parent_window,
@@ -17,8 +17,8 @@ bool VerifyASHSwitchForApps(gfx::NativeWindow parent_window,
DCHECK(win_restart_command_id == IDC_WIN_DESKTOP_RESTART ||
win_restart_command_id == IDC_WIN8_METRO_RESTART ||
win_restart_command_id == IDC_WIN_CHROMEOS_RESTART);
- if (!apps::AppWindowRegistry::IsAppWindowRegisteredInAnyProfile(
- apps::AppWindow::WINDOW_TYPE_DEFAULT)) {
+ if (!extensions::AppWindowRegistry::IsAppWindowRegisteredInAnyProfile(
+ extensions::AppWindow::WINDOW_TYPE_DEFAULT)) {
return true;
}
diff --git a/chrome/browser/ui/apps/chrome_apps_client.cc b/chrome/browser/ui/apps/chrome_apps_client.cc
index 1760a6d..80ffedc 100644
--- a/chrome/browser/ui/apps/chrome_apps_client.cc
+++ b/chrome/browser/ui/apps/chrome_apps_client.cc
@@ -4,12 +4,12 @@
#include "chrome/browser/ui/apps/chrome_apps_client.h"
-#include "apps/app_window.h"
#include "base/memory/singleton.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/devtools/devtools_window.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/common/extensions/features/feature_channel.h"
+#include "extensions/browser/app_window/app_window.h"
#include "extensions/common/extension.h"
// TODO(jamescook): We probably shouldn't compile this class at all on Android.
@@ -39,19 +39,19 @@ ChromeAppsClient::GetLoadedBrowserContexts() {
profiles.end());
}
-apps::AppWindow* ChromeAppsClient::CreateAppWindow(
+extensions::AppWindow* ChromeAppsClient::CreateAppWindow(
content::BrowserContext* context,
const extensions::Extension* extension) {
#if defined(OS_ANDROID)
return NULL;
#else
- return new apps::AppWindow(context, new ChromeAppDelegate, extension);
+ return new extensions::AppWindow(context, new ChromeAppDelegate, extension);
#endif
}
extensions::NativeAppWindow* ChromeAppsClient::CreateNativeAppWindow(
- apps::AppWindow* window,
- const apps::AppWindow::CreateParams& params) {
+ extensions::AppWindow* window,
+ const extensions::AppWindow::CreateParams& params) {
#if defined(OS_ANDROID)
return NULL;
#else
diff --git a/chrome/browser/ui/apps/chrome_apps_client.h b/chrome/browser/ui/apps/chrome_apps_client.h
index 1f3b946..cda6301 100644
--- a/chrome/browser/ui/apps/chrome_apps_client.h
+++ b/chrome/browser/ui/apps/chrome_apps_client.h
@@ -5,15 +5,15 @@
#ifndef CHROME_BROWSER_UI_APPS_CHROME_APPS_CLIENT_H_
#define CHROME_BROWSER_UI_APPS_CHROME_APPS_CLIENT_H_
-#include "apps/ui/apps_client.h"
#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "extensions/browser/app_window/apps_client.h"
template <typename T>
struct DefaultSingletonTraits;
// The implementation of AppsClient for Chrome.
-class ChromeAppsClient : public apps::AppsClient {
+class ChromeAppsClient : public extensions::AppsClient {
public:
ChromeAppsClient();
virtual ~ChromeAppsClient();
@@ -24,15 +24,15 @@ class ChromeAppsClient : public apps::AppsClient {
private:
friend struct DefaultSingletonTraits<ChromeAppsClient>;
- // apps::AppsClient
+ // extensions::AppsClient
virtual std::vector<content::BrowserContext*> GetLoadedBrowserContexts()
OVERRIDE;
- virtual apps::AppWindow* CreateAppWindow(
+ virtual extensions::AppWindow* CreateAppWindow(
content::BrowserContext* context,
const extensions::Extension* extension) OVERRIDE;
virtual extensions::NativeAppWindow* CreateNativeAppWindow(
- apps::AppWindow* window,
- const apps::AppWindow::CreateParams& params) OVERRIDE;
+ extensions::AppWindow* window,
+ const extensions::AppWindow::CreateParams& params) OVERRIDE;
virtual void IncrementKeepAliveCount() OVERRIDE;
virtual void DecrementKeepAliveCount() OVERRIDE;
virtual void OpenDevToolsWindow(content::WebContents* web_contents,
@@ -41,8 +41,8 @@ class ChromeAppsClient : public apps::AppsClient {
// Implemented in platform specific code.
static extensions::NativeAppWindow* CreateNativeAppWindowImpl(
- apps::AppWindow* window,
- const apps::AppWindow::CreateParams& params);
+ extensions::AppWindow* window,
+ const extensions::AppWindow::CreateParams& params);
DISALLOW_COPY_AND_ASSIGN(ChromeAppsClient);
};
diff --git a/chrome/browser/ui/ash/accelerator_commands_browsertest.cc b/chrome/browser/ui/ash/accelerator_commands_browsertest.cc
index 67705d1..24efe6d 100644
--- a/chrome/browser/ui/ash/accelerator_commands_browsertest.cc
+++ b/chrome/browser/ui/ash/accelerator_commands_browsertest.cc
@@ -4,7 +4,6 @@
#include "ash/accelerators/accelerator_commands.h"
-#include "apps/app_window.h"
#include "ash/ash_switches.h"
#include "ash/shell.h"
#include "ash/wm/window_state.h"
@@ -17,6 +16,7 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/test_switches.h"
+#include "extensions/browser/app_window/app_window.h"
#include "extensions/browser/app_window/native_app_window.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/views/widget/widget.h"
@@ -240,7 +240,7 @@ class AcceleratorCommandsPlatformAppFullscreenBrowserTest
}
// Sets |app_window|'s show state to |initial_show_state_|.
- void SetToInitialShowState(apps::AppWindow* app_window) {
+ void SetToInitialShowState(extensions::AppWindow* app_window) {
if (initial_show_state_ == ui::SHOW_STATE_MAXIMIZED)
app_window->Maximize();
else
@@ -248,7 +248,7 @@ class AcceleratorCommandsPlatformAppFullscreenBrowserTest
}
// Returns true if |app_window|'s show state is |initial_show_state_|.
- bool IsInitialShowState(apps::AppWindow* app_window) const {
+ bool IsInitialShowState(extensions::AppWindow* app_window) const {
if (initial_show_state_ == ui::SHOW_STATE_MAXIMIZED)
return app_window->GetBaseWindow()->IsMaximized();
else
@@ -278,9 +278,10 @@ IN_PROC_BROWSER_TEST_P(AcceleratorCommandsPlatformAppFullscreenBrowserTest,
// Test that ToggleFullscreen() toggles a platform's app's fullscreen
// state and that it additionally puts the app into immersive fullscreen
// if put_all_windows_in_immersive() returns true.
- apps::AppWindow::CreateParams params;
- params.frame = apps::AppWindow::FRAME_CHROME;
- apps::AppWindow* app_window = CreateAppWindowFromParams(extension, params);
+ extensions::AppWindow::CreateParams params;
+ params.frame = extensions::AppWindow::FRAME_CHROME;
+ extensions::AppWindow* app_window =
+ CreateAppWindowFromParams(extension, params);
extensions::NativeAppWindow* native_app_window =
app_window->GetBaseWindow();
SetToInitialShowState(app_window);
@@ -302,9 +303,10 @@ IN_PROC_BROWSER_TEST_P(AcceleratorCommandsPlatformAppFullscreenBrowserTest,
{
// Repeat the test, but make sure that frameless platform apps are never put
// into immersive fullscreen.
- apps::AppWindow::CreateParams params;
- params.frame = apps::AppWindow::FRAME_NONE;
- apps::AppWindow* app_window = CreateAppWindowFromParams(extension, params);
+ extensions::AppWindow::CreateParams params;
+ params.frame = extensions::AppWindow::FRAME_NONE;
+ extensions::AppWindow* app_window =
+ CreateAppWindowFromParams(extension, params);
extensions::NativeAppWindow* native_app_window =
app_window->GetBaseWindow();
ASSERT_TRUE(app_window->GetBaseWindow()->IsActive());
diff --git a/chrome/browser/ui/ash/chrome_new_window_delegate_chromeos.cc b/chrome/browser/ui/ash/chrome_new_window_delegate_chromeos.cc
index 3b01479..dd7a47d 100644
--- a/chrome/browser/ui/ash/chrome_new_window_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/chrome_new_window_delegate_chromeos.cc
@@ -4,7 +4,6 @@
#include "chrome/browser/ui/ash/chrome_new_window_delegate_chromeos.h"
-#include "apps/app_window_registry.h"
#include "ash/keyboard_overlay/keyboard_overlay_view.h"
#include "chrome/browser/chromeos/file_manager/app_id.h"
#include "chrome/browser/extensions/api/terminal/terminal_extension_helper.h"
@@ -18,7 +17,6 @@
#include "chrome/browser/ui/webui/chrome_web_contents_handler.h"
#include "chrome/common/url_constants.h"
#include "content/public/browser/web_contents.h"
-#include "extensions/browser/app_window/native_app_window.h"
#include "extensions/browser/extension_system.h"
ChromeNewWindowDelegateChromeos::ChromeNewWindowDelegateChromeos() {}
diff --git a/chrome/browser/ui/ash/chrome_shell_delegate.cc b/chrome/browser/ui/ash/chrome_shell_delegate.cc
index e47d1a8..df4870a 100644
--- a/chrome/browser/ui/ash/chrome_shell_delegate.cc
+++ b/chrome/browser/ui/ash/chrome_shell_delegate.cc
@@ -4,8 +4,6 @@
#include "chrome/browser/ui/ash/chrome_shell_delegate.h"
-#include "apps/app_window.h"
-#include "apps/app_window_registry.h"
#include "ash/content_support/gpu_support_impl.h"
#include "ash/magnifier/magnifier_constants.h"
#include "ash/wm/window_state.h"
diff --git a/chrome/browser/ui/ash/launcher/app_window_launcher_controller.cc b/chrome/browser/ui/ash/launcher/app_window_launcher_controller.cc
index 6dacb2e..9113e3b 100644
--- a/chrome/browser/ui/ash/launcher/app_window_launcher_controller.cc
+++ b/chrome/browser/ui/ash/launcher/app_window_launcher_controller.cc
@@ -4,7 +4,6 @@
#include "chrome/browser/ui/ash/launcher/app_window_launcher_controller.h"
-#include "apps/app_window.h"
#include "ash/shelf/shelf_util.h"
#include "ash/shell.h"
#include "ash/wm/window_util.h"
@@ -14,11 +13,13 @@
#include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
#include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h"
#include "chrome/browser/ui/host_desktop.h"
+#include "extensions/browser/app_window/app_window.h"
#include "extensions/common/extension.h"
#include "ui/aura/window_event_dispatcher.h"
#include "ui/wm/public/activation_client.h"
-using apps::AppWindow;
+using extensions::AppWindow;
+using extensions::AppWindowRegistry;
namespace {
@@ -38,8 +39,7 @@ bool ControlsWindow(aura::Window* window) {
AppWindowLauncherController::AppWindowLauncherController(
ChromeLauncherController* owner)
: owner_(owner), activation_client_(NULL) {
- apps::AppWindowRegistry* registry =
- apps::AppWindowRegistry::Get(owner->profile());
+AppWindowRegistry* registry = AppWindowRegistry::Get(owner->profile());
registry_.insert(registry);
registry->AddObserver(this);
if (ash::Shell::HasInstance()) {
@@ -53,7 +53,7 @@ AppWindowLauncherController::AppWindowLauncherController(
}
AppWindowLauncherController::~AppWindowLauncherController() {
- for (std::set<apps::AppWindowRegistry*>::iterator it = registry_.begin();
+ for (std::set<AppWindowRegistry*>::iterator it = registry_.begin();
it != registry_.end();
++it)
(*it)->RemoveObserver(this);
@@ -76,7 +76,7 @@ void AppWindowLauncherController::AdditionalUserAddedToSession(
chrome::MultiUserWindowManager::MULTI_PROFILE_MODE_MIXED)
return;
- apps::AppWindowRegistry* registry = apps::AppWindowRegistry::Get(profile);
+ AppWindowRegistry* registry = AppWindowRegistry::Get(profile);
if (registry_.find(registry) != registry_.end())
return;
diff --git a/chrome/browser/ui/ash/launcher/app_window_launcher_controller.h b/chrome/browser/ui/ash/launcher/app_window_launcher_controller.h
index 98dc5ea..8a8ba69 100644
--- a/chrome/browser/ui/ash/launcher/app_window_launcher_controller.h
+++ b/chrome/browser/ui/ash/launcher/app_window_launcher_controller.h
@@ -9,14 +9,10 @@
#include <map>
#include <string>
-#include "apps/app_window_registry.h"
+#include "extensions/browser/app_window/app_window_registry.h"
#include "ui/aura/window_observer.h"
#include "ui/wm/public/activation_change_observer.h"
-namespace apps {
-class AppWindow;
-}
-
namespace aura {
class Window;
@@ -26,6 +22,10 @@ class ActivationClient;
}
}
+namespace extensions {
+class AppWindow;
+}
+
class ChromeLauncherController;
class Profile;
class AppWindowLauncherItemController;
@@ -34,7 +34,7 @@ class AppWindowLauncherItemController;
// aura window manager. It handles adding and removing launcher items from
// ChromeLauncherController.
class AppWindowLauncherController
- : public apps::AppWindowRegistry::Observer,
+ : public extensions::AppWindowRegistry::Observer,
public aura::WindowObserver,
public aura::client::ActivationChangeObserver {
public:
@@ -50,9 +50,10 @@ class AppWindowLauncherController
virtual void AdditionalUserAddedToSession(Profile* profile);
// Overridden from AppWindowRegistry::Observer:
- virtual void OnAppWindowIconChanged(apps::AppWindow* app_window) OVERRIDE;
- virtual void OnAppWindowShown(apps::AppWindow* app_window) OVERRIDE;
- virtual void OnAppWindowHidden(apps::AppWindow* app_window) OVERRIDE;
+ virtual void OnAppWindowIconChanged(
+ extensions::AppWindow* app_window) OVERRIDE;
+ virtual void OnAppWindowShown(extensions::AppWindow* app_window) OVERRIDE;
+ virtual void OnAppWindowHidden(extensions::AppWindow* app_window) OVERRIDE;
// Overriden from aura::WindowObserver:
virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
@@ -63,7 +64,7 @@ class AppWindowLauncherController
protected:
// Registers a app window with the shelf and this object.
- void RegisterApp(apps::AppWindow* app_window);
+ void RegisterApp(extensions::AppWindow* app_window);
// Unregisters a app window with the shelf and this object.
void UnregisterApp(aura::Window* window);
@@ -82,7 +83,7 @@ class AppWindowLauncherController
// A set of unowned AppWindowRegistry pointers for loaded users.
// Note that this will only be used with multiple users in the side by side
// mode.
- std::set<apps::AppWindowRegistry*> registry_;
+ std::set<extensions::AppWindowRegistry*> registry_;
aura::client::ActivationClient* activation_client_;
// Map of app launcher id to controller.
diff --git a/chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.cc b/chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.cc
index fc61bab..d4e9a54 100644
--- a/chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.cc
+++ b/chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.cc
@@ -4,7 +4,6 @@
#include "chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h"
-#include "apps/app_window.h"
#include "ash/shelf/shelf_model.h"
#include "ash/wm/window_state.h"
#include "ash/wm/window_util.h"
@@ -17,6 +16,7 @@
#include "chrome/browser/ui/ash/launcher/launcher_context_menu.h"
#include "chrome/browser/ui/ash/launcher/launcher_item_controller.h"
#include "content/public/browser/web_contents.h"
+#include "extensions/browser/app_window/app_window.h"
#include "extensions/browser/app_window/native_app_window.h"
#include "skia/ext/image_operations.h"
#include "ui/aura/client/aura_constants.h"
@@ -25,7 +25,7 @@
#include "ui/gfx/image/image_skia.h"
#include "ui/wm/core/window_animations.h"
-using apps::AppWindow;
+using extensions::AppWindow;
namespace {
diff --git a/chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h b/chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h
index 3dd039f..ae6dfe7 100644
--- a/chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h
+++ b/chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h
@@ -13,14 +13,14 @@
#include "chrome/browser/ui/ash/launcher/launcher_item_controller.h"
#include "ui/aura/window_observer.h"
-namespace apps {
-class AppWindow;
-}
-
namespace aura {
class Window;
}
+namespace extensions {
+class AppWindow;
+}
+
namespace gfx {
class Image;
}
@@ -43,7 +43,8 @@ class AppWindowLauncherItemController : public LauncherItemController,
virtual ~AppWindowLauncherItemController();
- void AddAppWindow(apps::AppWindow* app_window, ash::ShelfItemStatus status);
+ void AddAppWindow(extensions::AppWindow* app_window,
+ ash::ShelfItemStatus status);
void RemoveAppWindowForWindow(aura::Window* window);
@@ -82,19 +83,19 @@ class AppWindowLauncherItemController : public LauncherItemController,
void InstallApp();
private:
- typedef std::list<apps::AppWindow*> AppWindowList;
+ typedef std::list<extensions::AppWindow*> AppWindowList;
- void ShowAndActivateOrMinimize(apps::AppWindow* app_window);
+ void ShowAndActivateOrMinimize(extensions::AppWindow* app_window);
// Activate the given |window_to_show|, or - if already selected - advance to
// the next window of similar type.
- void ActivateOrAdvanceToNextAppWindow(apps::AppWindow* window_to_show);
+ void ActivateOrAdvanceToNextAppWindow(extensions::AppWindow* window_to_show);
// List of associated app windows
AppWindowList app_windows_;
// Pointer to the most recently active app window
- apps::AppWindow* last_active_app_window_;
+ extensions::AppWindow* last_active_app_window_;
// The launcher id associated with this set of windows. There is one
// AppLauncherItemController for each |app_shelf_id_|.
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 54618e8..2604e88 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc
@@ -4,8 +4,6 @@
#include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
-#include "apps/app_window.h"
-#include "apps/app_window_registry.h"
#include "ash/ash_switches.h"
#include "ash/display/display_controller.h"
#include "ash/shelf/shelf.h"
@@ -51,6 +49,8 @@
#include "content/public/browser/notification_source.h"
#include "content/public/browser/web_contents.h"
#include "content/public/test/browser_test_utils.h"
+#include "extensions/browser/app_window/app_window.h"
+#include "extensions/browser/app_window/app_window_registry.h"
#include "extensions/browser/app_window/native_app_window.h"
#include "extensions/browser/extension_system.h"
#include "extensions/common/constants.h"
@@ -62,7 +62,7 @@
#include "ui/events/event.h"
#include "ui/events/test/event_generator.h"
-using apps::AppWindow;
+using extensions::AppWindow;
using extensions::Extension;
using content::WebContents;
@@ -80,15 +80,16 @@ class TestEvent : public ui::Event {
DISALLOW_COPY_AND_ASSIGN(TestEvent);
};
-class TestAppWindowRegistryObserver : public apps::AppWindowRegistry::Observer {
+class TestAppWindowRegistryObserver
+ : public extensions::AppWindowRegistry::Observer {
public:
explicit TestAppWindowRegistryObserver(Profile* profile)
: profile_(profile), icon_updates_(0) {
- apps::AppWindowRegistry::Get(profile_)->AddObserver(this);
+ extensions::AppWindowRegistry::Get(profile_)->AddObserver(this);
}
virtual ~TestAppWindowRegistryObserver() {
- apps::AppWindowRegistry::Get(profile_)->RemoveObserver(this);
+ extensions::AppWindowRegistry::Get(profile_)->RemoveObserver(this);
}
// Overridden from AppWindowRegistry::Observer:
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc
index 6228be1..7c6fd53 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc
@@ -48,7 +48,6 @@
#if defined(OS_CHROMEOS)
#include "apps/app_window_contents.h"
-#include "apps/app_window_registry.h"
#include "ash/test/test_session_state_delegate.h"
#include "ash/test/test_shell_delegate.h"
#include "chrome/browser/chromeos/login/users/fake_user_manager.h"
@@ -65,6 +64,7 @@
#include "chrome/test/base/testing_profile_manager.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/test/test_utils.h"
+#include "extensions/browser/app_window/app_window_registry.h"
#include "extensions/browser/app_window/native_app_window.h"
#include "ui/aura/window.h"
#endif
@@ -742,10 +742,12 @@ class V1App : public TestBrowserWindow {
class V2App {
public:
V2App(Profile* profile, const extensions::Extension* extension) {
- window_ = new apps::AppWindow(profile, new ChromeAppDelegate(), extension);
- apps::AppWindow::CreateParams params = apps::AppWindow::CreateParams();
- window_->Init(
- GURL(std::string()), new apps::AppWindowContentsImpl(window_), params);
+ window_ = new extensions::AppWindow(profile, new ChromeAppDelegate(),
+ extension);
+ extensions::AppWindow::CreateParams params =
+ extensions::AppWindow::CreateParams();
+ window_->Init(GURL(std::string()),
+ new apps::AppWindowContentsImpl(window_), params);
}
virtual ~V2App() {
@@ -754,13 +756,13 @@ class V2App {
destroyed_watcher.Wait();
}
- apps::AppWindow* window() { return window_; }
+ extensions::AppWindow* window() { return window_; }
private:
// The app window which represents the application. Note that the window
// deletes itself asynchronously after window_->GetBaseWindow()->Close() gets
// called.
- apps::AppWindow* window_;
+ extensions::AppWindow* window_;
DISALLOW_COPY_AND_ASSIGN(V2App);
};
@@ -2313,7 +2315,7 @@ TEST_F(MultiProfileMultiBrowserShelfLayoutChromeLauncherControllerTest,
v2_app_1.window()->Hide();
EXPECT_EQ(2, model_->item_count());
- v2_app_1.window()->Show(apps::AppWindow::SHOW_ACTIVE);
+ v2_app_1.window()->Show(extensions::AppWindow::SHOW_ACTIVE);
EXPECT_EQ(3, model_->item_count());
}
{
@@ -2324,7 +2326,7 @@ TEST_F(MultiProfileMultiBrowserShelfLayoutChromeLauncherControllerTest,
v2_app_1.window()->Hide();
EXPECT_EQ(2, model_->item_count());
- v2_app_1.window()->Show(apps::AppWindow::SHOW_ACTIVE);
+ v2_app_1.window()->Show(extensions::AppWindow::SHOW_ACTIVE);
EXPECT_EQ(2, model_->item_count());
SwitchActiveUser(profile()->GetProfileName());
@@ -2341,7 +2343,7 @@ TEST_F(MultiProfileMultiBrowserShelfLayoutChromeLauncherControllerTest,
SwitchActiveUser(profile()->GetProfileName());
EXPECT_EQ(2, model_->item_count());
- v2_app_1.window()->Show(apps::AppWindow::SHOW_ACTIVE);
+ v2_app_1.window()->Show(extensions::AppWindow::SHOW_ACTIVE);
EXPECT_EQ(3, model_->item_count());
}
{
@@ -2352,7 +2354,7 @@ TEST_F(MultiProfileMultiBrowserShelfLayoutChromeLauncherControllerTest,
v2_app_2.window()->Hide();
EXPECT_EQ(3, model_->item_count());
- v2_app_2.window()->Show(apps::AppWindow::SHOW_ACTIVE);
+ v2_app_2.window()->Show(extensions::AppWindow::SHOW_ACTIVE);
EXPECT_EQ(3, model_->item_count());
v2_app_1.window()->Hide();
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_win.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_win.cc
index 3e50a71..29ec4ac 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_win.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_win.cc
@@ -4,8 +4,6 @@
#include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
-#include "apps/app_window.h"
-#include "apps/app_window_registry.h"
#include "base/path_service.h"
#include "base/strings/string16.h"
#include "base/strings/stringprintf.h"
@@ -13,6 +11,8 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/host_desktop.h"
#include "chrome/common/chrome_switches.h"
+#include "extensions/browser/app_window/app_window.h"
+#include "extensions/browser/app_window/app_window_registry.h"
#include "extensions/common/constants.h"
#include "ui/aura/remote_window_tree_host_win.h"
@@ -22,8 +22,8 @@ bool ChromeLauncherController::LaunchedInNativeDesktop(
// launch request through the viewer process to desktop Chrome. This allows
// Ash to relinquish foreground window status and trigger a switch to
// desktop mode.
- apps::AppWindow* any_existing_window =
- apps::AppWindowRegistry::Get(profile())
+ extensions::AppWindow* any_existing_window =
+ extensions::AppWindowRegistry::Get(profile())
->GetCurrentAppWindowForApp(app_id);
if (!any_existing_window ||
chrome::GetHostDesktopTypeForNativeWindow(
diff --git a/chrome/browser/ui/ash/launcher/multi_profile_app_window_launcher_controller.cc b/chrome/browser/ui/ash/launcher/multi_profile_app_window_launcher_controller.cc
index d5ca052..95c6f41 100644
--- a/chrome/browser/ui/ash/launcher/multi_profile_app_window_launcher_controller.cc
+++ b/chrome/browser/ui/ash/launcher/multi_profile_app_window_launcher_controller.cc
@@ -4,12 +4,12 @@
#include "chrome/browser/ui/ash/launcher/multi_profile_app_window_launcher_controller.h"
-#include "apps/app_window.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/ash/multi_user/multi_user_util.h"
#include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h"
#include "chrome/browser/ui/host_desktop.h"
+#include "extensions/browser/app_window/app_window.h"
#include "extensions/browser/app_window/native_app_window.h"
#include "ui/aura/window.h"
@@ -44,7 +44,7 @@ void MultiProfileAppWindowLauncherController::ActiveUserChanged(
for (AppWindowList::iterator it = app_window_list_.begin();
it != app_window_list_.end();
++it) {
- apps::AppWindow* app_window = *it;
+ extensions::AppWindow* app_window = *it;
Profile* profile =
Profile::FromBrowserContext(app_window->browser_context());
if (!multi_user_util::IsProfileFromActiveUser(profile) &&
@@ -54,7 +54,7 @@ void MultiProfileAppWindowLauncherController::ActiveUserChanged(
for (AppWindowList::iterator it = app_window_list_.begin();
it != app_window_list_.end();
++it) {
- apps::AppWindow* app_window = *it;
+ extensions::AppWindow* app_window = *it;
Profile* profile =
Profile::FromBrowserContext(app_window->browser_context());
if (multi_user_util::IsProfileFromActiveUser(profile) &&
@@ -68,13 +68,14 @@ void MultiProfileAppWindowLauncherController::ActiveUserChanged(
void MultiProfileAppWindowLauncherController::AdditionalUserAddedToSession(
Profile* profile) {
// Each users AppWindowRegistry needs to be observed.
- apps::AppWindowRegistry* registry = apps::AppWindowRegistry::Get(profile);
+ extensions::AppWindowRegistry* registry =
+ extensions::AppWindowRegistry::Get(profile);
multi_user_registry_.push_back(registry);
registry->AddObserver(this);
}
void MultiProfileAppWindowLauncherController::OnAppWindowAdded(
- apps::AppWindow* app_window) {
+ extensions::AppWindow* app_window) {
if (!ControlsWindow(app_window->GetNativeWindow()))
return;
@@ -90,7 +91,7 @@ void MultiProfileAppWindowLauncherController::OnAppWindowAdded(
}
void MultiProfileAppWindowLauncherController::OnAppWindowShown(
- apps::AppWindow* app_window) {
+ extensions::AppWindow* app_window) {
if (!ControlsWindow(app_window->GetNativeWindow()))
return;
@@ -113,7 +114,7 @@ void MultiProfileAppWindowLauncherController::OnAppWindowShown(
}
void MultiProfileAppWindowLauncherController::OnAppWindowHidden(
- apps::AppWindow* app_window) {
+ extensions::AppWindow* app_window) {
if (!ControlsWindow(app_window->GetNativeWindow()))
return;
@@ -125,7 +126,7 @@ void MultiProfileAppWindowLauncherController::OnAppWindowHidden(
}
void MultiProfileAppWindowLauncherController::OnAppWindowRemoved(
- apps::AppWindow* app_window) {
+ extensions::AppWindow* app_window) {
if (!ControlsWindow(app_window->GetNativeWindow()))
return;
@@ -141,7 +142,7 @@ void MultiProfileAppWindowLauncherController::OnAppWindowRemoved(
}
bool MultiProfileAppWindowLauncherController::UserHasAppOnActiveDesktop(
- apps::AppWindow* app_window) {
+ extensions::AppWindow* app_window) {
const std::string& app_id = app_window->extension_id();
content::BrowserContext* app_context = app_window->browser_context();
DCHECK(!app_context->IsOffTheRecord());
@@ -151,7 +152,7 @@ bool MultiProfileAppWindowLauncherController::UserHasAppOnActiveDesktop(
for (AppWindowList::iterator it = app_window_list_.begin();
it != app_window_list_.end();
++it) {
- apps::AppWindow* other_window = *it;
+ extensions::AppWindow* other_window = *it;
DCHECK(!other_window->browser_context()->IsOffTheRecord());
if (manager->IsWindowOnDesktopOfUser(other_window->GetNativeWindow(),
current_user) &&
diff --git a/chrome/browser/ui/ash/launcher/multi_profile_app_window_launcher_controller.h b/chrome/browser/ui/ash/launcher/multi_profile_app_window_launcher_controller.h
index 546cdbe..520dd64 100644
--- a/chrome/browser/ui/ash/launcher/multi_profile_app_window_launcher_controller.h
+++ b/chrome/browser/ui/ash/launcher/multi_profile_app_window_launcher_controller.h
@@ -21,18 +21,18 @@ class MultiProfileAppWindowLauncherController
virtual void AdditionalUserAddedToSession(Profile* profile) OVERRIDE;
// Overridden from AppWindowRegistry::Observer:
- virtual void OnAppWindowAdded(apps::AppWindow* app_window) OVERRIDE;
- virtual void OnAppWindowRemoved(apps::AppWindow* app_window) OVERRIDE;
- virtual void OnAppWindowShown(apps::AppWindow* app_window) OVERRIDE;
- virtual void OnAppWindowHidden(apps::AppWindow* app_window) OVERRIDE;
+ virtual void OnAppWindowAdded(extensions::AppWindow* app_window) OVERRIDE;
+ virtual void OnAppWindowRemoved(extensions::AppWindow* app_window) OVERRIDE;
+ virtual void OnAppWindowShown(extensions::AppWindow* app_window) OVERRIDE;
+ virtual void OnAppWindowHidden(extensions::AppWindow* app_window) OVERRIDE;
private:
- typedef std::vector<apps::AppWindow*> AppWindowList;
- typedef std::vector<apps::AppWindowRegistry*> AppWindowRegistryList;
+ typedef std::vector<extensions::AppWindow*> AppWindowList;
+ typedef std::vector<extensions::AppWindowRegistry*> AppWindowRegistryList;
// Returns true if the owner of the given |app_window| has a window teleported
// of the |app_window|'s application type to the current desktop.
- bool UserHasAppOnActiveDesktop(apps::AppWindow* app_window);
+ bool UserHasAppOnActiveDesktop(extensions::AppWindow* app_window);
// A list of all app windows for all users.
AppWindowList app_window_list_;
diff --git a/chrome/browser/ui/ash/media_delegate_chromeos.cc b/chrome/browser/ui/ash/media_delegate_chromeos.cc
index 6e0d151..20f4ea3 100644
--- a/chrome/browser/ui/ash/media_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/media_delegate_chromeos.cc
@@ -4,8 +4,6 @@
#include "chrome/browser/ui/ash/media_delegate_chromeos.h"
-#include "apps/app_window.h"
-#include "apps/app_window_registry.h"
#include "ash/shell.h"
#include "ash/system/tray/system_tray_notifier.h"
#include "base/message_loop/message_loop.h"
@@ -19,6 +17,8 @@
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
+#include "extensions/browser/app_window/app_window.h"
+#include "extensions/browser/app_window/app_window_registry.h"
#include "extensions/browser/extension_system.h"
#include "extensions/browser/process_manager.h"
@@ -61,9 +61,9 @@ void GetAppMediaCaptureState(
const MediaStreamCaptureIndicator* indicator,
content::BrowserContext* context,
int* media_state_out) {
- const apps::AppWindowRegistry::AppWindowList& apps =
- apps::AppWindowRegistry::Get(context)->app_windows();
- for (apps::AppWindowRegistry::AppWindowList::const_iterator iter =
+ const extensions::AppWindowRegistry::AppWindowList& apps =
+ extensions::AppWindowRegistry::Get(context)->app_windows();
+ for (extensions::AppWindowRegistry::AppWindowList::const_iterator iter =
apps.begin();
iter != apps.end();
++iter) {
diff --git a/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.cc b/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.cc
index 097559d..8ada2ec 100644
--- a/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.cc
+++ b/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.cc
@@ -4,8 +4,6 @@
#include "chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.h"
-#include "apps/app_window.h"
-#include "apps/app_window_registry.h"
#include "ash/ash_switches.h"
#include "ash/multi_profile_uma.h"
#include "ash/root_window_controller.h"
@@ -32,6 +30,8 @@
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_window.h"
#include "content/public/browser/notification_service.h"
+#include "extensions/browser/app_window/app_window.h"
+#include "extensions/browser/app_window/app_window_registry.h"
#include "google_apis/gaia/gaia_auth_util.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/window.h"
@@ -119,18 +119,20 @@ void RecordUMAForTransferredWindowType(aura::Window* window) {
return;
// If it is not a browser, it is probably be a V2 application. In that case
// one of the AppWindowRegistry instances should know about it.
- apps::AppWindow* app_window = NULL;
+ extensions::AppWindow* app_window = NULL;
std::vector<Profile*> profiles =
g_browser_process->profile_manager()->GetLoadedProfiles();
for (std::vector<Profile*>::iterator it = profiles.begin();
it != profiles.end() && app_window == NULL;
it++) {
- app_window = apps::AppWindowRegistry::Get(*it)
+ app_window = extensions::AppWindowRegistry::Get(*it)
->GetAppWindowForNativeWindow(window);
}
if (app_window) {
- if (app_window->window_type() == apps::AppWindow::WINDOW_TYPE_PANEL ||
- app_window->window_type() == apps::AppWindow::WINDOW_TYPE_V1_PANEL) {
+ if (app_window->window_type() ==
+ extensions::AppWindow::WINDOW_TYPE_PANEL ||
+ app_window->window_type() ==
+ extensions::AppWindow::WINDOW_TYPE_V1_PANEL) {
window_type = ash::MultiProfileUMA::TELEPORT_WINDOW_PANEL;
} else {
window_type = ash::MultiProfileUMA::TELEPORT_WINDOW_V2_APP;
@@ -186,13 +188,13 @@ class AnimationSetter {
// When an app gets created, the window will be tagged for that user. Note
// that the destruction does not need to be tracked here since the universal
// window observer will take care of that.
-class AppObserver : public apps::AppWindowRegistry::Observer {
+class AppObserver : public extensions::AppWindowRegistry::Observer {
public:
explicit AppObserver(const std::string& user_id) : user_id_(user_id) {}
virtual ~AppObserver() {}
// AppWindowRegistry::Observer overrides:
- virtual void OnAppWindowAdded(apps::AppWindow* app_window) OVERRIDE {
+ virtual void OnAppWindowAdded(extensions::AppWindow* app_window) OVERRIDE {
aura::Window* window = app_window->GetNativeWindow();
DCHECK(window);
MultiUserWindowManagerChromeOS::GetInstance()->SetWindowOwner(window,
@@ -249,7 +251,7 @@ MultiUserWindowManagerChromeOS::~MultiUserWindowManagerChromeOS() {
Profile* profile = multi_user_util::GetProfileFromUserID(
app_observer_iterator->first);
DCHECK(profile);
- apps::AppWindowRegistry::Get(profile)
+ extensions::AppWindowRegistry::Get(profile)
->RemoveObserver(app_observer_iterator->second);
delete app_observer_iterator->second;
user_id_to_app_observer_.erase(app_observer_iterator);
@@ -362,13 +364,13 @@ void MultiUserWindowManagerChromeOS::AddUser(content::BrowserContext* context) {
return;
user_id_to_app_observer_[user_id] = new AppObserver(user_id);
- apps::AppWindowRegistry::Get(profile)
+ extensions::AppWindowRegistry::Get(profile)
->AddObserver(user_id_to_app_observer_[user_id]);
// Account all existing application windows of this user accordingly.
- const apps::AppWindowRegistry::AppWindowList& app_windows =
- apps::AppWindowRegistry::Get(profile)->app_windows();
- apps::AppWindowRegistry::AppWindowList::const_iterator it =
+ const extensions::AppWindowRegistry::AppWindowList& app_windows =
+ extensions::AppWindowRegistry::Get(profile)->app_windows();
+ extensions::AppWindowRegistry::AppWindowList::const_iterator it =
app_windows.begin();
for (; it != app_windows.end(); ++it)
user_id_to_app_observer_[user_id]->OnAppWindowAdded(*it);
diff --git a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
index fc9a85b..1696b14 100644
--- a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
@@ -869,7 +869,7 @@ void SystemTrayDelegateChromeOS::SetProfile(Profile* profile) {
user_profile_ = profile;
// Start observing the AppWindowRegistry of the newly set |user_profile_|.
- apps::AppWindowRegistry::Get(user_profile_)->AddObserver(this);
+ extensions::AppWindowRegistry::Get(user_profile_)->AddObserver(this);
PrefService* prefs = profile->GetPrefs();
user_pref_registrar_.reset(new PrefChangeRegistrar);
@@ -1011,9 +1011,9 @@ void SystemTrayDelegateChromeOS::StopObservingAppWindowRegistry() {
if (!user_profile_)
return;
- apps::AppWindowRegistry* registry =
- apps::AppWindowRegistry::Factory::GetForBrowserContext(user_profile_,
- false);
+ extensions::AppWindowRegistry* registry =
+ extensions::AppWindowRegistry::Factory::GetForBrowserContext(
+ user_profile_, false);
if (registry)
registry->RemoveObserver(this);
}
@@ -1033,7 +1033,8 @@ void SystemTrayDelegateChromeOS::NotifyIfLastWindowClosed() {
}
}
- if (!apps::AppWindowRegistry::Get(user_profile_)->app_windows().empty()) {
+ if (!extensions::AppWindowRegistry::Get(
+ user_profile_)->app_windows().empty()) {
// The current user has at least one open app window.
return;
}
@@ -1279,9 +1280,9 @@ void SystemTrayDelegateChromeOS::OnBrowserRemoved(Browser* browser) {
NotifyIfLastWindowClosed();
}
-// Overridden from apps::AppWindowRegistry::Observer.
+// Overridden from extensions::AppWindowRegistry::Observer.
void SystemTrayDelegateChromeOS::OnAppWindowRemoved(
- apps::AppWindow* app_window) {
+ extensions::AppWindow* app_window) {
NotifyIfLastWindowClosed();
}
diff --git a/chrome/browser/ui/ash/system_tray_delegate_chromeos.h b/chrome/browser/ui/ash/system_tray_delegate_chromeos.h
index 6aafa9a..ad08f8b 100644
--- a/chrome/browser/ui/ash/system_tray_delegate_chromeos.h
+++ b/chrome/browser/ui/ash/system_tray_delegate_chromeos.h
@@ -5,7 +5,6 @@
#ifndef CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_CHROMEOS_H_
#define CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_CHROMEOS_H_
-#include "apps/app_window_registry.h"
#include "ash/ime/input_method_menu_manager.h"
#include "ash/session/session_state_observer.h"
#include "ash/system/tray/system_tray.h"
@@ -30,6 +29,7 @@
#include "content/public/browser/notification_registrar.h"
#include "device/bluetooth/bluetooth_adapter.h"
#include "device/bluetooth/bluetooth_discovery_session.h"
+#include "extensions/browser/app_window/app_window_registry.h"
namespace chromeos {
@@ -45,7 +45,7 @@ class SystemTrayDelegateChromeOS
public policy::CloudPolicyStore::Observer,
public ash::SessionStateObserver,
public chrome::BrowserListObserver,
- public apps::AppWindowRegistry::Observer {
+ public extensions::AppWindowRegistry::Observer {
public:
SystemTrayDelegateChromeOS();
@@ -229,8 +229,8 @@ class SystemTrayDelegateChromeOS
// Overridden from chrome::BrowserListObserver:
virtual void OnBrowserRemoved(Browser* browser) OVERRIDE;
- // Overridden from apps::AppWindowRegistry::Observer:
- virtual void OnAppWindowRemoved(apps::AppWindow* app_window) OVERRIDE;
+ // Overridden from extensions::AppWindowRegistry::Observer:
+ virtual void OnAppWindowRemoved(extensions::AppWindow* app_window) OVERRIDE;
void OnAccessibilityStatusChanged(
const AccessibilityStatusEventDetails& details);
diff --git a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
index 3b7ee60..1152179 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
+++ b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
@@ -8,8 +8,6 @@
#include <map>
#include <string>
-#include "apps/app_window.h"
-#include "apps/app_window_registry.h"
#include "base/base64.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
@@ -77,6 +75,8 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/url_constants.h"
+#include "extensions/browser/app_window/app_window.h"
+#include "extensions/browser/app_window/app_window_registry.h"
#include "extensions/browser/app_window/native_app_window.h"
#include "grit/component_scaled_resources.h"
#include "grit/components_strings.h"
@@ -257,8 +257,8 @@ ui::BaseWindow* GetBaseWindowForWebContents(
return browser->window();
gfx::NativeWindow native_window = web_contents->GetTopLevelNativeWindow();
- apps::AppWindow* app_window =
- apps::AppWindowRegistry::GetAppWindowForNativeWindowAnyProfile(
+ extensions::AppWindow* app_window =
+ extensions::AppWindowRegistry::GetAppWindowForNativeWindowAnyProfile(
native_window);
return app_window->GetBaseWindow();
}
diff --git a/chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.mm b/chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.mm
index af3f950..7d483ce6 100644
--- a/chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.mm
+++ b/chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.mm
@@ -5,13 +5,13 @@
#import "chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.h"
#include "apps/app_shim/extension_app_shim_handler_mac.h"
-#include "apps/app_window.h"
-#include "apps/app_window_registry.h"
#include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/app/chrome_command_ids.h"
#import "chrome/browser/ui/cocoa/apps/native_app_window_cocoa.h"
#include "chrome/grit/generated_resources.h"
+#include "extensions/browser/app_window/app_window.h"
+#include "extensions/browser/app_window/app_window_registry.h"
#include "extensions/common/extension.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/l10n/l10n_util_mac.h"
@@ -280,8 +280,9 @@ void AddDuplicateItem(NSMenuItem* top_level_item,
id window = [notification object];
NSString* name = [notification name];
if ([name isEqualToString:NSWindowDidBecomeMainNotification]) {
- apps::AppWindow* appWindow =
- apps::AppWindowRegistry::GetAppWindowForNativeWindowAnyProfile(window);
+ extensions::AppWindow* appWindow =
+ extensions::AppWindowRegistry::GetAppWindowForNativeWindowAnyProfile(
+ window);
const extensions::Extension* extension = NULL;
if (appWindow)
@@ -360,24 +361,24 @@ void AddDuplicateItem(NSMenuItem* top_level_item,
}
- (void)quitCurrentPlatformApp {
- apps::AppWindow* appWindow =
- apps::AppWindowRegistry::GetAppWindowForNativeWindowAnyProfile(
+ extensions::AppWindow* appWindow =
+ extensions::AppWindowRegistry::GetAppWindowForNativeWindowAnyProfile(
[NSApp keyWindow]);
if (appWindow)
apps::ExtensionAppShimHandler::QuitAppForWindow(appWindow);
}
- (void)hideCurrentPlatformApp {
- apps::AppWindow* appWindow =
- apps::AppWindowRegistry::GetAppWindowForNativeWindowAnyProfile(
+ extensions::AppWindow* appWindow =
+ extensions::AppWindowRegistry::GetAppWindowForNativeWindowAnyProfile(
[NSApp keyWindow]);
if (appWindow)
apps::ExtensionAppShimHandler::HideAppForWindow(appWindow);
}
- (void)focusCurrentPlatformApp {
- apps::AppWindow* appWindow =
- apps::AppWindowRegistry::GetAppWindowForNativeWindowAnyProfile(
+ extensions::AppWindow* appWindow =
+ extensions::AppWindowRegistry::GetAppWindowForNativeWindowAnyProfile(
[NSApp keyWindow]);
if (appWindow)
apps::ExtensionAppShimHandler::FocusAppForWindow(appWindow);
diff --git a/chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac_browsertest.mm b/chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac_browsertest.mm
index 1679709..2e660de 100644
--- a/chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac_browsertest.mm
+++ b/chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac_browsertest.mm
@@ -6,7 +6,6 @@
#import <Cocoa/Cocoa.h>
-#include "apps/app_window_registry.h"
#include "base/command_line.h"
#include "base/mac/scoped_nsobject.h"
#include "base/strings/sys_string_conversions.h"
@@ -17,6 +16,7 @@
#include "chrome/browser/ui/browser_iterator.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/common/chrome_switches.h"
+#include "extensions/browser/app_window/app_window_registry.h"
#include "extensions/browser/app_window/native_app_window.h"
#include "extensions/browser/uninstall_reason.h"
#include "extensions/common/extension.h"
@@ -90,18 +90,18 @@ IN_PROC_BROWSER_TEST_F(AppShimMenuControllerBrowserTest,
SetUpApps();
// When an app is focused, all Chrome menu items should be hidden, and a menu
// item for the app should be added.
- apps::AppWindow* app_1_app_window = apps::AppWindowRegistry::Get(profile())
- ->GetAppWindowsForApp(app_1_->id())
- .front();
+ extensions::AppWindow* app_1_app_window =
+ extensions::AppWindowRegistry::Get(profile())
+ ->GetAppWindowsForApp(app_1_->id()).front();
[[NSNotificationCenter defaultCenter]
postNotificationName:NSWindowDidBecomeMainNotification
object:app_1_app_window->GetNativeWindow()];
CheckHasAppMenus(app_1_);
// When another app is focused, the menu item for the app should change.
- apps::AppWindow* app_2_app_window = apps::AppWindowRegistry::Get(profile())
- ->GetAppWindowsForApp(app_2_->id())
- .front();
+ extensions::AppWindow* app_2_app_window =
+ extensions::AppWindowRegistry::Get(profile())
+ ->GetAppWindowsForApp(app_2_->id()).front();
[[NSNotificationCenter defaultCenter]
postNotificationName:NSWindowDidBecomeMainNotification
object:app_2_app_window->GetNativeWindow()];
@@ -133,16 +133,16 @@ IN_PROC_BROWSER_TEST_F(AppShimMenuControllerBrowserTest,
// an app is uninstalled. We need to close the other windows first since the
// menu only changes on a NSWindowWillCloseNotification if there are no other
// windows.
- apps::AppWindow* app_2_app_window = apps::AppWindowRegistry::Get(profile())
- ->GetAppWindowsForApp(app_2_->id())
- .front();
+ extensions::AppWindow* app_2_app_window =
+ extensions::AppWindowRegistry::Get(profile())
+ ->GetAppWindowsForApp(app_2_->id()).front();
app_2_app_window->GetBaseWindow()->Close();
chrome::BrowserIterator()->window()->Close();
- apps::AppWindow* app_1_app_window = apps::AppWindowRegistry::Get(profile())
- ->GetAppWindowsForApp(app_1_->id())
- .front();
+ extensions::AppWindow* app_1_app_window =
+ extensions::AppWindowRegistry::Get(profile())
+ ->GetAppWindowsForApp(app_1_->id()).front();
[[NSNotificationCenter defaultCenter]
postNotificationName:NSWindowDidBecomeMainNotification
object:app_1_app_window->GetNativeWindow()];
diff --git a/chrome/browser/ui/cocoa/apps/chrome_apps_client_cocoa.mm b/chrome/browser/ui/cocoa/apps/chrome_apps_client_cocoa.mm
index de21634..a9a045e 100644
--- a/chrome/browser/ui/cocoa/apps/chrome_apps_client_cocoa.mm
+++ b/chrome/browser/ui/cocoa/apps/chrome_apps_client_cocoa.mm
@@ -8,7 +8,7 @@
// static
extensions::NativeAppWindow* ChromeAppsClient::CreateNativeAppWindowImpl(
- apps::AppWindow* app_window,
- const apps::AppWindow::CreateParams& params) {
+ extensions::AppWindow* app_window,
+ const extensions::AppWindow::CreateParams& params) {
return new NativeAppWindowCocoa(app_window, params);
}
diff --git a/chrome/browser/ui/cocoa/apps/native_app_window_cocoa.h b/chrome/browser/ui/cocoa/apps/native_app_window_cocoa.h
index 340266b..4acf8b2 100644
--- a/chrome/browser/ui/cocoa/apps/native_app_window_cocoa.h
+++ b/chrome/browser/ui/cocoa/apps/native_app_window_cocoa.h
@@ -8,21 +8,17 @@
#import <Cocoa/Cocoa.h>
#include <vector>
-#include "apps/app_window.h"
#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#import "chrome/browser/ui/cocoa/browser_command_executor.h"
#include "content/public/browser/web_contents_observer.h"
+#include "extensions/browser/app_window/app_window.h"
#include "extensions/browser/app_window/native_app_window.h"
#include "extensions/browser/app_window/size_constraints.h"
#include "extensions/common/draggable_region.h"
#include "ui/base/accelerators/accelerator_manager.h"
#include "ui/gfx/rect.h"
-namespace apps {
-class AppWindow;
-}
-
class ExtensionKeybindingRegistryCocoa;
class NativeAppWindowCocoa;
@class ShellNSWindow;
@@ -51,8 +47,8 @@ class SkRegion;
class NativeAppWindowCocoa : public extensions::NativeAppWindow,
public content::WebContentsObserver {
public:
- NativeAppWindowCocoa(apps::AppWindow* app_window,
- const apps::AppWindow::CreateParams& params);
+ NativeAppWindowCocoa(extensions::AppWindow* app_window,
+ const extensions::AppWindow::CreateParams& params);
// ui::BaseWindow implementation.
virtual bool IsActive() const OVERRIDE;
@@ -187,7 +183,7 @@ class NativeAppWindowCocoa : public extensions::NativeAppWindow,
// Hides the window unconditionally. Used by Hide and HideWithApp.
void HideWithoutMarkingHidden();
- apps::AppWindow* app_window_; // weak - AppWindow owns NativeAppWindow.
+ extensions::AppWindow* app_window_; // weak - AppWindow owns NativeAppWindow.
bool has_frame_;
diff --git a/chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm b/chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm
index 5c90d0c..691de9a 100644
--- a/chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm
+++ b/chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm
@@ -42,7 +42,7 @@
// windowWillUseStandardFrame, as the window would not restore back to the
// desired size.
-using apps::AppWindow;
+using extensions::AppWindow;
@interface NSWindow (NSPrivateApis)
- (void)setBottomCornerRounded:(BOOL)rounded;
@@ -78,7 +78,7 @@ NSInteger AlwaysOnTopWindowLevel() {
}
NSRect GfxToCocoaBounds(gfx::Rect bounds) {
- typedef apps::AppWindow::BoundsSpecification BoundsSpecification;
+ typedef AppWindow::BoundsSpecification BoundsSpecification;
NSRect main_screen_rect = [[[NSScreen screens] objectAtIndex:0] frame];
@@ -205,7 +205,7 @@ std::vector<gfx::Rect> CalculateNonDraggableRegions(
- (CGFloat)roundedCornerRadius;
@end
-// TODO(jamescook): Should these be AppNSWindow to match apps::AppWindow?
+// TODO(jamescook): Should these be AppNSWindow to match AppWindow?
// http://crbug.com/344082
@interface ShellNSWindow : ChromeEventProcessingWindow
@end
diff --git a/chrome/browser/ui/cocoa/apps/native_app_window_cocoa_browsertest.mm b/chrome/browser/ui/cocoa/apps/native_app_window_cocoa_browsertest.mm
index 9add357..2b504b1 100644
--- a/chrome/browser/ui/cocoa/apps/native_app_window_cocoa_browsertest.mm
+++ b/chrome/browser/ui/cocoa/apps/native_app_window_cocoa_browsertest.mm
@@ -6,7 +6,6 @@
#import <Cocoa/Cocoa.h>
-#include "apps/app_window_registry.h"
#include "base/mac/mac_util.h"
#include "base/mac/sdk_forward_declarations.h"
#include "chrome/browser/apps/app_browsertest_util.h"
@@ -14,6 +13,7 @@
#include "chrome/browser/ui/extensions/application_launch.h"
#include "content/public/browser/notification_service.h"
#include "content/public/test/test_utils.h"
+#include "extensions/browser/app_window/app_window_registry.h"
using extensions::PlatformAppBrowserTest;
@@ -52,14 +52,14 @@ class NativeAppWindowCocoaBrowserTest : public PlatformAppBrowserTest {
// Test interaction of Hide/Show() with Hide/ShowWithApp().
IN_PROC_BROWSER_TEST_F(NativeAppWindowCocoaBrowserTest, HideShowWithApp) {
SetUpAppWithWindows(2);
- apps::AppWindowRegistry::AppWindowList windows =
- apps::AppWindowRegistry::Get(profile())->app_windows();
+ extensions::AppWindowRegistry::AppWindowList windows =
+ extensions::AppWindowRegistry::Get(profile())->app_windows();
- apps::AppWindow* app_window = windows.front();
+ extensions::AppWindow* app_window = windows.front();
extensions::NativeAppWindow* native_window = app_window->GetBaseWindow();
NSWindow* ns_window = native_window->GetNativeWindow();
- apps::AppWindow* other_app_window = windows.back();
+ extensions::AppWindow* other_app_window = windows.back();
extensions::NativeAppWindow* other_native_window =
other_app_window->GetBaseWindow();
NSWindow* other_ns_window = other_native_window->GetNativeWindow();
@@ -67,7 +67,7 @@ IN_PROC_BROWSER_TEST_F(NativeAppWindowCocoaBrowserTest, HideShowWithApp) {
// Normal Hide/Show.
app_window->Hide();
EXPECT_FALSE([ns_window isVisible]);
- app_window->Show(apps::AppWindow::SHOW_ACTIVE);
+ app_window->Show(extensions::AppWindow::SHOW_ACTIVE);
EXPECT_TRUE([ns_window isVisible]);
// Normal Hide/ShowWithApp.
@@ -88,7 +88,7 @@ IN_PROC_BROWSER_TEST_F(NativeAppWindowCocoaBrowserTest, HideShowWithApp) {
EXPECT_FALSE([ns_window isVisible]);
// Return to shown state.
- app_window->Show(apps::AppWindow::SHOW_ACTIVE);
+ app_window->Show(extensions::AppWindow::SHOW_ACTIVE);
EXPECT_TRUE([ns_window isVisible]);
// HideWithApp the other window.
@@ -99,7 +99,7 @@ IN_PROC_BROWSER_TEST_F(NativeAppWindowCocoaBrowserTest, HideShowWithApp) {
// HideWithApp, Show shows all windows for this app.
native_window->HideWithApp();
EXPECT_FALSE([ns_window isVisible]);
- app_window->Show(apps::AppWindow::SHOW_ACTIVE);
+ app_window->Show(extensions::AppWindow::SHOW_ACTIVE);
EXPECT_TRUE([ns_window isVisible]);
EXPECT_TRUE([other_ns_window isVisible]);
@@ -170,12 +170,12 @@ IN_PROC_BROWSER_TEST_F(NativeAppWindowCocoaBrowserTest, Fullscreen) {
return;
SetUpAppWithWindows(1);
- apps::AppWindow* app_window = GetFirstAppWindow();
+ extensions::AppWindow* app_window = GetFirstAppWindow();
extensions::NativeAppWindow* window = app_window->GetBaseWindow();
NSWindow* ns_window = app_window->GetNativeWindow();
base::scoped_nsobject<ScopedNotificationWatcher> watcher;
- EXPECT_EQ(apps::AppWindow::FULLSCREEN_TYPE_NONE,
+ EXPECT_EQ(extensions::AppWindow::FULLSCREEN_TYPE_NONE,
app_window->fullscreen_types_for_test());
EXPECT_FALSE(window->IsFullscreen());
EXPECT_FALSE([ns_window styleMask] & NSFullScreenWindowMask);
@@ -186,7 +186,7 @@ IN_PROC_BROWSER_TEST_F(NativeAppWindowCocoaBrowserTest, Fullscreen) {
[ns_window toggleFullScreen:nil];
[watcher waitForNotification];
EXPECT_TRUE(app_window->fullscreen_types_for_test() &
- apps::AppWindow::FULLSCREEN_TYPE_OS);
+ extensions::AppWindow::FULLSCREEN_TYPE_OS);
EXPECT_TRUE(window->IsFullscreen());
EXPECT_TRUE([ns_window styleMask] & NSFullScreenWindowMask);
@@ -196,7 +196,7 @@ IN_PROC_BROWSER_TEST_F(NativeAppWindowCocoaBrowserTest, Fullscreen) {
app_window->Restore();
EXPECT_FALSE(window->IsFullscreenOrPending());
[watcher waitForNotification];
- EXPECT_EQ(apps::AppWindow::FULLSCREEN_TYPE_NONE,
+ EXPECT_EQ(extensions::AppWindow::FULLSCREEN_TYPE_NONE,
app_window->fullscreen_types_for_test());
EXPECT_FALSE(window->IsFullscreen());
EXPECT_FALSE([ns_window styleMask] & NSFullScreenWindowMask);
@@ -208,7 +208,7 @@ IN_PROC_BROWSER_TEST_F(NativeAppWindowCocoaBrowserTest, Fullscreen) {
EXPECT_TRUE(window->IsFullscreenOrPending());
[watcher waitForNotification];
EXPECT_TRUE(app_window->fullscreen_types_for_test() &
- apps::AppWindow::FULLSCREEN_TYPE_WINDOW_API);
+ extensions::AppWindow::FULLSCREEN_TYPE_WINDOW_API);
EXPECT_TRUE(window->IsFullscreen());
EXPECT_TRUE([ns_window styleMask] & NSFullScreenWindowMask);
@@ -217,7 +217,7 @@ IN_PROC_BROWSER_TEST_F(NativeAppWindowCocoaBrowserTest, Fullscreen) {
andObject:ns_window]);
[ns_window toggleFullScreen:nil];
[watcher waitForNotification];
- EXPECT_EQ(apps::AppWindow::FULLSCREEN_TYPE_NONE,
+ EXPECT_EQ(extensions::AppWindow::FULLSCREEN_TYPE_NONE,
app_window->fullscreen_types_for_test());
EXPECT_FALSE(window->IsFullscreen());
EXPECT_FALSE([ns_window styleMask] & NSFullScreenWindowMask);
diff --git a/chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac.cc b/chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac.cc
index 6869b9b..5f8b645 100644
--- a/chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac.cc
+++ b/chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac.cc
@@ -4,8 +4,6 @@
#include "chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac.h"
-#include "apps/app_window.h"
-#include "apps/app_window_registry.h"
#include "base/command_line.h"
#include "base/i18n/number_formatting.h"
#include "base/prefs/pref_registry_simple.h"
@@ -22,6 +20,8 @@
#include "chrome/grit/chromium_strings.h"
#include "chrome/grit/generated_resources.h"
#include "chrome/grit/google_chrome_strings.h"
+#include "extensions/browser/app_window/app_window.h"
+#include "extensions/browser/app_window/app_window_registry.h"
#include "extensions/browser/app_window/native_app_window.h"
#include "extensions/common/extension.h"
#include "grit/chrome_unscaled_resources.h"
@@ -86,7 +86,7 @@ void QuitWithAppsController::Click() {
void QuitWithAppsController::ButtonClick(int button_index) {
g_browser_process->notification_ui_manager()->CancelById(id());
if (button_index == kQuitAllAppsButtonIndex) {
- apps::AppWindowRegistry::CloseAllAppWindows();
+ extensions::AppWindowRegistry::CloseAllAppWindows();
} else if (button_index == kDontShowAgainButtonIndex) {
g_browser_process->local_state()->SetBoolean(
prefs::kNotifyWhenAppsKeepChromeAlive, false);
@@ -113,7 +113,7 @@ bool QuitWithAppsController::ShouldQuit() {
// Quit immediately if there are no windows or the confirmation has been
// suppressed.
- if (!apps::AppWindowRegistry::IsAppWindowRegisteredInAnyProfile(0))
+ if (!extensions::AppWindowRegistry::IsAppWindowRegisteredInAnyProfile(0))
return true;
// If there are browser windows, and this notification has been suppressed for
diff --git a/chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac_interactive_uitest.cc b/chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac_interactive_uitest.cc
index 03ff030..74a952b 100644
--- a/chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac_interactive_uitest.cc
+++ b/chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac_interactive_uitest.cc
@@ -4,7 +4,6 @@
#include "chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac.h"
-#include "apps/app_window_registry.h"
#include "base/command_line.h"
#include "base/run_loop.h"
#include "chrome/browser/apps/app_browsertest_util.h"
@@ -21,11 +20,13 @@
#include "chrome/common/chrome_switches.h"
#include "content/public/browser/notification_service.h"
#include "content/public/test/test_utils.h"
+#include "extensions/browser/app_window/app_window_registry.h"
#include "extensions/browser/app_window/native_app_window.h"
#include "extensions/common/extension.h"
#include "ui/message_center/message_center.h"
-typedef apps::AppWindowRegistry::AppWindowList AppWindowList;
+using extensions::AppWindowRegistry;
+typedef AppWindowRegistry::AppWindowList AppWindowList;
namespace {
@@ -70,11 +71,11 @@ IN_PROC_BROWSER_TEST_F(QuitWithAppsControllerInteractiveTest, QuitBehavior) {
// One browser and one app window at this point.
EXPECT_FALSE(chrome::BrowserIterator().done());
- EXPECT_TRUE(apps::AppWindowRegistry::IsAppWindowRegisteredInAnyProfile(0));
+ EXPECT_TRUE(AppWindowRegistry::IsAppWindowRegisteredInAnyProfile(0));
// On the first quit, show notification.
EXPECT_FALSE(controller->ShouldQuit());
- EXPECT_TRUE(apps::AppWindowRegistry::IsAppWindowRegisteredInAnyProfile(0));
+ EXPECT_TRUE(AppWindowRegistry::IsAppWindowRegisteredInAnyProfile(0));
notification = g_browser_process->notification_ui_manager()->FindById(
QuitWithAppsController::kQuitWithAppsNotificationID);
ASSERT_TRUE(notification);
@@ -83,25 +84,25 @@ IN_PROC_BROWSER_TEST_F(QuitWithAppsControllerInteractiveTest, QuitBehavior) {
notification->delegate()->Click();
message_center->RemoveAllNotifications(false);
EXPECT_FALSE(controller->ShouldQuit());
- EXPECT_TRUE(apps::AppWindowRegistry::IsAppWindowRegisteredInAnyProfile(0));
+ EXPECT_TRUE(AppWindowRegistry::IsAppWindowRegisteredInAnyProfile(0));
notification = g_browser_process->notification_ui_manager()->FindById(
QuitWithAppsController::kQuitWithAppsNotificationID);
ASSERT_TRUE(notification);
EXPECT_FALSE(chrome::BrowserIterator().done());
- EXPECT_TRUE(apps::AppWindowRegistry::IsAppWindowRegisteredInAnyProfile(0));
+ EXPECT_TRUE(AppWindowRegistry::IsAppWindowRegisteredInAnyProfile(0));
// If notification is closed by user, don't show it next time.
notification->delegate()->Close(true);
message_center->RemoveAllNotifications(false);
EXPECT_FALSE(controller->ShouldQuit());
- EXPECT_TRUE(apps::AppWindowRegistry::IsAppWindowRegisteredInAnyProfile(0));
+ EXPECT_TRUE(AppWindowRegistry::IsAppWindowRegisteredInAnyProfile(0));
notification = g_browser_process->notification_ui_manager()->FindById(
QuitWithAppsController::kQuitWithAppsNotificationID);
EXPECT_EQ(NULL, notification);
EXPECT_FALSE(chrome::BrowserIterator().done());
- EXPECT_TRUE(apps::AppWindowRegistry::IsAppWindowRegisteredInAnyProfile(0));
+ EXPECT_TRUE(AppWindowRegistry::IsAppWindowRegisteredInAnyProfile(0));
// Quitting should not quit but close all browsers
content::WindowedNotificationObserver observer(
@@ -111,7 +112,7 @@ IN_PROC_BROWSER_TEST_F(QuitWithAppsControllerInteractiveTest, QuitBehavior) {
observer.Wait();
EXPECT_TRUE(chrome::BrowserIterator().done());
- EXPECT_TRUE(apps::AppWindowRegistry::IsAppWindowRegisteredInAnyProfile(0));
+ EXPECT_TRUE(AppWindowRegistry::IsAppWindowRegisteredInAnyProfile(0));
// Trying to quit while there are no browsers always shows notification.
EXPECT_FALSE(controller->ShouldQuit());
@@ -126,6 +127,6 @@ IN_PROC_BROWSER_TEST_F(QuitWithAppsControllerInteractiveTest, QuitBehavior) {
content::NotificationService::AllSources());
notification->delegate()->ButtonClick(0);
message_center->RemoveAllNotifications(false);
- EXPECT_FALSE(apps::AppWindowRegistry::IsAppWindowRegisteredInAnyProfile(0));
+ EXPECT_FALSE(AppWindowRegistry::IsAppWindowRegisteredInAnyProfile(0));
quit_observer.Wait();
}
diff --git a/chrome/browser/ui/views/app_list/win/app_list_controller_delegate_win.cc b/chrome/browser/ui/views/app_list/win/app_list_controller_delegate_win.cc
index 4b21517..743c4d1 100644
--- a/chrome/browser/ui/views/app_list/win/app_list_controller_delegate_win.cc
+++ b/chrome/browser/ui/views/app_list/win/app_list_controller_delegate_win.cc
@@ -4,13 +4,13 @@
#include "chrome/browser/ui/views/app_list/win/app_list_controller_delegate_win.h"
-#include "apps/app_window.h"
-#include "apps/app_window_registry.h"
#include "chrome/browser/metro_utils/metro_chrome_win.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/app_list/app_list_icon_win.h"
#include "chrome/browser/ui/extensions/application_launch.h"
#include "chrome/browser/ui/host_desktop.h"
+#include "extensions/browser/app_window/app_window.h"
+#include "extensions/browser/app_window/app_window_registry.h"
#include "ui/base/resource/resource_bundle.h"
AppListControllerDelegateWin::AppListControllerDelegateWin(
@@ -31,8 +31,8 @@ gfx::ImageSkia AppListControllerDelegateWin::GetWindowIcon() {
void AppListControllerDelegateWin::FillLaunchParams(AppLaunchParams* params) {
params->desktop_type = chrome::HOST_DESKTOP_TYPE_NATIVE;
- apps::AppWindow* any_existing_window =
- apps::AppWindowRegistry::Get(params->profile)
+ extensions::AppWindow* any_existing_window =
+ extensions::AppWindowRegistry::Get(params->profile)
->GetCurrentAppWindowForApp(params->extension_id);
if (any_existing_window &&
chrome::GetHostDesktopTypeForNativeWindow(
diff --git a/chrome/browser/ui/views/apps/chrome_apps_client_views.cc b/chrome/browser/ui/views/apps/chrome_apps_client_views.cc
index 4c72e4c..827fbdf 100644
--- a/chrome/browser/ui/views/apps/chrome_apps_client_views.cc
+++ b/chrome/browser/ui/views/apps/chrome_apps_client_views.cc
@@ -8,8 +8,8 @@
// static
extensions::NativeAppWindow* ChromeAppsClient::CreateNativeAppWindowImpl(
- apps::AppWindow* app_window,
- const apps::AppWindow::CreateParams& params) {
+ extensions::AppWindow* app_window,
+ const extensions::AppWindow::CreateParams& params) {
ChromeNativeAppWindowViews* window = new ChromeNativeAppWindowViews;
window->Init(app_window, params);
return window;
diff --git a/chrome/browser/ui/views/apps/chrome_apps_client_views_win.cc b/chrome/browser/ui/views/apps/chrome_apps_client_views_win.cc
index 9f8c075..bddbe26 100644
--- a/chrome/browser/ui/views/apps/chrome_apps_client_views_win.cc
+++ b/chrome/browser/ui/views/apps/chrome_apps_client_views_win.cc
@@ -8,8 +8,8 @@
// static
extensions::NativeAppWindow* ChromeAppsClient::CreateNativeAppWindowImpl(
- apps::AppWindow* app_window,
- const apps::AppWindow::CreateParams& params) {
+ extensions::AppWindow* app_window,
+ const extensions::AppWindow::CreateParams& params) {
ChromeNativeAppWindowViewsWin* window = new ChromeNativeAppWindowViewsWin;
window->Init(app_window, params);
return window;
diff --git a/chrome/browser/ui/views/apps/chrome_native_app_window_views.cc b/chrome/browser/ui/views/apps/chrome_native_app_window_views.cc
index 43468ca..18765b7 100644
--- a/chrome/browser/ui/views/apps/chrome_native_app_window_views.cc
+++ b/chrome/browser/ui/views/apps/chrome_native_app_window_views.cc
@@ -51,7 +51,7 @@
#include "ui/aura/window_observer.h"
#endif
-using apps::AppWindow;
+using extensions::AppWindow;
namespace {
@@ -235,7 +235,7 @@ void ChromeNativeAppWindowViews::InitializeDefaultWindow(
SetContentSizeConstraints(create_params.GetContentMinimumSize(frame_insets),
create_params.GetContentMaximumSize(frame_insets));
if (!window_bounds.IsEmpty()) {
- typedef apps::AppWindow::BoundsSpecification BoundsSpecification;
+ typedef AppWindow::BoundsSpecification BoundsSpecification;
bool position_specified =
window_bounds.x() != BoundsSpecification::kUnspecifiedPosition &&
window_bounds.y() != BoundsSpecification::kUnspecifiedPosition;
diff --git a/chrome/browser/ui/views/apps/chrome_native_app_window_views.h b/chrome/browser/ui/views/apps/chrome_native_app_window_views.h
index 8a6ef2e..f110755 100644
--- a/chrome/browser/ui/views/apps/chrome_native_app_window_views.h
+++ b/chrome/browser/ui/views/apps/chrome_native_app_window_views.h
@@ -36,9 +36,9 @@ class ChromeNativeAppWindowViews : public apps::NativeAppWindowViews,
views::Widget* widget);
virtual void InitializeDefaultWindow(
- const apps::AppWindow::CreateParams& create_params);
+ const extensions::AppWindow::CreateParams& create_params);
virtual void InitializePanelWindow(
- const apps::AppWindow::CreateParams& create_params);
+ const extensions::AppWindow::CreateParams& create_params);
virtual views::NonClientFrameView* CreateStandardDesktopAppFrame();
private:
@@ -80,8 +80,8 @@ class ChromeNativeAppWindowViews : public apps::NativeAppWindowViews,
// NativeAppWindowViews implementation.
virtual void InitializeWindow(
- apps::AppWindow* app_window,
- const apps::AppWindow::CreateParams& create_params) OVERRIDE;
+ extensions::AppWindow* app_window,
+ const extensions::AppWindow::CreateParams& create_params) OVERRIDE;
// True if the window is fullscreen or fullscreen is pending.
bool is_fullscreen_;
diff --git a/chrome/browser/ui/views/apps/chrome_native_app_window_views_win.cc b/chrome/browser/ui/views/apps/chrome_native_app_window_views_win.cc
index 6da554d..cdde434 100644
--- a/chrome/browser/ui/views/apps/chrome_native_app_window_views_win.cc
+++ b/chrome/browser/ui/views/apps/chrome_native_app_window_views_win.cc
@@ -4,8 +4,6 @@
#include "chrome/browser/ui/views/apps/chrome_native_app_window_views_win.h"
-#include "apps/app_window.h"
-#include "apps/app_window_registry.h"
#include "apps/ui/views/app_window_frame_view.h"
#include "ash/shell.h"
#include "base/command_line.h"
@@ -27,6 +25,8 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/grit/generated_resources.h"
#include "content/public/browser/browser_thread.h"
+#include "extensions/browser/app_window/app_window.h"
+#include "extensions/browser/app_window/app_window_registry.h"
#include "extensions/browser/extension_util.h"
#include "extensions/common/extension.h"
#include "ui/aura/remote_window_tree_host_win.h"
@@ -80,8 +80,8 @@ void ChromeNativeAppWindowViewsWin::OnBeforeWidgetInit(
std::string extension_id = app_window()->extension_id();
// If an app has any existing windows, ensure new ones are created on the
// same desktop.
- apps::AppWindow* any_existing_window =
- apps::AppWindowRegistry::Get(browser_context)
+ extensions::AppWindow* any_existing_window =
+ extensions::AppWindowRegistry::Get(browser_context)
->GetCurrentAppWindowForApp(extension_id);
chrome::HostDesktopType desktop_type;
if (any_existing_window) {
@@ -105,7 +105,7 @@ void ChromeNativeAppWindowViewsWin::OnBeforeWidgetInit(
}
void ChromeNativeAppWindowViewsWin::InitializeDefaultWindow(
- const apps::AppWindow::CreateParams& create_params) {
+ const extensions::AppWindow::CreateParams& create_params) {
ChromeNativeAppWindowViews::InitializeDefaultWindow(create_params);
const extensions::Extension* extension = app_window()->GetExtension();
diff --git a/chrome/browser/ui/views/apps/chrome_native_app_window_views_win.h b/chrome/browser/ui/views/apps/chrome_native_app_window_views_win.h
index cae27b4..ea89916 100644
--- a/chrome/browser/ui/views/apps/chrome_native_app_window_views_win.h
+++ b/chrome/browser/ui/views/apps/chrome_native_app_window_views_win.h
@@ -37,7 +37,7 @@ class ChromeNativeAppWindowViewsWin : public ChromeNativeAppWindowViews {
virtual void OnBeforeWidgetInit(views::Widget::InitParams* init_params,
views::Widget* widget) OVERRIDE;
virtual void InitializeDefaultWindow(
- const apps::AppWindow::CreateParams& create_params) OVERRIDE;
+ const extensions::AppWindow::CreateParams& create_params) OVERRIDE;
virtual views::NonClientFrameView* CreateStandardDesktopAppFrame() OVERRIDE;
// Overridden from ui::BaseWindow:
diff --git a/chrome/browser/ui/views/select_file_dialog_extension.cc b/chrome/browser/ui/views/select_file_dialog_extension.cc
index bde26c0..f61fa37 100644
--- a/chrome/browser/ui/views/select_file_dialog_extension.cc
+++ b/chrome/browser/ui/views/select_file_dialog_extension.cc
@@ -4,8 +4,6 @@
#include "chrome/browser/ui/views/select_file_dialog_extension.h"
-#include "apps/app_window.h"
-#include "apps/app_window_registry.h"
#include "base/bind.h"
#include "base/callback.h"
#include "base/logging.h"
@@ -33,13 +31,15 @@
#include "chrome/browser/ui/views/extensions/extension_dialog.h"
#include "chrome/common/pref_names.h"
#include "content/public/browser/browser_thread.h"
+#include "extensions/browser/app_window/app_window.h"
+#include "extensions/browser/app_window/app_window_registry.h"
#include "extensions/browser/app_window/native_app_window.h"
#include "extensions/browser/extension_system.h"
#include "ui/base/base_window.h"
#include "ui/shell_dialogs/selected_file_info.h"
#include "ui/views/widget/widget.h"
-using apps::AppWindow;
+using extensions::AppWindow;
using content::BrowserThread;
namespace {
@@ -116,7 +116,7 @@ void FindRuntimeContext(
// If an owner_window was supplied but we couldn't find a browser, this
// could be for a app window.
app_window =
- apps::AppWindowRegistry::GetAppWindowForNativeWindowAnyProfile(
+ extensions::AppWindowRegistry::GetAppWindowForNativeWindowAnyProfile(
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 87f8a3f..334420a 100644
--- a/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
+++ b/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
@@ -5,8 +5,6 @@
#include "chrome/browser/ui/webui/extensions/extension_settings_handler.h"
#include "apps/app_load_service.h"
-#include "apps/app_window.h"
-#include "apps/app_window_registry.h"
#include "apps/saved_files_service.h"
#include "base/auto_reset.h"
#include "base/base64.h"
@@ -73,6 +71,8 @@
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_ui.h"
#include "content/public/browser/web_ui_data_source.h"
+#include "extensions/browser/app_window/app_window.h"
+#include "extensions/browser/app_window/app_window_registry.h"
#include "extensions/browser/blacklist_state.h"
#include "extensions/browser/extension_error.h"
#include "extensions/browser/extension_host.h"
@@ -1364,15 +1364,15 @@ void ExtensionSettingsHandler::GetAppWindowPagesForExtensionProfile(
const Extension* extension,
Profile* profile,
std::vector<ExtensionPage>* result) {
- apps::AppWindowRegistry* registry = apps::AppWindowRegistry::Get(profile);
+ AppWindowRegistry* registry = AppWindowRegistry::Get(profile);
if (!registry) return;
- const apps::AppWindowRegistry::AppWindowList windows =
+ const AppWindowRegistry::AppWindowList windows =
registry->GetAppWindowsForApp(extension->id());
bool has_generated_background_page =
BackgroundInfo::HasGeneratedBackgroundPage(extension);
- for (apps::AppWindowRegistry::const_iterator it = windows.begin();
+ for (AppWindowRegistry::const_iterator it = windows.begin();
it != windows.end();
++it) {
WebContents* web_contents = (*it)->web_contents();
diff --git a/chrome/browser/ui/webui/options/browser_options_handler.cc b/chrome/browser/ui/webui/options/browser_options_handler.cc
index ff649cd..147df7d 100644
--- a/chrome/browser/ui/webui/options/browser_options_handler.cc
+++ b/chrome/browser/ui/webui/options/browser_options_handler.cc
@@ -7,8 +7,6 @@
#include <string>
#include <vector>
-#include "apps/app_window.h"
-#include "apps/app_window_registry.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/command_line.h"
diff --git a/chrome/browser/ui/webui/options/options_handlers_helper.cc b/chrome/browser/ui/webui/options/options_handlers_helper.cc
index 2353cfe..661ab3d 100644
--- a/chrome/browser/ui/webui/options/options_handlers_helper.cc
+++ b/chrome/browser/ui/webui/options/options_handlers_helper.cc
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "apps/app_window.h"
-#include "apps/app_window_registry.h"
#include "base/bind.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/profile_manager.h"
@@ -13,6 +11,8 @@
#include "chrome/browser/ui/browser_finder.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_ui.h"
+#include "extensions/browser/app_window/app_window.h"
+#include "extensions/browser/app_window/app_window_registry.h"
namespace options {
namespace helper {
@@ -24,8 +24,8 @@ chrome::HostDesktopType GetDesktopType(content::WebUI* web_ui) {
if (browser)
return browser->host_desktop_type();
- apps::AppWindow* app_window =
- apps::AppWindowRegistry::Get(Profile::FromWebUI(web_ui))
+ extensions::AppWindow* app_window =
+ extensions::AppWindowRegistry::Get(Profile::FromWebUI(web_ui))
->GetAppWindowForRenderViewHost(web_contents->GetRenderViewHost());
if (app_window) {
return chrome::GetHostDesktopTypeForNativeWindow(
@@ -69,5 +69,3 @@ void DeleteProfileAtPath(base::FilePath file_path, content::WebUI* web_ui) {
} // namespace helper
} // namespace options
-
-
diff --git a/chrome/browser/ui/webui/options/website_settings_handler.cc b/chrome/browser/ui/webui/options/website_settings_handler.cc
index 2208435..a31bbb1 100644
--- a/chrome/browser/ui/webui/options/website_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/website_settings_handler.cc
@@ -4,7 +4,6 @@
#include "chrome/browser/ui/webui/options/website_settings_handler.h"
-#include "apps/app_window_registry.h"
#include "chrome/browser/content_settings/content_settings_utils.h"
#include "chrome/browser/content_settings/host_content_settings_map.h"
#include "chrome/browser/extensions/extension_service.h"
@@ -19,6 +18,7 @@
#include "content/public/browser/storage_partition.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_ui.h"
+#include "extensions/browser/app_window/app_window_registry.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_system.h"
#include "extensions/common/constants.h"
@@ -537,7 +537,7 @@ void WebsiteSettingsHandler::StopOrigin(const GURL& site_url) {
->enabled_extensions()
.GetHostedAppByURL(site_url);
if (extension) {
- apps::AppWindowRegistry::Get(profile)
+ extensions::AppWindowRegistry::Get(profile)
->CloseAllAppWindowsForApp(extension->id());
}
}
diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi
index 4b0064b..9018357 100644
--- a/chrome/chrome_tests.gypi
+++ b/chrome/chrome_tests.gypi
@@ -47,8 +47,8 @@
'sources': [
'../apps/app_shim/app_shim_interactive_uitest_mac.mm',
'../apps/app_shim/app_shim_quit_interactive_uitest_mac.mm',
- '../apps/app_window_interactive_uitest.cc',
'../chrome/browser/ui/webui/options/language_options_interactive_uitest.cc',
+ '../extensions/browser/app_window/app_window_interactive_uitest.cc',
'../ui/base/clipboard/clipboard_unittest.cc',
'../ui/views/controls/webview/webview_interactive_uitest.cc',
'../ui/views/corewm/desktop_capture_controller_unittest.cc',
@@ -859,7 +859,6 @@
],
'sources': [
'../apps/app_restore_service_browsertest.cc',
- '../apps/app_window_browsertest.cc',
'../apps/app_shim/app_shim_host_manager_browsertest_mac.mm',
'../apps/app_shim/test/app_shim_host_manager_test_api_mac.cc',
'../apps/app_shim/test/app_shim_host_manager_test_api_mac.h',
@@ -868,6 +867,7 @@
'../extensions/browser/api/serial/serial_apitest.cc',
'../extensions/browser/api/usb/usb_apitest.cc',
'../extensions/browser/api/usb/usb_manual_apitest.cc',
+ '../extensions/browser/app_window/app_window_browsertest.cc',
'../extensions/browser/test_extension_registry_observer.h',
'../extensions/browser/test_extension_registry_observer.cc',
'../extensions/renderer/script_context_browsertest.cc',
diff --git a/chrome/test/base/testing_browser_process.cc b/chrome/test/base/testing_browser_process.cc
index 598f693..44b0cf3 100644
--- a/chrome/test/base/testing_browser_process.cc
+++ b/chrome/test/base/testing_browser_process.cc
@@ -75,7 +75,7 @@ TestingBrowserProcess::TestingBrowserProcess()
#if defined(ENABLE_EXTENSIONS)
extensions_browser_client_.reset(
new extensions::ChromeExtensionsBrowserClient);
- apps::AppsClient::Set(ChromeAppsClient::GetInstance());
+ extensions::AppsClient::Set(ChromeAppsClient::GetInstance());
extensions::ExtensionsBrowserClient::Set(extensions_browser_client_.get());
#endif
}
diff --git a/extensions/browser/BUILD.gn b/extensions/browser/BUILD.gn
index f948e3d..b1667d2 100644
--- a/extensions/browser/BUILD.gn
+++ b/extensions/browser/BUILD.gn
@@ -14,6 +14,7 @@ source_set("browser") {
"//components/keyed_service/content",
"//components/keyed_service/core",
"//components/pref_registry",
+ "//components/sessions",
"//components/web_modal",
"//content/public/browser",
"//extensions/common",
@@ -133,8 +134,14 @@ source_set("browser") {
"app_window/app_delegate.h",
"app_window/app_web_contents_helper.cc",
"app_window/app_web_contents_helper.h",
+ "app_window/app_window.cc",
+ "app_window/app_window.h",
"app_window/app_window_geometry_cache.cc",
"app_window/app_window_geometry_cache.h",
+ "app_window/app_window_registry.cc",
+ "app_window/app_window_registry.h",
+ "app_window/apps_client.cc",
+ "app_window/apps_client.h",
"app_window/native_app_window.h",
"app_window/size_constraints.cc",
"app_window/size_constraints.h",
diff --git a/extensions/browser/DEPS b/extensions/browser/DEPS
index 79a6810..d6800f3 100644
--- a/extensions/browser/DEPS
+++ b/extensions/browser/DEPS
@@ -1,6 +1,7 @@
include_rules = [
"+components/keyed_service",
"+components/pref_registry",
+ "+components/sessions",
"+components/web_modal",
"+content/public/browser",
"+grit/extensions_strings.h",
diff --git a/apps/app_window.cc b/extensions/browser/app_window/app_window.cc
index 7fd02cd..035b4e9 100644
--- a/apps/app_window.cc
+++ b/extensions/browser/app_window/app_window.cc
@@ -2,14 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "apps/app_window.h"
+#include "extensions/browser/app_window/app_window.h"
#include <algorithm>
#include <string>
#include <vector>
-#include "apps/app_window_registry.h"
-#include "apps/ui/apps_client.h"
#include "base/command_line.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
@@ -30,6 +28,8 @@
#include "extensions/browser/app_window/app_delegate.h"
#include "extensions/browser/app_window/app_web_contents_helper.h"
#include "extensions/browser/app_window/app_window_geometry_cache.h"
+#include "extensions/browser/app_window/app_window_registry.h"
+#include "extensions/browser/app_window/apps_client.h"
#include "extensions/browser/app_window/native_app_window.h"
#include "extensions/browser/app_window/size_constraints.h"
#include "extensions/browser/extension_registry.h"
@@ -55,12 +55,10 @@
using content::BrowserContext;
using content::ConsoleMessageLevel;
using content::WebContents;
-using extensions::APIPermission;
-using extensions::NativeAppWindow;
using web_modal::WebContentsModalDialogHost;
using web_modal::WebContentsModalDialogManager;
-namespace apps {
+namespace extensions {
namespace {
@@ -70,7 +68,7 @@ const int kDefaultHeight = 384;
void SetConstraintProperty(const std::string& name,
int value,
base::DictionaryValue* bounds_properties) {
- if (value != extensions::SizeConstraints::kUnboundedSize)
+ if (value != SizeConstraints::kUnboundedSize)
bounds_properties->SetInteger(name, value);
else
bounds_properties->Set(name, base::Value::CreateNullValue());
@@ -185,7 +183,7 @@ gfx::Rect AppWindow::CreateParams::GetInitialWindowBounds(
}
// Constrain the bounds.
- extensions::SizeConstraints constraints(
+ SizeConstraints constraints(
GetCombinedWindowConstraints(
window_spec.minimum_size, content_spec.minimum_size, frame_insets),
GetCombinedWindowConstraints(
@@ -226,8 +224,8 @@ gfx::Size AppWindow::CreateParams::GetWindowMaximumSize(
// AppWindow
AppWindow::AppWindow(BrowserContext* context,
- extensions::AppDelegate* app_delegate,
- const extensions::Extension* extension)
+ AppDelegate* app_delegate,
+ const Extension* extension)
: browser_context_(context),
extension_id_(extension->id()),
window_type_(WINDOW_TYPE_DEFAULT),
@@ -241,8 +239,7 @@ AppWindow::AppWindow(BrowserContext* context,
is_hidden_(false),
cached_always_on_top_(false),
requested_alpha_enabled_(false) {
- extensions::ExtensionsBrowserClient* client =
- extensions::ExtensionsBrowserClient::Get();
+ ExtensionsBrowserClient* client = ExtensionsBrowserClient::Get();
CHECK(!client->IsGuestSession(context) || context->IsOffTheRecord())
<< "Only off the record window may be opened in the guest mode.";
}
@@ -255,7 +252,7 @@ void AppWindow::Init(const GURL& url,
app_window_contents_->Initialize(browser_context(), url);
WebContents* web_contents = app_window_contents_->GetWebContents();
if (CommandLine::ForCurrentProcess()->HasSwitch(
- extensions::switches::kEnableAppsShowOnFirstPaint)) {
+ switches::kEnableAppsShowOnFirstPaint)) {
content::WebContentsObserver::Observe(web_contents);
}
app_delegate_->InitWebContents(web_contents);
@@ -265,7 +262,7 @@ void AppWindow::Init(const GURL& url,
web_contents->SetDelegate(this);
WebContentsModalDialogManager::FromWebContents(web_contents)
->SetDelegate(this);
- extensions::SetViewType(web_contents, extensions::VIEW_TYPE_APP_WINDOW);
+ SetViewType(web_contents, VIEW_TYPE_APP_WINDOW);
// Initialize the window
CreateParams new_params = LoadDefaults(params);
@@ -283,7 +280,7 @@ void AppWindow::Init(const GURL& url,
native_app_window_.reset(
apps_client->CreateNativeAppWindow(this, new_params));
- helper_.reset(new extensions::AppWebContentsHelper(
+ helper_.reset(new AppWebContentsHelper(
browser_context_, extension_id_, web_contents, app_delegate_.get()));
popup_manager_.reset(
@@ -318,16 +315,15 @@ void AppWindow::Init(const GURL& url,
// about it in case it has any setup to do to make the renderer appear
// properly. In particular, on Windows, the view's clickthrough region needs
// to be set.
- extensions::ExtensionsBrowserClient* client =
- extensions::ExtensionsBrowserClient::Get();
+ ExtensionsBrowserClient* client = ExtensionsBrowserClient::Get();
registrar_.Add(this,
- extensions::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED,
+ NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED,
content::Source<content::BrowserContext>(
client->GetOriginalContext(browser_context_)));
// Update the app menu if an ephemeral app becomes installed.
registrar_.Add(
this,
- extensions::NOTIFICATION_EXTENSION_WILL_BE_INSTALLED_DEPRECATED,
+ NOTIFICATION_EXTENSION_WILL_BE_INSTALLED_DEPRECATED,
content::Source<content::BrowserContext>(
client->GetOriginalContext(browser_context_)));
@@ -391,7 +387,7 @@ bool AppWindow::PreHandleKeyboardEvent(
content::WebContents* source,
const content::NativeWebKeyboardEvent& event,
bool* is_keyboard_shortcut) {
- const extensions::Extension* extension = GetExtension();
+ const Extension* extension = GetExtension();
if (!extension)
return false;
@@ -438,7 +434,7 @@ void AppWindow::RequestToLockMouse(WebContents* web_contents,
bool AppWindow::PreHandleGestureEvent(WebContents* source,
const blink::WebGestureEvent& event) {
- return extensions::AppWebContentsHelper::ShouldSuppressGestureEvent(event);
+ return AppWebContentsHelper::ShouldSuppressGestureEvent(event);
}
void AppWindow::DidFirstVisuallyNonEmptyPaint() {
@@ -484,8 +480,8 @@ content::WebContents* AppWindow::web_contents() const {
return app_window_contents_->GetWebContents();
}
-const extensions::Extension* AppWindow::GetExtension() const {
- return extensions::ExtensionRegistry::Get(browser_context_)
+const Extension* AppWindow::GetExtension() const {
+ return ExtensionRegistry::Get(browser_context_)
->enabled_extensions()
.GetByID(extension_id_);
}
@@ -503,7 +499,7 @@ gfx::Rect AppWindow::GetClientBounds() const {
}
base::string16 AppWindow::GetTitle() const {
- const extensions::Extension* extension = GetExtension();
+ const Extension* extension = GetExtension();
if (!extension)
return base::string16();
@@ -568,7 +564,7 @@ void AppWindow::UpdateShape(scoped_ptr<SkRegion> region) {
}
void AppWindow::UpdateDraggableRegions(
- const std::vector<extensions::DraggableRegion>& regions) {
+ const std::vector<DraggableRegion>& regions) {
native_app_window_->UpdateDraggableRegions(regions);
}
@@ -590,9 +586,9 @@ void AppWindow::SetFullscreen(FullscreenType type, bool enable) {
// gesture. http://crbug.com/174178
if (type != FULLSCREEN_TYPE_FORCED) {
PrefService* prefs =
- extensions::ExtensionsBrowserClient::Get()->GetPrefServiceForContext(
+ ExtensionsBrowserClient::Get()->GetPrefServiceForContext(
browser_context());
- if (!prefs->GetBoolean(extensions::pref_names::kAppFullscreenAllowed))
+ if (!prefs->GetBoolean(pref_names::kAppFullscreenAllowed))
return;
}
#endif
@@ -642,7 +638,7 @@ void AppWindow::ForcedFullscreen() {
void AppWindow::SetContentSizeConstraints(const gfx::Size& min_size,
const gfx::Size& max_size) {
- extensions::SizeConstraints constraints(min_size, max_size);
+ SizeConstraints constraints(min_size, max_size);
native_app_window_->SetContentSizeConstraints(constraints.GetMinimumSize(),
constraints.GetMaximumSize());
@@ -660,7 +656,7 @@ void AppWindow::Show(ShowType show_type) {
is_hidden_ = false;
if (CommandLine::ForCurrentProcess()->HasSwitch(
- extensions::switches::kEnableAppsShowOnFirstPaint)) {
+ switches::kEnableAppsShowOnFirstPaint)) {
show_on_first_paint_ = true;
if (!first_paint_complete_) {
@@ -751,9 +747,9 @@ void AppWindow::GetSerializedState(base::DictionaryValue* properties) const {
gfx::Insets frame_insets = native_app_window_->GetFrameInsets();
gfx::Rect frame_bounds = native_app_window_->GetBounds();
- gfx::Size frame_min_size = extensions::SizeConstraints::AddFrameToConstraints(
+ gfx::Size frame_min_size = SizeConstraints::AddFrameToConstraints(
content_min_size, frame_insets);
- gfx::Size frame_max_size = extensions::SizeConstraints::AddFrameToConstraints(
+ gfx::Size frame_max_size = SizeConstraints::AddFrameToConstraints(
content_max_size, frame_insets);
SetBoundsProperties(frame_bounds,
frame_min_size,
@@ -798,7 +794,7 @@ void AppWindow::DidDownloadFavicon(
UpdateBadgeIcon(gfx::Image::CreateFrom1xBitmap(largest));
}
-void AppWindow::OnExtensionIconImageChanged(extensions::IconImage* image) {
+void AppWindow::OnExtensionIconImageChanged(IconImage* image) {
DCHECK_EQ(app_icon_image_.get(), image);
UpdateAppIcon(gfx::Image(app_icon_image_->image_skia()));
@@ -808,17 +804,16 @@ void AppWindow::UpdateExtensionAppIcon() {
// Avoid using any previous app icons were being downloaded.
image_loader_ptr_factory_.InvalidateWeakPtrs();
- const extensions::Extension* extension = GetExtension();
+ const Extension* extension = GetExtension();
if (!extension)
return;
- app_icon_image_.reset(
- new extensions::IconImage(browser_context(),
- extension,
- extensions::IconsInfo::GetIcons(extension),
- app_delegate_->PreferredIconSize(),
- app_delegate_->GetAppDefaultIcon(),
- this));
+ app_icon_image_.reset(new IconImage(browser_context(),
+ extension,
+ IconsInfo::GetIcons(extension),
+ app_delegate_->PreferredIconSize(),
+ app_delegate_->GetAppDefaultIcon(),
+ this));
// Triggers actual image loading with 1x resources. The 2x resource will
// be handled by IconImage class when requested.
@@ -875,7 +870,7 @@ void AppWindow::SendOnWindowShownIfShown() {
if (!can_send_events_ || !has_been_shown_)
return;
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kTestType)) {
+ if (CommandLine::ForCurrentProcess()->HasSwitch(::switches::kTestType)) {
app_window_contents_->DispatchWindowShownForTests();
}
}
@@ -922,7 +917,7 @@ void AppWindow::NavigationStateChanged(const content::WebContents* source,
void AppWindow::ToggleFullscreenModeForTab(content::WebContents* source,
bool enter_fullscreen) {
- const extensions::Extension* extension = GetExtension();
+ const Extension* extension = GetExtension();
if (!extension)
return;
@@ -943,18 +938,16 @@ void AppWindow::Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
switch (type) {
- case extensions::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED: {
- const extensions::Extension* unloaded_extension =
- content::Details<extensions::UnloadedExtensionInfo>(details)
- ->extension;
+ case NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED: {
+ const Extension* unloaded_extension =
+ content::Details<UnloadedExtensionInfo>(details)->extension;
if (extension_id_ == unloaded_extension->id())
native_app_window_->Close();
break;
}
- case extensions::NOTIFICATION_EXTENSION_WILL_BE_INSTALLED_DEPRECATED: {
- const extensions::Extension* installed_extension =
- content::Details<const extensions::InstalledExtensionInfo>(details)
- ->extension;
+ case NOTIFICATION_EXTENSION_WILL_BE_INSTALLED_DEPRECATED: {
+ const Extension* installed_extension =
+ content::Details<const InstalledExtensionInfo>(details)->extension;
DCHECK(installed_extension);
if (installed_extension->id() == extension_id())
native_app_window_->UpdateShelfMenu();
@@ -984,8 +977,8 @@ void AppWindow::SaveWindowPosition() {
if (!native_app_window_)
return;
- extensions::AppWindowGeometryCache* cache =
- extensions::AppWindowGeometryCache::Get(browser_context());
+ AppWindowGeometryCache* cache =
+ AppWindowGeometryCache::Get(browser_context());
gfx::Rect bounds = native_app_window_->GetRestoredBounds();
gfx::Rect screen_bounds =
@@ -1042,8 +1035,8 @@ AppWindow::CreateParams AppWindow::LoadDefaults(CreateParams params)
// Load cached state if it exists.
if (!params.window_key.empty()) {
- extensions::AppWindowGeometryCache* cache =
- extensions::AppWindowGeometryCache::Get(browser_context());
+ AppWindowGeometryCache* cache =
+ AppWindowGeometryCache::Get(browser_context());
gfx::Rect cached_bounds;
gfx::Rect cached_screen_bounds;
@@ -1058,9 +1051,8 @@ AppWindow::CreateParams AppWindow::LoadDefaults(CreateParams params)
gfx::Screen* screen = gfx::Screen::GetNativeScreen();
gfx::Display display = screen->GetDisplayMatching(cached_bounds);
gfx::Rect current_screen_bounds = display.work_area();
- extensions::SizeConstraints constraints(
- params.GetWindowMinimumSize(gfx::Insets()),
- params.GetWindowMaximumSize(gfx::Insets()));
+ SizeConstraints constraints(params.GetWindowMinimumSize(gfx::Insets()),
+ params.GetWindowMaximumSize(gfx::Insets()));
AdjustBoundsToBeVisibleOnScreen(cached_bounds,
cached_screen_bounds,
current_screen_bounds,
@@ -1079,13 +1071,12 @@ AppWindow::CreateParams AppWindow::LoadDefaults(CreateParams params)
// static
SkRegion* AppWindow::RawDraggableRegionsToSkRegion(
- const std::vector<extensions::DraggableRegion>& regions) {
+ const std::vector<DraggableRegion>& regions) {
SkRegion* sk_region = new SkRegion;
- for (std::vector<extensions::DraggableRegion>::const_iterator iter =
- regions.begin();
+ for (std::vector<DraggableRegion>::const_iterator iter = regions.begin();
iter != regions.end();
++iter) {
- const extensions::DraggableRegion& region = *iter;
+ const DraggableRegion& region = *iter;
sk_region->op(
region.bounds.x(),
region.bounds.y(),
@@ -1096,4 +1087,4 @@ SkRegion* AppWindow::RawDraggableRegionsToSkRegion(
return sk_region;
}
-} // namespace apps
+} // namespace extensions
diff --git a/apps/app_window.h b/extensions/browser/app_window/app_window.h
index 1379922..f3b8e6e 100644
--- a/apps/app_window.h
+++ b/extensions/browser/app_window/app_window.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef APPS_APP_WINDOW_H_
-#define APPS_APP_WINDOW_H_
+#ifndef EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_H_
+#define EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_H_
#include <string>
#include <vector>
@@ -34,7 +34,12 @@ class BrowserContext;
class WebContents;
}
+namespace ui {
+class BaseWindow;
+}
+
namespace extensions {
+
class AppDelegate;
class AppWebContentsHelper;
class Extension;
@@ -43,13 +48,6 @@ class PlatformAppBrowserTest;
class WindowController;
struct DraggableRegion;
-}
-
-namespace ui {
-class BaseWindow;
-}
-
-namespace apps {
// Manages the web contents for app windows. The implementation for this
// class should create and maintain the WebContents for the window, and handle
@@ -68,8 +66,7 @@ class AppWindowContents {
virtual void LoadContents(int32 creator_process_id) = 0;
// Called when the native window changes.
- virtual void NativeWindowChanged(
- extensions::NativeAppWindow* native_app_window) = 0;
+ virtual void NativeWindowChanged(NativeAppWindow* native_app_window) = 0;
// Called when the native window closes.
virtual void NativeWindowClosed() = 0;
@@ -89,7 +86,7 @@ class AppWindow : public content::NotificationObserver,
public content::WebContentsDelegate,
public content::WebContentsObserver,
public web_modal::WebContentsModalDialogManagerDelegate,
- public extensions::IconImage::Observer {
+ public IconImage::Observer {
public:
enum WindowType {
WINDOW_TYPE_DEFAULT = 1 << 0, // Default app window.
@@ -199,15 +196,15 @@ class AppWindow : public content::NotificationObserver,
// Convert draggable regions in raw format to SkRegion format. Caller is
// responsible for deleting the returned SkRegion instance.
static SkRegion* RawDraggableRegionsToSkRegion(
- const std::vector<extensions::DraggableRegion>& regions);
+ const std::vector<DraggableRegion>& regions);
// The constructor and Init methods are public for constructing a AppWindow
// with a non-standard render interface (e.g. v1 apps using Ash Panels).
// Normally AppWindow::Create should be used.
// Takes ownership of |app_delegate| and |delegate|.
AppWindow(content::BrowserContext* context,
- extensions::AppDelegate* app_delegate,
- const extensions::Extension* extension);
+ AppDelegate* app_delegate,
+ const Extension* extension);
// Initializes the render interface, web contents, and native window.
// |app_window_contents| will become owned by AppWindow.
@@ -231,8 +228,8 @@ class AppWindow : public content::NotificationObserver,
const GURL& badge_icon_url() const { return badge_icon_url_; }
bool is_hidden() const { return is_hidden_; }
- const extensions::Extension* GetExtension() const;
- extensions::NativeAppWindow* GetBaseWindow();
+ const Extension* GetExtension() const;
+ NativeAppWindow* GetBaseWindow();
gfx::NativeWindow GetNativeWindow();
// Returns the bounds that should be reported to the renderer.
@@ -266,8 +263,7 @@ class AppWindow : public content::NotificationObserver,
void UpdateShape(scoped_ptr<SkRegion> region);
// Called from the render interface to modify the draggable regions.
- void UpdateDraggableRegions(
- const std::vector<extensions::DraggableRegion>& regions);
+ void UpdateDraggableRegions(const std::vector<DraggableRegion>& regions);
// Updates the app image to |image|. Called internally from the image loader
// callback. Also called externally for v1 apps using Ash Panels.
@@ -356,7 +352,7 @@ class AppWindow : public content::NotificationObserver,
private:
// PlatformAppBrowserTest needs access to web_contents()
- friend class extensions::PlatformAppBrowserTest;
+ friend class PlatformAppBrowserTest;
// content::WebContentsDelegate implementation.
virtual void CloseContents(content::WebContents* contents) OVERRIDE;
@@ -467,9 +463,8 @@ class AppWindow : public content::NotificationObserver,
const std::vector<SkBitmap>& bitmaps,
const std::vector<gfx::Size>& original_bitmap_sizes);
- // extensions::IconImage::Observer implementation.
- virtual void OnExtensionIconImageChanged(extensions::IconImage* image)
- OVERRIDE;
+ // IconImage::Observer implementation.
+ virtual void OnExtensionIconImageChanged(IconImage* image) OVERRIDE;
// The browser context with which this window is associated. AppWindow does
// not own this object.
@@ -493,7 +488,7 @@ class AppWindow : public content::NotificationObserver,
GURL app_icon_url_;
// An object to load the app's icon as an extension resource.
- scoped_ptr<extensions::IconImage> app_icon_image_;
+ scoped_ptr<IconImage> app_icon_image_;
// Badge for icon shown in the task bar.
gfx::Image badge_icon_;
@@ -502,12 +497,12 @@ class AppWindow : public content::NotificationObserver,
GURL badge_icon_url_;
// An object to load the badge as an extension resource.
- scoped_ptr<extensions::IconImage> badge_icon_image_;
+ scoped_ptr<IconImage> badge_icon_image_;
- scoped_ptr<extensions::NativeAppWindow> native_app_window_;
+ scoped_ptr<NativeAppWindow> native_app_window_;
scoped_ptr<AppWindowContents> app_window_contents_;
- scoped_ptr<extensions::AppDelegate> app_delegate_;
- scoped_ptr<extensions::AppWebContentsHelper> helper_;
+ scoped_ptr<AppDelegate> app_delegate_;
+ scoped_ptr<AppWebContentsHelper> helper_;
// Manages popup windows (bubbles, tab-modals) visible overlapping the
// app window.
@@ -555,6 +550,6 @@ class AppWindow : public content::NotificationObserver,
DISALLOW_COPY_AND_ASSIGN(AppWindow);
};
-} // namespace apps
+} // namespace extensions
-#endif // APPS_APP_WINDOW_H_
+#endif // EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_H_
diff --git a/apps/app_window_browsertest.cc b/extensions/browser/app_window/app_window_browsertest.cc
index a132a1b..1800111 100644
--- a/apps/app_window_browsertest.cc
+++ b/extensions/browser/app_window/app_window_browsertest.cc
@@ -5,14 +5,11 @@
#include "chrome/browser/apps/app_browsertest_util.h"
#include "extensions/browser/app_window/native_app_window.h"
-using extensions::Extension;
-using extensions::NativeAppWindow;
-
-namespace apps {
+namespace extensions {
namespace {
-typedef extensions::PlatformAppBrowserTest AppWindowBrowserTest;
+typedef PlatformAppBrowserTest AppWindowBrowserTest;
// This test is disabled on Linux because of the unpredictable nature of native
// windows. We cannot assume that the window manager will insert any title bar
@@ -79,4 +76,4 @@ IN_PROC_BROWSER_TEST_F(AppWindowBrowserTest, FrameInsetsForNoFrame) {
} // namespace
-} // namespace apps
+} // namespace extensions
diff --git a/apps/app_window_interactive_uitest.cc b/extensions/browser/app_window/app_window_interactive_uitest.cc
index 665d4656..8de07ab 100644
--- a/apps/app_window_interactive_uitest.cc
+++ b/extensions/browser/app_window/app_window_interactive_uitest.cc
@@ -5,10 +5,7 @@
#include "chrome/browser/apps/app_browsertest_util.h"
#include "extensions/browser/app_window/native_app_window.h"
-using extensions::PlatformAppBrowserTest;
-using extensions::Extension;
-
-namespace apps {
+namespace extensions {
namespace {
@@ -187,4 +184,4 @@ IN_PROC_BROWSER_TEST_F(AppWindowTest, MAYBE_DisableAlwaysOnTopInFullscreen) {
CloseAppWindow(window);
}
-} // namespace apps
+} // namespace extensions
diff --git a/apps/app_window_registry.cc b/extensions/browser/app_window/app_window_registry.cc
index 0874a5e..9bc69d3 100644
--- a/apps/app_window_registry.cc
+++ b/extensions/browser/app_window/app_window_registry.cc
@@ -2,13 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "apps/app_window_registry.h"
+#include "extensions/browser/app_window/app_window_registry.h"
#include <string>
#include <vector>
-#include "apps/app_window.h"
-#include "apps/ui/apps_client.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/devtools_agent_host.h"
@@ -16,10 +14,14 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/site_instance.h"
#include "content/public/browser/web_contents.h"
+#include "extensions/browser/app_window/app_window.h"
+#include "extensions/browser/app_window/apps_client.h"
#include "extensions/browser/app_window/native_app_window.h"
#include "extensions/browser/extensions_browser_client.h"
#include "extensions/common/extension.h"
+namespace extensions {
+
namespace {
// Create a key that identifies a AppWindow in a RenderViewHost across App
@@ -28,9 +30,9 @@ namespace {
// |id|, the chrome-extension://extension-id/page.html URL will be used. If the
// RenderViewHost is not for a AppWindow, return an empty string.
std::string GetWindowKeyForRenderViewHost(
- const apps::AppWindowRegistry* registry,
+ const AppWindowRegistry* registry,
content::RenderViewHost* render_view_host) {
- apps::AppWindow* app_window =
+ AppWindow* app_window =
registry->GetAppWindowForRenderViewHost(render_view_host);
if (!app_window)
return std::string(); // Not a AppWindow.
@@ -46,8 +48,6 @@ std::string GetWindowKeyForRenderViewHost(
} // namespace
-namespace apps {
-
void AppWindowRegistry::Observer::OnAppWindowAdded(AppWindow* app_window) {
}
@@ -346,8 +346,7 @@ bool AppWindowRegistry::Factory::ServiceIsNULLWhileTesting() const {
content::BrowserContext* AppWindowRegistry::Factory::GetBrowserContextToUse(
content::BrowserContext* context) const {
- return extensions::ExtensionsBrowserClient::Get()->GetOriginalContext(
- context);
+ return ExtensionsBrowserClient::Get()->GetOriginalContext(context);
}
-} // namespace apps
+} // namespace extensions
diff --git a/apps/app_window_registry.h b/extensions/browser/app_window/app_window_registry.h
index 8320b7f..36dd80c 100644
--- a/apps/app_window_registry.h
+++ b/extensions/browser/app_window/app_window_registry.h
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef APPS_APP_WINDOW_REGISTRY_H_
-#define APPS_APP_WINDOW_REGISTRY_H_
+#ifndef EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_REGISTRY_H_
+#define EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_REGISTRY_H_
#include <list>
-#include <string>
#include <set>
+#include <string>
#include "base/callback.h"
#include "base/compiler_specific.h"
@@ -23,7 +23,7 @@ class DevToolsAgentHost;
class RenderViewHost;
}
-namespace apps {
+namespace extensions {
class AppWindow;
@@ -34,23 +34,23 @@ class AppWindowRegistry : public KeyedService {
class Observer {
public:
// Called just after a app window was added.
- virtual void OnAppWindowAdded(apps::AppWindow* app_window);
+ virtual void OnAppWindowAdded(AppWindow* app_window);
// Called when the window icon changes.
- virtual void OnAppWindowIconChanged(apps::AppWindow* app_window);
+ virtual void OnAppWindowIconChanged(AppWindow* app_window);
// Called just after a app window was removed.
- virtual void OnAppWindowRemoved(apps::AppWindow* app_window);
+ virtual void OnAppWindowRemoved(AppWindow* app_window);
// Called just after a app window was hidden. This is different from
// window visibility as a minimize does not hide a window, but does make
// it not visible.
- virtual void OnAppWindowHidden(apps::AppWindow* app_window);
+ virtual void OnAppWindowHidden(AppWindow* app_window);
// Called just after a app window was shown.
- virtual void OnAppWindowShown(apps::AppWindow* app_window);
+ virtual void OnAppWindowShown(AppWindow* app_window);
protected:
virtual ~Observer();
};
- typedef std::list<apps::AppWindow*> AppWindowList;
+ typedef std::list<AppWindow*> AppWindowList;
typedef AppWindowList::const_iterator const_iterator;
typedef std::set<std::string> InspectedWindowSet;
@@ -62,13 +62,13 @@ class AppWindowRegistry : public KeyedService {
// AppWindowRegistry::Factory::GetForBrowserContext().
static AppWindowRegistry* Get(content::BrowserContext* context);
- void AddAppWindow(apps::AppWindow* app_window);
- void AppWindowIconChanged(apps::AppWindow* app_window);
+ void AddAppWindow(AppWindow* app_window);
+ void AppWindowIconChanged(AppWindow* app_window);
// Called by |app_window| when it is activated.
- void AppWindowActivated(apps::AppWindow* app_window);
- void AppWindowHidden(apps::AppWindow* app_window);
- void AppWindowShown(apps::AppWindow* app_window);
- void RemoveAppWindow(apps::AppWindow* app_window);
+ void AppWindowActivated(AppWindow* app_window);
+ void AppWindowHidden(AppWindow* app_window);
+ void AppWindowShown(AppWindow* app_window);
+ void RemoveAppWindow(AppWindow* app_window);
void AddObserver(Observer* observer);
void RemoveObserver(Observer* observer);
@@ -81,20 +81,19 @@ class AppWindowRegistry : public KeyedService {
void CloseAllAppWindowsForApp(const std::string& app_id);
// Helper functions to find app windows with particular attributes.
- apps::AppWindow* GetAppWindowForRenderViewHost(
+ AppWindow* GetAppWindowForRenderViewHost(
content::RenderViewHost* render_view_host) const;
- apps::AppWindow* GetAppWindowForNativeWindow(gfx::NativeWindow window) const;
+ AppWindow* GetAppWindowForNativeWindow(gfx::NativeWindow window) const;
// Returns an app window for the given app, or NULL if no app windows are
// open. If there is a window for the given app that is active, that one will
// be returned, otherwise an arbitrary window will be returned.
- apps::AppWindow* GetCurrentAppWindowForApp(const std::string& app_id) const;
+ AppWindow* GetCurrentAppWindowForApp(const std::string& app_id) const;
// Returns an app window for the given app and window key, or NULL if no app
// window with the key are open. If there is a window for the given app and
// key that is active, that one will be returned, otherwise an arbitrary
// window will be returned.
- apps::AppWindow* GetAppWindowForAppAndKey(const std::string& app_id,
- const std::string& window_key)
- const;
+ AppWindow* GetAppWindowForAppAndKey(const std::string& app_id,
+ const std::string& window_key) const;
// Returns whether a AppWindow's ID was last known to have a DevToolsAgent
// attached to it, which should be restored during a reload of a corresponding
@@ -102,7 +101,7 @@ class AppWindowRegistry : public KeyedService {
bool HadDevToolsAttached(content::RenderViewHost* render_view_host) const;
// Returns the app window for |window|, looking in all browser contexts.
- static apps::AppWindow* GetAppWindowForNativeWindowAnyProfile(
+ static AppWindow* GetAppWindowForNativeWindowAnyProfile(
gfx::NativeWindow window);
// Returns true if the number of app windows registered across all browser
@@ -142,11 +141,11 @@ class AppWindowRegistry : public KeyedService {
private:
// Ensures the specified |app_window| is included in |app_windows_|.
// Otherwise adds |app_window| to the back of |app_windows_|.
- void AddAppWindowToList(apps::AppWindow* app_window);
+ void AddAppWindowToList(AppWindow* app_window);
// Bring |app_window| to the front of |app_windows_|. If it is not in the
// list, add it first.
- void BringToFront(apps::AppWindow* app_window);
+ void BringToFront(AppWindow* app_window);
content::BrowserContext* context_;
AppWindowList app_windows_;
@@ -155,6 +154,6 @@ class AppWindowRegistry : public KeyedService {
base::Callback<void(content::DevToolsAgentHost*, bool)> devtools_callback_;
};
-} // namespace apps
+} // namespace extensions
-#endif // APPS_APP_WINDOW_REGISTRY_H_
+#endif // EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_REGISTRY_H_
diff --git a/apps/ui/apps_client.cc b/extensions/browser/app_window/apps_client.cc
index d62e55d..e520a2e 100644
--- a/apps/ui/apps_client.cc
+++ b/extensions/browser/app_window/apps_client.cc
@@ -2,11 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "apps/ui/apps_client.h"
+#include "extensions/browser/app_window/apps_client.h"
#include "base/basictypes.h"
-namespace apps {
+namespace extensions {
namespace {
@@ -26,4 +26,4 @@ void AppsClient::Set(AppsClient* client) {
g_client = client;
}
-} // namespace apps
+} // namespace extensions
diff --git a/apps/ui/apps_client.h b/extensions/browser/app_window/apps_client.h
index f601e67..7743b00 100644
--- a/apps/ui/apps_client.h
+++ b/extensions/browser/app_window/apps_client.h
@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef APPS_UI_APPS_CLIENT_H_
-#define APPS_UI_APPS_CLIENT_H_
+#ifndef EXTENSIONS_BROWSER_APP_WINDOW_APPS_CLIENT_H_
+#define EXTENSIONS_BROWSER_APP_WINDOW_APPS_CLIENT_H_
#include <vector>
-#include "apps/app_window.h"
#include "base/callback_forward.h"
+#include "extensions/browser/app_window/app_window.h"
namespace content {
class BrowserContext;
@@ -16,27 +16,26 @@ class WebContents;
}
namespace extensions {
+
class Extension;
class NativeAppWindow;
-}
-
-namespace apps {
// Sets up global state for the apps system. Should be Set() once in each
// process. This should be implemented by the client of the apps system.
+// TODO(hashimoto): Move some functions to ExtensionsClient and rename this to
+// AppWindowClient.
class AppsClient {
public:
// Get all loaded browser contexts.
virtual std::vector<content::BrowserContext*> GetLoadedBrowserContexts() = 0;
- // Creates a new apps::AppWindow for the app in |extension| for |context|.
+ // Creates a new AppWindow for the app in |extension| for |context|.
// Caller takes ownership.
- virtual AppWindow* CreateAppWindow(
- content::BrowserContext* context,
- const extensions::Extension* extension) = 0;
+ virtual AppWindow* CreateAppWindow(content::BrowserContext* context,
+ const Extension* extension) = 0;
// Creates a new extensions::NativeAppWindow for |window|.
- virtual extensions::NativeAppWindow* CreateNativeAppWindow(
+ virtual NativeAppWindow* CreateNativeAppWindow(
AppWindow* window,
const AppWindow::CreateParams& params) = 0;
@@ -59,6 +58,6 @@ class AppsClient {
static void Set(AppsClient* client);
};
-} // namespace apps
+} // namespace extensions
-#endif // APPS_UI_APPS_CLIENT_H_
+#endif // EXTENSIONS_BROWSER_APP_WINDOW_APPS_CLIENT_H_
diff --git a/extensions/extensions.gyp b/extensions/extensions.gyp
index ea56e66..baf1fd8 100644
--- a/extensions/extensions.gyp
+++ b/extensions/extensions.gyp
@@ -256,6 +256,7 @@
'../components/components.gyp:keyed_service_content',
'../components/components.gyp:keyed_service_core',
'../components/components.gyp:pref_registry',
+ '../components/components.gyp:sessions',
'../components/components.gyp:usb_service',
'../components/components.gyp:web_modal',
'../content/content.gyp:content_browser',
@@ -383,8 +384,14 @@
'browser/app_window/app_delegate.h',
'browser/app_window/app_web_contents_helper.cc',
'browser/app_window/app_web_contents_helper.h',
+ 'browser/app_window/app_window.cc',
+ 'browser/app_window/app_window.h',
'browser/app_window/app_window_geometry_cache.cc',
'browser/app_window/app_window_geometry_cache.h',
+ 'browser/app_window/app_window_registry.cc',
+ 'browser/app_window/app_window_registry.h',
+ 'browser/app_window/apps_client.cc',
+ 'browser/app_window/apps_client.h',
'browser/app_window/native_app_window.h',
'browser/app_window/size_constraints.cc',
'browser/app_window/size_constraints.h',