summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoroshima <oshima@chromium.org>2014-09-18 23:35:01 -0700
committerCommit bot <commit-bot@chromium.org>2014-09-19 06:35:26 +0000
commit8304b516b8d4463493fd0055a7f2e03e2d182838 (patch)
tree5dc99b8a90c5b9b59be936219f12d063adf03f8e
parentb2454bd7f7abf05795473f41d2b06a773ae59d76 (diff)
downloadchromium_src-8304b516b8d4463493fd0055a7f2e03e2d182838.zip
chromium_src-8304b516b8d4463493fd0055a7f2e03e2d182838.tar.gz
chromium_src-8304b516b8d4463493fd0055a7f2e03e2d182838.tar.bz2
Rename AppsClient -> AppWindowClient
per the comment in apps_client.h BUG=None TBR=sky@chromium.org Review URL: https://codereview.chromium.org/583583008 Cr-Commit-Position: refs/heads/master@{#295671}
-rw-r--r--athena/athena.gyp12
-rw-r--r--athena/extensions/athena_app_window_client_base.cc (renamed from athena/extensions/athena_apps_client_base.cc)12
-rw-r--r--athena/extensions/athena_app_window_client_base.h (renamed from athena/extensions/athena_apps_client_base.h)20
-rw-r--r--athena/extensions/chrome/athena_chrome_app_window_client.cc (renamed from athena/extensions/chrome/athena_chrome_apps_client.cc)14
-rw-r--r--athena/extensions/chrome/athena_chrome_app_window_client.h (renamed from athena/extensions/chrome/athena_chrome_apps_client.h)20
-rw-r--r--athena/extensions/chrome/extensions_delegate_impl.cc10
-rw-r--r--athena/extensions/shell/athena_shell_app_window_client.cc (renamed from athena/extensions/shell/athena_shell_apps_client.cc)15
-rw-r--r--athena/extensions/shell/athena_shell_app_window_client.h (renamed from athena/extensions/shell/athena_shell_apps_client.h)18
-rw-r--r--athena/extensions/shell/extensions_delegate_impl.cc10
-rw-r--r--athena/main/athena_main.cc2
-rw-r--r--chrome/browser/browser_process_impl.cc4
-rw-r--r--chrome/browser/power/process_power_collector_unittest.cc4
-rw-r--r--chrome/browser/ui/apps/chrome_app_window_client.cc (renamed from chrome/browser/ui/apps/chrome_apps_client.cc)29
-rw-r--r--chrome/browser/ui/apps/chrome_app_window_client.h (renamed from chrome/browser/ui/apps/chrome_apps_client.h)26
-rw-r--r--chrome/browser/ui/cocoa/apps/chrome_app_window_client_cocoa.mm (renamed from chrome/browser/ui/cocoa/apps/chrome_apps_client_cocoa.mm)4
-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/chrome_browser_ui.gypi6
-rw-r--r--chrome/test/base/testing_browser_process.cc4
-rw-r--r--extensions/browser/BUILD.gn4
-rw-r--r--extensions/browser/api/app_current_window_internal/app_current_window_internal_api.cc10
-rw-r--r--extensions/browser/api/app_window/app_window_api.cc12
-rw-r--r--extensions/browser/app_window/app_window.cc10
-rw-r--r--extensions/browser/app_window/app_window_client.cc (renamed from extensions/browser/app_window/apps_client.cc)8
-rw-r--r--extensions/browser/app_window/app_window_client.h (renamed from extensions/browser/app_window/apps_client.h)25
-rw-r--r--extensions/browser/app_window/app_window_registry.cc8
-rw-r--r--extensions/extensions.gyp4
-rw-r--r--extensions/shell/app_shell.gyp4
-rw-r--r--extensions/shell/browser/shell_app_window_client.cc (renamed from extensions/shell/browser/shell_apps_client.cc)26
-rw-r--r--extensions/shell/browser/shell_app_window_client.h (renamed from extensions/shell/browser/shell_apps_client.h)20
-rw-r--r--extensions/shell/browser/shell_browser_main_parts.cc2
-rw-r--r--extensions/shell/browser/shell_browser_main_parts.h4
-rw-r--r--extensions/shell/browser/shell_desktop_controller.cc8
-rw-r--r--extensions/shell/browser/shell_desktop_controller.h4
34 files changed, 186 insertions, 181 deletions
diff --git a/athena/athena.gyp b/athena/athena.gyp
index 8034c18..946fda2 100644
--- a/athena/athena.gyp
+++ b/athena/athena.gyp
@@ -162,8 +162,8 @@
'content/web_contents_view_delegate_factory_impl.cc',
'extensions/athena_app_delegate_base.cc',
'extensions/athena_app_delegate_base.h',
- 'extensions/athena_apps_client_base.cc',
- 'extensions/athena_apps_client_base.h',
+ 'extensions/athena_app_window_client_base.cc',
+ 'extensions/athena_app_window_client_base.h',
'extensions/athena_native_app_window_views.cc',
'extensions/athena_native_app_window_views.h',
'extensions/extension_app_model_builder.cc',
@@ -185,8 +185,8 @@
'content/chrome/dialogs.cc',
'extensions/chrome/athena_chrome_app_delegate.cc',
'extensions/chrome/athena_chrome_app_delegate.h',
- 'extensions/chrome/athena_chrome_apps_client.cc',
- 'extensions/chrome/athena_chrome_apps_client.h',
+ 'extensions/chrome/athena_chrome_app_window_client.cc',
+ 'extensions/chrome/athena_chrome_app_window_client.h',
'extensions/chrome/extensions_delegate_impl.cc',
],
},
@@ -205,8 +205,8 @@
'extensions/shell/extensions_delegate_impl.cc',
'extensions/shell/athena_shell_app_delegate.cc',
'extensions/shell/athena_shell_app_delegate.h',
- 'extensions/shell/athena_shell_apps_client.cc',
- 'extensions/shell/athena_shell_apps_client.h',
+ 'extensions/shell/athena_shell_app_window_client.cc',
+ 'extensions/shell/athena_shell_app_window_client.h',
'extensions/shell/athena_apps_client_delegate.h',
],
},
diff --git a/athena/extensions/athena_apps_client_base.cc b/athena/extensions/athena_app_window_client_base.cc
index f2d1b46..00e08c9 100644
--- a/athena/extensions/athena_apps_client_base.cc
+++ b/athena/extensions/athena_app_window_client_base.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "athena/extensions/athena_apps_client_base.h"
+#include "athena/extensions/athena_app_window_client_base.h"
#include "athena/activity/public/activity_factory.h"
#include "athena/activity/public/activity_manager.h"
@@ -11,13 +11,13 @@
namespace athena {
-AthenaAppsClientBase::AthenaAppsClientBase() {
+AthenaAppWindowClientBase::AthenaAppWindowClientBase() {
}
-AthenaAppsClientBase::~AthenaAppsClientBase() {
+AthenaAppWindowClientBase::~AthenaAppWindowClientBase() {
}
-extensions::NativeAppWindow* AthenaAppsClientBase::CreateNativeAppWindow(
+extensions::NativeAppWindow* AthenaAppWindowClientBase::CreateNativeAppWindow(
extensions::AppWindow* app_window,
const extensions::AppWindow::CreateParams& params) {
AthenaNativeAppWindowViews* native_window = new AthenaNativeAppWindowViews;
@@ -28,11 +28,11 @@ extensions::NativeAppWindow* AthenaAppsClientBase::CreateNativeAppWindow(
return native_window;
}
-void AthenaAppsClientBase::IncrementKeepAliveCount() {
+void AthenaAppWindowClientBase::IncrementKeepAliveCount() {
// No need to keep track of KeepAlive count on ChromeOS.
}
-void AthenaAppsClientBase::DecrementKeepAliveCount() {
+void AthenaAppWindowClientBase::DecrementKeepAliveCount() {
// No need to keep track of KeepAlive count on ChromeOS.
}
diff --git a/athena/extensions/athena_apps_client_base.h b/athena/extensions/athena_app_window_client_base.h
index 3a8d663..808a95b 100644
--- a/athena/extensions/athena_apps_client_base.h
+++ b/athena/extensions/athena_app_window_client_base.h
@@ -2,31 +2,31 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef ATHENA_EXTENSIONS_ATHENA_APPS_CLIENT_BASE_H_
-#define ATHENA_EXTENSIONS_ATHENA_APPS_CLIENT_BASE_H_
+#ifndef ATHENA_EXTENSIONS_ATHENA_APP_WINDOW_CLIENT_BASE_H_
+#define ATHENA_EXTENSIONS_ATHENA_APP_WINDOW_CLIENT_BASE_H_
-#include "extensions/browser/app_window/apps_client.h"
#include "base/macros.h"
+#include "extensions/browser/app_window/app_window_client.h"
namespace athena {
-// Athena's base impl of AppsClient.
-class AthenaAppsClientBase : public extensions::AppsClient {
+// Athena's base impl of AppWindowClient.
+class AthenaAppWindowClientBase : public extensions::AppWindowClient {
public:
- AthenaAppsClientBase();
- virtual ~AthenaAppsClientBase();
+ AthenaAppWindowClientBase();
+ virtual ~AthenaAppWindowClientBase();
private:
- // extensions::AppsClient
+ // extensions::AppWindowClient
virtual extensions::NativeAppWindow* CreateNativeAppWindow(
extensions::AppWindow* window,
const extensions::AppWindow::CreateParams& params) OVERRIDE;
virtual void IncrementKeepAliveCount() OVERRIDE;
virtual void DecrementKeepAliveCount() OVERRIDE;
- DISALLOW_COPY_AND_ASSIGN(AthenaAppsClientBase);
+ DISALLOW_COPY_AND_ASSIGN(AthenaAppWindowClientBase);
};
} // namespace athena
-#endif // ATHENA_EXTENSIONS_ATHENA_APPS_CLIENT_BASE_H_
+#endif // ATHENA_EXTENSIONS_ATHENA_APP_WINDOW_CLIENT_BASE_H_
diff --git a/athena/extensions/chrome/athena_chrome_apps_client.cc b/athena/extensions/chrome/athena_chrome_app_window_client.cc
index 004afc9..a5a23c7 100644
--- a/athena/extensions/chrome/athena_chrome_apps_client.cc
+++ b/athena/extensions/chrome/athena_chrome_app_window_client.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "athena/extensions/chrome/athena_chrome_apps_client.h"
+#include "athena/extensions/chrome/athena_chrome_app_window_client.h"
#include "athena/extensions/chrome/athena_chrome_app_delegate.h"
#include "base/memory/singleton.h"
@@ -14,28 +14,28 @@
namespace athena {
-AthenaChromeAppsClient::AthenaChromeAppsClient() {
+AthenaChromeAppWindowClient::AthenaChromeAppWindowClient() {
}
-AthenaChromeAppsClient::~AthenaChromeAppsClient() {
+AthenaChromeAppWindowClient::~AthenaChromeAppWindowClient() {
}
std::vector<content::BrowserContext*>
-AthenaChromeAppsClient::GetLoadedBrowserContexts() {
+AthenaChromeAppWindowClient::GetLoadedBrowserContexts() {
std::vector<Profile*> profiles =
g_browser_process->profile_manager()->GetLoadedProfiles();
return std::vector<content::BrowserContext*>(profiles.begin(),
profiles.end());
}
-extensions::AppWindow* AthenaChromeAppsClient::CreateAppWindow(
+extensions::AppWindow* AthenaChromeAppWindowClient::CreateAppWindow(
content::BrowserContext* context,
const extensions::Extension* extension) {
return new extensions::AppWindow(
context, new AthenaChromeAppDelegate, extension);
}
-void AthenaChromeAppsClient::OpenDevToolsWindow(
+void AthenaChromeAppWindowClient::OpenDevToolsWindow(
content::WebContents* web_contents,
const base::Closure& callback) {
// TODO(oshima): Figure out what to do.
@@ -44,7 +44,7 @@ void AthenaChromeAppsClient::OpenDevToolsWindow(
devtools_window->SetLoadCompletedCallback(callback);
}
-bool AthenaChromeAppsClient::IsCurrentChannelOlderThanDev() {
+bool AthenaChromeAppWindowClient::IsCurrentChannelOlderThanDev() {
return extensions::GetCurrentChannel() > chrome::VersionInfo::CHANNEL_DEV;
}
diff --git a/athena/extensions/chrome/athena_chrome_apps_client.h b/athena/extensions/chrome/athena_chrome_app_window_client.h
index d064d35..4dd572b 100644
--- a/athena/extensions/chrome/athena_chrome_apps_client.h
+++ b/athena/extensions/chrome/athena_chrome_app_window_client.h
@@ -2,22 +2,22 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef ATHENA_EXTENSIONS_CHROME_ATHENA_CHROME_APPS_CLIENT_H_
-#define ATHENA_EXTENSIONS_CHROME_ATHENA_CHROME_APPS_CLIENT_H_
+#ifndef ATHENA_EXTENSIONS_CHROME_ATHENA_CHROME_APP_WINDOW_CLIENT_H_
+#define ATHENA_EXTENSIONS_CHROME_ATHENA_CHROME_APP_WINDOW_CLIENT_H_
-#include "athena/extensions/athena_apps_client_base.h"
+#include "athena/extensions/athena_app_window_client_base.h"
#include "base/macros.h"
namespace athena {
-// The implementation of AppsClient for Athena.
-class AthenaChromeAppsClient : public AthenaAppsClientBase {
+// The implementation of AppWindowClient for Athena.
+class AthenaChromeAppWindowClient : public AthenaAppWindowClientBase {
public:
- AthenaChromeAppsClient();
- virtual ~AthenaChromeAppsClient();
+ AthenaChromeAppWindowClient();
+ virtual ~AthenaChromeAppWindowClient();
private:
- // extensions::AppsClient
+ // extensions::AppWindowClient
virtual std::vector<content::BrowserContext*> GetLoadedBrowserContexts()
OVERRIDE;
virtual extensions::AppWindow* CreateAppWindow(
@@ -27,9 +27,9 @@ class AthenaChromeAppsClient : public AthenaAppsClientBase {
const base::Closure& callback) OVERRIDE;
virtual bool IsCurrentChannelOlderThanDev() OVERRIDE;
- DISALLOW_COPY_AND_ASSIGN(AthenaChromeAppsClient);
+ DISALLOW_COPY_AND_ASSIGN(AthenaChromeAppWindowClient);
};
} // namespace athena
-#endif // ATHENA_EXTENSIONS_CHROME_ATHENA_CHROME_APPS_CLIENT_H_
+#endif // ATHENA_EXTENSIONS_CHROME_ATHENA_CHROME_APP_WINDOW_CLIENT_H_
diff --git a/athena/extensions/chrome/extensions_delegate_impl.cc b/athena/extensions/chrome/extensions_delegate_impl.cc
index d6b8512..ca3646f 100644
--- a/athena/extensions/chrome/extensions_delegate_impl.cc
+++ b/athena/extensions/chrome/extensions_delegate_impl.cc
@@ -6,7 +6,7 @@
#include "athena/activity/public/activity_factory.h"
#include "athena/activity/public/activity_manager.h"
-#include "athena/extensions/chrome/athena_chrome_apps_client.h"
+#include "athena/extensions/chrome/athena_chrome_app_window_client.h"
#include "base/macros.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/extensions/extension_service.h"
@@ -29,10 +29,12 @@ class ChromeExtensionsDelegate : public ExtensionsDelegate {
explicit ChromeExtensionsDelegate(content::BrowserContext* context)
: extension_service_(
extensions::ExtensionSystem::Get(context)->extension_service()) {
- extensions::AppsClient::Set(&apps_client_);
+ extensions::AppWindowClient::Set(&app_window_client_);
}
- virtual ~ChromeExtensionsDelegate() { extensions::AppsClient::Set(NULL); }
+ virtual ~ChromeExtensionsDelegate() {
+ extensions::AppWindowClient::Set(NULL);
+ }
private:
// ExtensionsDelegate:
@@ -106,7 +108,7 @@ class ChromeExtensionsDelegate : public ExtensionsDelegate {
// Installed extensions.
extensions::ExtensionSet extensions_;
- AthenaChromeAppsClient apps_client_;
+ AthenaChromeAppWindowClient app_window_client_;
DISALLOW_COPY_AND_ASSIGN(ChromeExtensionsDelegate);
};
diff --git a/athena/extensions/shell/athena_shell_apps_client.cc b/athena/extensions/shell/athena_shell_app_window_client.cc
index cedc002..b2ac9ce 100644
--- a/athena/extensions/shell/athena_shell_apps_client.cc
+++ b/athena/extensions/shell/athena_shell_app_window_client.cc
@@ -2,41 +2,42 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "athena/extensions/shell/athena_shell_apps_client.h"
+#include "athena/extensions/shell/athena_shell_app_window_client.h"
#include "athena/extensions/shell/athena_shell_app_delegate.h"
#include "extensions/browser/app_window/app_window.h"
namespace athena {
-AthenaShellAppsClient::AthenaShellAppsClient(content::BrowserContext* context)
+AthenaShellAppWindowClient::AthenaShellAppWindowClient(
+ content::BrowserContext* context)
: context_(context) {
DCHECK(context_);
}
-AthenaShellAppsClient::~AthenaShellAppsClient() {
+AthenaShellAppWindowClient::~AthenaShellAppWindowClient() {
}
std::vector<content::BrowserContext*>
-AthenaShellAppsClient::GetLoadedBrowserContexts() {
+AthenaShellAppWindowClient::GetLoadedBrowserContexts() {
std::vector<content::BrowserContext*> contexts(1, context_);
return contexts;
}
-extensions::AppWindow* AthenaShellAppsClient::CreateAppWindow(
+extensions::AppWindow* AthenaShellAppWindowClient::CreateAppWindow(
content::BrowserContext* context,
const extensions::Extension* extension) {
return new extensions::AppWindow(
context, new AthenaShellAppDelegate, extension);
}
-void AthenaShellAppsClient::OpenDevToolsWindow(
+void AthenaShellAppWindowClient::OpenDevToolsWindow(
content::WebContents* web_contents,
const base::Closure& callback) {
// TODO(oshima): Figure out what to do.
}
-bool AthenaShellAppsClient::IsCurrentChannelOlderThanDev() {
+bool AthenaShellAppWindowClient::IsCurrentChannelOlderThanDev() {
return false;
}
diff --git a/athena/extensions/shell/athena_shell_apps_client.h b/athena/extensions/shell/athena_shell_app_window_client.h
index 56feab4..d8ff00d 100644
--- a/athena/extensions/shell/athena_shell_apps_client.h
+++ b/athena/extensions/shell/athena_shell_app_window_client.h
@@ -2,21 +2,21 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef ATHENA_EXTENSIONS_SHELL_ATHENA_SHELL_APPS_CLIENT_H_
-#define ATHENA_EXTENSIONS_SHELL_ATHENA_SHELL_APPS_CLIENT_H_
+#ifndef ATHENA_EXTENSIONS_SHELL_ATHENA_SHELL_APP_WINDOW_CLIENT_H_
+#define ATHENA_EXTENSIONS_SHELL_ATHENA_SHELL_APP_WINDOW_CLIENT_H_
-#include "athena/extensions/athena_apps_client_base.h"
+#include "athena/extensions/athena_app_window_client_base.h"
#include "base/macros.h"
namespace athena {
-class AthenaShellAppsClient : public AthenaAppsClientBase {
+class AthenaShellAppWindowClient : public AthenaAppWindowClientBase {
public:
- AthenaShellAppsClient(content::BrowserContext* context);
- virtual ~AthenaShellAppsClient();
+ AthenaShellAppWindowClient(content::BrowserContext* context);
+ virtual ~AthenaShellAppWindowClient();
private:
- // extensions::AppsClient
+ // extensions::AppWindowClient
virtual std::vector<content::BrowserContext*> GetLoadedBrowserContexts()
OVERRIDE;
virtual extensions::AppWindow* CreateAppWindow(
@@ -28,9 +28,9 @@ class AthenaShellAppsClient : public AthenaAppsClientBase {
content::BrowserContext* context_;
- DISALLOW_COPY_AND_ASSIGN(AthenaShellAppsClient);
+ DISALLOW_COPY_AND_ASSIGN(AthenaShellAppWindowClient);
};
} // namespace athena
-#endif // ATHENA_EXTENSIONS_SHELL_ATHENA_SHELL_APPS_CLIENT_H_
+#endif // ATHENA_EXTENSIONS_SHELL_ATHENA_SHELL_APP_WINDOW_CLIENT_H_
diff --git a/athena/extensions/shell/extensions_delegate_impl.cc b/athena/extensions/shell/extensions_delegate_impl.cc
index a7cbcdf..bdd27c3 100644
--- a/athena/extensions/shell/extensions_delegate_impl.cc
+++ b/athena/extensions/shell/extensions_delegate_impl.cc
@@ -4,7 +4,7 @@
#include "athena/extensions/public/extensions_delegate.h"
-#include "athena/extensions/shell/athena_shell_apps_client.h"
+#include "athena/extensions/shell/athena_shell_app_window_client.h"
#include "base/macros.h"
#include "extensions/common/extension_set.h"
#include "extensions/shell/browser/shell_extension_system.h"
@@ -18,11 +18,11 @@ class ShellExtensionsDelegate : public ExtensionsDelegate {
: context_(context),
extension_system_(static_cast<extensions::ShellExtensionSystem*>(
extensions::ExtensionSystem::Get(context))),
- apps_client_(context) {
- extensions::AppsClient::Set(&apps_client_);
+ app_window_client_(context) {
+ extensions::AppWindowClient::Set(&app_window_client_);
}
- virtual ~ShellExtensionsDelegate() { extensions::AppsClient::Set(NULL); }
+ virtual ~ShellExtensionsDelegate() { extensions::AppWindowClient::Set(NULL); }
private:
// ExtensionsDelegate:
@@ -46,7 +46,7 @@ class ShellExtensionsDelegate : public ExtensionsDelegate {
extensions::ShellExtensionSystem* extension_system_;
extensions::ExtensionSet shell_extensions_;
- AthenaShellAppsClient apps_client_;
+ AthenaShellAppWindowClient app_window_client_;
DISALLOW_COPY_AND_ASSIGN(ShellExtensionsDelegate);
};
diff --git a/athena/main/athena_main.cc b/athena/main/athena_main.cc
index 104b64b..c3079cb 100644
--- a/athena/main/athena_main.cc
+++ b/athena/main/athena_main.cc
@@ -18,7 +18,7 @@
#include "content/public/app/content_main.h"
#include "content/public/browser/browser_thread.h"
#include "extensions/browser/app_window/app_window.h"
-#include "extensions/browser/app_window/apps_client.h"
+#include "extensions/browser/app_window/app_window_client.h"
#include "extensions/shell/app/shell_main_delegate.h"
#include "extensions/shell/browser/desktop_controller.h"
#include "extensions/shell/browser/shell_app_delegate.h"
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index 36de9d9..d5cb3ad 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -60,7 +60,7 @@
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
#include "chrome/browser/shell_integration.h"
#include "chrome/browser/status_icons/status_tray.h"
-#include "chrome/browser/ui/apps/chrome_apps_client.h"
+#include "chrome/browser/ui/apps/chrome_app_window_client.h"
#include "chrome/browser/ui/browser_dialogs.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/web_resource/promo_resource_service.h"
@@ -202,7 +202,7 @@ BrowserProcessImpl::BrowserProcessImpl(
#if defined(ENABLE_EXTENSIONS)
#if !defined(USE_ATHENA)
// Athena sets its own instance during Athena's init process.
- extensions::AppsClient::Set(ChromeAppsClient::GetInstance());
+ extensions::AppWindowClient::Set(ChromeAppWindowClient::GetInstance());
#endif
extension_event_router_forwarder_ = new extensions::EventRouterForwarder;
diff --git a/chrome/browser/power/process_power_collector_unittest.cc b/chrome/browser/power/process_power_collector_unittest.cc
index f9ab5f1..307d987 100644
--- a/chrome/browser/power/process_power_collector_unittest.cc
+++ b/chrome/browser/power/process_power_collector_unittest.cc
@@ -16,9 +16,9 @@
#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_client.h"
#include "extensions/browser/app_window/app_window_contents.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"
@@ -287,7 +287,7 @@ TEST_F(BrowserProcessPowerTest, AppsRecordPowerUsage) {
&error));
EXPECT_TRUE(extension.get()) << error;
// Increment the apps count to avoid a DCHECK later.
- extensions::AppsClient::Get()->IncrementKeepAliveCount();
+ extensions::AppWindowClient::Get()->IncrementKeepAliveCount();
Profile* current_profile =
profile_manager_->CreateTestingProfile("Test user");
diff --git a/chrome/browser/ui/apps/chrome_apps_client.cc b/chrome/browser/ui/apps/chrome_app_window_client.cc
index 80ffedc..9dd1f16 100644
--- a/chrome/browser/ui/apps/chrome_apps_client.cc
+++ b/chrome/browser/ui/apps/chrome_app_window_client.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/ui/apps/chrome_apps_client.h"
+#include "chrome/browser/ui/apps/chrome_app_window_client.h"
#include "base/memory/singleton.h"
#include "chrome/browser/browser_process.h"
@@ -19,27 +19,27 @@
#include "chrome/browser/ui/apps/chrome_app_delegate.h"
#endif
-ChromeAppsClient::ChromeAppsClient() {
+ChromeAppWindowClient::ChromeAppWindowClient() {
}
-ChromeAppsClient::~ChromeAppsClient() {
+ChromeAppWindowClient::~ChromeAppWindowClient() {
}
// static
-ChromeAppsClient* ChromeAppsClient::GetInstance() {
- return Singleton<ChromeAppsClient,
- LeakySingletonTraits<ChromeAppsClient> >::get();
+ChromeAppWindowClient* ChromeAppWindowClient::GetInstance() {
+ return Singleton<ChromeAppWindowClient,
+ LeakySingletonTraits<ChromeAppWindowClient> >::get();
}
std::vector<content::BrowserContext*>
-ChromeAppsClient::GetLoadedBrowserContexts() {
+ChromeAppWindowClient::GetLoadedBrowserContexts() {
std::vector<Profile*> profiles =
g_browser_process->profile_manager()->GetLoadedProfiles();
return std::vector<content::BrowserContext*>(profiles.begin(),
profiles.end());
}
-extensions::AppWindow* ChromeAppsClient::CreateAppWindow(
+extensions::AppWindow* ChromeAppWindowClient::CreateAppWindow(
content::BrowserContext* context,
const extensions::Extension* extension) {
#if defined(OS_ANDROID)
@@ -49,7 +49,7 @@ extensions::AppWindow* ChromeAppsClient::CreateAppWindow(
#endif
}
-extensions::NativeAppWindow* ChromeAppsClient::CreateNativeAppWindow(
+extensions::NativeAppWindow* ChromeAppWindowClient::CreateNativeAppWindow(
extensions::AppWindow* window,
const extensions::AppWindow::CreateParams& params) {
#if defined(OS_ANDROID)
@@ -59,25 +59,26 @@ extensions::NativeAppWindow* ChromeAppsClient::CreateNativeAppWindow(
#endif
}
-void ChromeAppsClient::IncrementKeepAliveCount() {
+void ChromeAppWindowClient::IncrementKeepAliveCount() {
#if !defined(OS_ANDROID)
chrome::IncrementKeepAliveCount();
#endif
}
-void ChromeAppsClient::DecrementKeepAliveCount() {
+void ChromeAppWindowClient::DecrementKeepAliveCount() {
#if !defined(OS_ANDROID)
chrome::DecrementKeepAliveCount();
#endif
}
-void ChromeAppsClient::OpenDevToolsWindow(content::WebContents* web_contents,
- const base::Closure& callback) {
+void ChromeAppWindowClient::OpenDevToolsWindow(
+ content::WebContents* web_contents,
+ const base::Closure& callback) {
DevToolsWindow* devtools_window = DevToolsWindow::OpenDevToolsWindow(
web_contents, DevToolsToggleAction::ShowConsole());
devtools_window->SetLoadCompletedCallback(callback);
}
-bool ChromeAppsClient::IsCurrentChannelOlderThanDev() {
+bool ChromeAppWindowClient::IsCurrentChannelOlderThanDev() {
return extensions::GetCurrentChannel() > chrome::VersionInfo::CHANNEL_DEV;
}
diff --git a/chrome/browser/ui/apps/chrome_apps_client.h b/chrome/browser/ui/apps/chrome_app_window_client.h
index cda6301..e50bfa4 100644
--- a/chrome/browser/ui/apps/chrome_apps_client.h
+++ b/chrome/browser/ui/apps/chrome_app_window_client.h
@@ -2,29 +2,29 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_UI_APPS_CHROME_APPS_CLIENT_H_
-#define CHROME_BROWSER_UI_APPS_CHROME_APPS_CLIENT_H_
+#ifndef CHROME_BROWSER_UI_APPS_CHROME_APP_WINDOW_CLIENT_H_
+#define CHROME_BROWSER_UI_APPS_CHROME_APP_WINDOW_CLIENT_H_
#include "base/basictypes.h"
#include "base/compiler_specific.h"
-#include "extensions/browser/app_window/apps_client.h"
+#include "extensions/browser/app_window/app_window_client.h"
template <typename T>
struct DefaultSingletonTraits;
-// The implementation of AppsClient for Chrome.
-class ChromeAppsClient : public extensions::AppsClient {
+// The implementation of AppWindowClient for Chrome.
+class ChromeAppWindowClient : public extensions::AppWindowClient {
public:
- ChromeAppsClient();
- virtual ~ChromeAppsClient();
+ ChromeAppWindowClient();
+ virtual ~ChromeAppWindowClient();
- // Get the LazyInstance for ChromeAppsClient.
- static ChromeAppsClient* GetInstance();
+ // Get the LazyInstance for ChromeAppWindowClient.
+ static ChromeAppWindowClient* GetInstance();
private:
- friend struct DefaultSingletonTraits<ChromeAppsClient>;
+ friend struct DefaultSingletonTraits<ChromeAppWindowClient>;
- // extensions::AppsClient
+ // extensions::AppWindowClient
virtual std::vector<content::BrowserContext*> GetLoadedBrowserContexts()
OVERRIDE;
virtual extensions::AppWindow* CreateAppWindow(
@@ -44,7 +44,7 @@ class ChromeAppsClient : public extensions::AppsClient {
extensions::AppWindow* window,
const extensions::AppWindow::CreateParams& params);
- DISALLOW_COPY_AND_ASSIGN(ChromeAppsClient);
+ DISALLOW_COPY_AND_ASSIGN(ChromeAppWindowClient);
};
-#endif // CHROME_BROWSER_UI_APPS_CHROME_APPS_CLIENT_H_
+#endif // CHROME_BROWSER_UI_APPS_CHROME_APP_WINDOW_CLIENT_H_
diff --git a/chrome/browser/ui/cocoa/apps/chrome_apps_client_cocoa.mm b/chrome/browser/ui/cocoa/apps/chrome_app_window_client_cocoa.mm
index a9a045e..5a86433 100644
--- a/chrome/browser/ui/cocoa/apps/chrome_apps_client_cocoa.mm
+++ b/chrome/browser/ui/cocoa/apps/chrome_app_window_client_cocoa.mm
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/ui/apps/chrome_apps_client.h"
+#include "chrome/browser/ui/apps/chrome_app_window_client.h"
#import "chrome/browser/ui/cocoa/apps/native_app_window_cocoa.h"
// static
-extensions::NativeAppWindow* ChromeAppsClient::CreateNativeAppWindowImpl(
+extensions::NativeAppWindow* ChromeAppWindowClient::CreateNativeAppWindowImpl(
extensions::AppWindow* app_window,
const extensions::AppWindow::CreateParams& params) {
return new NativeAppWindowCocoa(app_window, params);
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 827fbdf..8597d25 100644
--- a/chrome/browser/ui/views/apps/chrome_apps_client_views.cc
+++ b/chrome/browser/ui/views/apps/chrome_apps_client_views.cc
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/ui/apps/chrome_apps_client.h"
+#include "chrome/browser/ui/apps/chrome_app_window_client.h"
#include "chrome/browser/ui/views/apps/chrome_native_app_window_views.h"
// static
-extensions::NativeAppWindow* ChromeAppsClient::CreateNativeAppWindowImpl(
+extensions::NativeAppWindow* ChromeAppWindowClient::CreateNativeAppWindowImpl(
extensions::AppWindow* app_window,
const extensions::AppWindow::CreateParams& params) {
ChromeNativeAppWindowViews* window = new ChromeNativeAppWindowViews;
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 bddbe26..14ab7e7 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
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/ui/apps/chrome_apps_client.h"
+#include "chrome/browser/ui/apps/chrome_app_window_client.h"
#include "chrome/browser/ui/views/apps/chrome_native_app_window_views_win.h"
// static
-extensions::NativeAppWindow* ChromeAppsClient::CreateNativeAppWindowImpl(
+extensions::NativeAppWindow* ChromeAppWindowClient::CreateNativeAppWindowImpl(
extensions::AppWindow* app_window,
const extensions::AppWindow::CreateParams& params) {
ChromeNativeAppWindowViewsWin* window = new ChromeNativeAppWindowViewsWin;
diff --git a/chrome/chrome_browser_ui.gypi b/chrome/chrome_browser_ui.gypi
index 6fc17b9..e4d8ba4 100644
--- a/chrome/chrome_browser_ui.gypi
+++ b/chrome/chrome_browser_ui.gypi
@@ -83,8 +83,8 @@
'browser/ui/apps/app_info_dialog.h',
'browser/ui/apps/apps_metro_handler_win.cc',
'browser/ui/apps/apps_metro_handler_win.h',
- 'browser/ui/apps/chrome_apps_client.cc',
- 'browser/ui/apps/chrome_apps_client.h',
+ 'browser/ui/apps/chrome_app_window_client.cc',
+ 'browser/ui/apps/chrome_app_window_client.h',
'browser/ui/apps/directory_access_confirmation_dialog.cc',
'browser/ui/apps/directory_access_confirmation_dialog.h',
'browser/ui/autofill/autofill_dialog_controller.cc',
@@ -189,7 +189,7 @@
'browser/ui/cocoa/apps/app_info_dialog_cocoa.mm',
'browser/ui/cocoa/apps/app_shim_menu_controller_mac.h',
'browser/ui/cocoa/apps/app_shim_menu_controller_mac.mm',
- 'browser/ui/cocoa/apps/chrome_apps_client_cocoa.mm',
+ 'browser/ui/cocoa/apps/chrome_app_window_client_cocoa.mm',
'browser/ui/cocoa/apps/native_app_window_cocoa.h',
'browser/ui/cocoa/apps/native_app_window_cocoa.mm',
'browser/ui/cocoa/apps/quit_with_apps_controller_mac.cc',
diff --git a/chrome/test/base/testing_browser_process.cc b/chrome/test/base/testing_browser_process.cc
index 8552f05..4734ac5 100644
--- a/chrome/test/base/testing_browser_process.cc
+++ b/chrome/test/base/testing_browser_process.cc
@@ -13,7 +13,7 @@
#include "chrome/browser/browser_process_impl.h"
#include "chrome/browser/printing/print_job_manager.h"
#include "chrome/browser/profiles/profile_manager.h"
-#include "chrome/browser/ui/apps/chrome_apps_client.h"
+#include "chrome/browser/ui/apps/chrome_app_window_client.h"
#include "chrome/test/base/testing_browser_process_platform_part.h"
#include "components/network_time/network_time_tracker.h"
#include "content/public/browser/notification_service.h"
@@ -75,7 +75,7 @@ TestingBrowserProcess::TestingBrowserProcess()
#if defined(ENABLE_EXTENSIONS)
extensions_browser_client_.reset(
new extensions::ChromeExtensionsBrowserClient);
- extensions::AppsClient::Set(ChromeAppsClient::GetInstance());
+ extensions::AppWindowClient::Set(ChromeAppWindowClient::GetInstance());
extensions::ExtensionsBrowserClient::Set(extensions_browser_client_.get());
#endif
}
diff --git a/extensions/browser/BUILD.gn b/extensions/browser/BUILD.gn
index fcf6b70..941c6de 100644
--- a/extensions/browser/BUILD.gn
+++ b/extensions/browser/BUILD.gn
@@ -223,14 +223,14 @@ source_set("browser") {
"app_window/app_web_contents_helper.h",
"app_window/app_window.cc",
"app_window/app_window.h",
+ "app_window/app_window_client.cc",
+ "app_window/app_window_client.h",
"app_window/app_window_contents.cc",
"app_window/app_window_contents.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/api/app_current_window_internal/app_current_window_internal_api.cc b/extensions/browser/api/app_current_window_internal/app_current_window_internal_api.cc
index 4afaa34..29cf618 100644
--- a/extensions/browser/api/app_current_window_internal/app_current_window_internal_api.cc
+++ b/extensions/browser/api/app_current_window_internal/app_current_window_internal_api.cc
@@ -6,8 +6,8 @@
#include "base/command_line.h"
#include "extensions/browser/app_window/app_window.h"
+#include "extensions/browser/app_window/app_window_client.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/common/api/app_current_window_internal.h"
@@ -294,7 +294,7 @@ bool AppCurrentWindowInternalSetSizeConstraintsFunction::RunWithWindow(
}
bool AppCurrentWindowInternalSetIconFunction::RunWithWindow(AppWindow* window) {
- if (AppsClient::Get()->IsCurrentChannelOlderThanDev() &&
+ if (AppWindowClient::Get()->IsCurrentChannelOlderThanDev() &&
extension()->location() != extensions::Manifest::COMPONENT) {
error_ = kDevChannelOnly;
return false;
@@ -314,7 +314,7 @@ bool AppCurrentWindowInternalSetIconFunction::RunWithWindow(AppWindow* window) {
bool AppCurrentWindowInternalSetBadgeIconFunction::RunWithWindow(
AppWindow* window) {
- if (AppsClient::Get()->IsCurrentChannelOlderThanDev()) {
+ if (AppWindowClient::Get()->IsCurrentChannelOlderThanDev()) {
error_ = kDevChannelOnly;
return false;
}
@@ -333,7 +333,7 @@ bool AppCurrentWindowInternalSetBadgeIconFunction::RunWithWindow(
bool AppCurrentWindowInternalClearBadgeFunction::RunWithWindow(
AppWindow* window) {
- if (AppsClient::Get()->IsCurrentChannelOlderThanDev()) {
+ if (AppWindowClient::Get()->IsCurrentChannelOlderThanDev()) {
error_ = kDevChannelOnly;
return false;
}
@@ -400,7 +400,7 @@ bool AppCurrentWindowInternalSetAlwaysOnTopFunction::RunWithWindow(
bool AppCurrentWindowInternalSetVisibleOnAllWorkspacesFunction::RunWithWindow(
AppWindow* window) {
- if (AppsClient::Get()->IsCurrentChannelOlderThanDev()) {
+ if (AppWindowClient::Get()->IsCurrentChannelOlderThanDev()) {
error_ = kDevChannelOnly;
return false;
}
diff --git a/extensions/browser/api/app_window/app_window_api.cc b/extensions/browser/api/app_window/app_window_api.cc
index 9426ea5..4201c11 100644
--- a/extensions/browser/api/app_window/app_window_api.cc
+++ b/extensions/browser/api/app_window/app_window_api.cc
@@ -16,9 +16,9 @@
#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_client.h"
#include "extensions/browser/app_window/app_window_contents.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"
@@ -194,7 +194,7 @@ bool AppWindowCreateFunction::RunAsync() {
if (!GetBoundsSpec(*options, &create_params, &error_))
return false;
- if (!AppsClient::Get()->IsCurrentChannelOlderThanDev() ||
+ if (!AppWindowClient::Get()->IsCurrentChannelOlderThanDev() ||
extension()->location() == extensions::Manifest::COMPONENT) {
if (options->type == app_window::WINDOW_TYPE_PANEL) {
create_params.window_type = AppWindow::WINDOW_TYPE_PANEL;
@@ -219,7 +219,7 @@ bool AppWindowCreateFunction::RunAsync() {
"F16F23C83C5F6DAD9B65A120448B34056DD80691",
"0F585FB1D0FDFBEBCE1FEB5E9DFFB6DA476B8C9B"
};
- if (AppsClient::Get()->IsCurrentChannelOlderThanDev() &&
+ if (AppWindowClient::Get()->IsCurrentChannelOlderThanDev() &&
!extensions::SimpleFeature::IsIdInList(
extension_id(),
std::set<std::string>(whitelist,
@@ -265,7 +265,7 @@ bool AppWindowCreateFunction::RunAsync() {
create_params.focused = *options->focused.get();
if (options->visible_on_all_workspaces.get()) {
- if (AppsClient::Get()->IsCurrentChannelOlderThanDev()) {
+ if (AppWindowClient::Get()->IsCurrentChannelOlderThanDev()) {
error_ = app_window_constants::kVisibleOnAllWorkspacesWrongChannel;
return false;
}
@@ -295,7 +295,7 @@ bool AppWindowCreateFunction::RunAsync() {
render_view_host_->GetProcess()->GetID();
AppWindow* app_window =
- AppsClient::Get()->CreateAppWindow(browser_context(), extension());
+ AppWindowClient::Get()->CreateAppWindow(browser_context(), extension());
app_window->Init(url, new AppWindowContentsImpl(app_window), create_params);
if (ExtensionsBrowserClient::Get()->IsRunningInForcedAppMode())
@@ -317,7 +317,7 @@ bool AppWindowCreateFunction::RunAsync() {
if (AppWindowRegistry::Get(browser_context())
->HadDevToolsAttached(created_view)) {
- AppsClient::Get()->OpenDevToolsWindow(
+ AppWindowClient::Get()->OpenDevToolsWindow(
app_window->web_contents(),
base::Bind(&AppWindowCreateFunction::SendResponse, this, true));
return true;
diff --git a/extensions/browser/app_window/app_window.cc b/extensions/browser/app_window/app_window.cc
index 1cc9ae2..6481dc7 100644
--- a/extensions/browser/app_window/app_window.cc
+++ b/extensions/browser/app_window/app_window.cc
@@ -23,9 +23,9 @@
#include "content/public/common/media_stream_request.h"
#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_client.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"
@@ -272,9 +272,9 @@ void AppWindow::Init(const GURL& url,
requested_alpha_enabled_ = new_params.alpha_enabled;
- AppsClient* apps_client = AppsClient::Get();
+ AppWindowClient* app_window_client = AppWindowClient::Get();
native_app_window_.reset(
- apps_client->CreateNativeAppWindow(this, new_params));
+ app_window_client->CreateNativeAppWindow(this, new_params));
helper_.reset(new AppWebContentsHelper(
browser_context_, extension_id_, web_contents, app_delegate_.get()));
@@ -284,7 +284,7 @@ void AppWindow::Init(const GURL& url,
popup_manager_->RegisterWith(web_contents);
// Prevent the browser process from shutting down while this window exists.
- apps_client->IncrementKeepAliveCount();
+ app_window_client->IncrementKeepAliveCount();
UpdateExtensionAppIcon();
AppWindowRegistry::Get(browser_context_)->AddAppWindow(this);
@@ -335,7 +335,7 @@ AppWindow::~AppWindow() {
ExtensionRegistry::Get(browser_context_)->RemoveObserver(this);
// Remove shutdown prevention.
- AppsClient::Get()->DecrementKeepAliveCount();
+ AppWindowClient::Get()->DecrementKeepAliveCount();
}
void AppWindow::RequestMediaAccessPermission(
diff --git a/extensions/browser/app_window/apps_client.cc b/extensions/browser/app_window/app_window_client.cc
index e520a2e..df9baea 100644
--- a/extensions/browser/app_window/apps_client.cc
+++ b/extensions/browser/app_window/app_window_client.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "extensions/browser/app_window/apps_client.h"
+#include "extensions/browser/app_window/app_window_client.h"
#include "base/basictypes.h"
@@ -10,15 +10,15 @@ namespace extensions {
namespace {
-AppsClient* g_client = NULL;
+AppWindowClient* g_client = NULL;
} // namespace
-AppsClient* AppsClient::Get() {
+AppWindowClient* AppWindowClient::Get() {
return g_client;
}
-void AppsClient::Set(AppsClient* client) {
+void AppWindowClient::Set(AppWindowClient* client) {
// This can happen in unit tests, where the utility thread runs in-process.
if (g_client)
return;
diff --git a/extensions/browser/app_window/apps_client.h b/extensions/browser/app_window/app_window_client.h
index ee6459f..985febf 100644
--- a/extensions/browser/app_window/apps_client.h
+++ b/extensions/browser/app_window/app_window_client.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 EXTENSIONS_BROWSER_APP_WINDOW_APPS_CLIENT_H_
-#define EXTENSIONS_BROWSER_APP_WINDOW_APPS_CLIENT_H_
+#ifndef EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_CLIENT_H_
+#define EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_CLIENT_H_
#include <vector>
@@ -20,13 +20,12 @@ namespace extensions {
class Extension;
class NativeAppWindow;
-// 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 {
+// Sets up global state for the app window system. Should be Set() once in each
+// process. This should be implemented by the client of the app window system.
+// TODO(hashimoto): Move some functions to ExtensionsClient.
+class AppWindowClient {
public:
- virtual ~AppsClient() {}
+ virtual ~AppWindowClient() {}
// Get all loaded browser contexts.
virtual std::vector<content::BrowserContext*> GetLoadedBrowserContexts() = 0;
@@ -53,13 +52,13 @@ class AppsClient {
// Returns true if the current channel is older than dev.
virtual bool IsCurrentChannelOlderThanDev() = 0;
- // Return the apps client.
- static AppsClient* Get();
+ // Return the app window client.
+ static AppWindowClient* Get();
- // Initialize the apps system with this apps client.
- static void Set(AppsClient* client);
+ // Initialize the app window system with this app window client.
+ static void Set(AppWindowClient* client);
};
} // namespace extensions
-#endif // EXTENSIONS_BROWSER_APP_WINDOW_APPS_CLIENT_H_
+#endif // EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_CLIENT_H_
diff --git a/extensions/browser/app_window/app_window_registry.cc b/extensions/browser/app_window/app_window_registry.cc
index 9bc69d3..9cd72e9 100644
--- a/extensions/browser/app_window/app_window_registry.cc
+++ b/extensions/browser/app_window/app_window_registry.cc
@@ -15,7 +15,7 @@
#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/app_window_client.h"
#include "extensions/browser/app_window/native_app_window.h"
#include "extensions/browser/extensions_browser_client.h"
#include "extensions/common/extension.h"
@@ -208,7 +208,7 @@ bool AppWindowRegistry::HadDevToolsAttached(
AppWindow* AppWindowRegistry::GetAppWindowForNativeWindowAnyProfile(
gfx::NativeWindow window) {
std::vector<content::BrowserContext*> contexts =
- AppsClient::Get()->GetLoadedBrowserContexts();
+ AppWindowClient::Get()->GetLoadedBrowserContexts();
for (std::vector<content::BrowserContext*>::const_iterator i =
contexts.begin();
i != contexts.end();
@@ -230,7 +230,7 @@ AppWindow* AppWindowRegistry::GetAppWindowForNativeWindowAnyProfile(
bool AppWindowRegistry::IsAppWindowRegisteredInAnyProfile(
int window_type_mask) {
std::vector<content::BrowserContext*> contexts =
- AppsClient::Get()->GetLoadedBrowserContexts();
+ AppWindowClient::Get()->GetLoadedBrowserContexts();
for (std::vector<content::BrowserContext*>::const_iterator i =
contexts.begin();
i != contexts.end();
@@ -259,7 +259,7 @@ bool AppWindowRegistry::IsAppWindowRegisteredInAnyProfile(
// static
void AppWindowRegistry::CloseAllAppWindows() {
std::vector<content::BrowserContext*> contexts =
- AppsClient::Get()->GetLoadedBrowserContexts();
+ AppWindowClient::Get()->GetLoadedBrowserContexts();
for (std::vector<content::BrowserContext*>::const_iterator i =
contexts.begin();
i != contexts.end();
diff --git a/extensions/extensions.gyp b/extensions/extensions.gyp
index 130f75d..a9c1304 100644
--- a/extensions/extensions.gyp
+++ b/extensions/extensions.gyp
@@ -499,8 +499,8 @@
'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/app_window_client.cc',
+ 'browser/app_window/app_window_client.h',
'browser/app_window/native_app_window.h',
'browser/app_window/size_constraints.cc',
'browser/app_window/size_constraints.h',
diff --git a/extensions/shell/app_shell.gyp b/extensions/shell/app_shell.gyp
index 076dd59..e11ea0c 100644
--- a/extensions/shell/app_shell.gyp
+++ b/extensions/shell/app_shell.gyp
@@ -55,8 +55,8 @@
'browser/media_capture_util.h',
'browser/shell_app_delegate.cc',
'browser/shell_app_delegate.h',
- 'browser/shell_apps_client.cc',
- 'browser/shell_apps_client.h',
+ 'browser/shell_app_window_client.cc',
+ 'browser/shell_app_window_client.h',
'browser/shell_audio_controller_chromeos.cc',
'browser/shell_audio_controller_chromeos.h',
'browser/shell_browser_context.cc',
diff --git a/extensions/shell/browser/shell_apps_client.cc b/extensions/shell/browser/shell_app_window_client.cc
index bbb8386..90287a6 100644
--- a/extensions/shell/browser/shell_apps_client.cc
+++ b/extensions/shell/browser/shell_app_window_client.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "extensions/shell/browser/shell_apps_client.h"
+#include "extensions/shell/browser/shell_app_window_client.h"
#include "extensions/browser/app_window/app_window.h"
#include "extensions/shell/browser/desktop_controller.h"
@@ -10,24 +10,25 @@
namespace extensions {
-ShellAppsClient::ShellAppsClient() {
+ShellAppWindowClient::ShellAppWindowClient() {
}
-ShellAppsClient::~ShellAppsClient() {
+ShellAppWindowClient::~ShellAppWindowClient() {
}
std::vector<content::BrowserContext*>
-ShellAppsClient::GetLoadedBrowserContexts() {
+ShellAppWindowClient::GetLoadedBrowserContexts() {
NOTIMPLEMENTED();
return std::vector<content::BrowserContext*>();
}
-AppWindow* ShellAppsClient::CreateAppWindow(content::BrowserContext* context,
- const Extension* extension) {
+AppWindow* ShellAppWindowClient::CreateAppWindow(
+ content::BrowserContext* context,
+ const Extension* extension) {
return DesktopController::instance()->CreateAppWindow(context, extension);
}
-NativeAppWindow* ShellAppsClient::CreateNativeAppWindow(
+NativeAppWindow* ShellAppWindowClient::CreateNativeAppWindow(
AppWindow* window,
const AppWindow::CreateParams& params) {
ShellNativeAppWindow* native_app_window =
@@ -37,20 +38,21 @@ NativeAppWindow* ShellAppsClient::CreateNativeAppWindow(
return native_app_window;
}
-void ShellAppsClient::IncrementKeepAliveCount() {
+void ShellAppWindowClient::IncrementKeepAliveCount() {
NOTIMPLEMENTED();
}
-void ShellAppsClient::DecrementKeepAliveCount() {
+void ShellAppWindowClient::DecrementKeepAliveCount() {
NOTIMPLEMENTED();
}
-void ShellAppsClient::OpenDevToolsWindow(content::WebContents* web_contents,
- const base::Closure& callback) {
+void ShellAppWindowClient::OpenDevToolsWindow(
+ content::WebContents* web_contents,
+ const base::Closure& callback) {
NOTIMPLEMENTED();
}
-bool ShellAppsClient::IsCurrentChannelOlderThanDev() {
+bool ShellAppWindowClient::IsCurrentChannelOlderThanDev() {
return false;
}
diff --git a/extensions/shell/browser/shell_apps_client.h b/extensions/shell/browser/shell_app_window_client.h
index 2aaa5ba..00ad767 100644
--- a/extensions/shell/browser/shell_apps_client.h
+++ b/extensions/shell/browser/shell_app_window_client.h
@@ -2,22 +2,22 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef EXTENSIONS_SHELL_BROWSER_SHELL_APPS_CLIENT_H_
-#define EXTENSIONS_SHELL_BROWSER_SHELL_APPS_CLIENT_H_
+#ifndef EXTENSIONS_SHELL_BROWSER_SHELL_APP_WINDOW_CLIENT_H_
+#define EXTENSIONS_SHELL_BROWSER_SHELL_APP_WINDOW_CLIENT_H_
#include "base/compiler_specific.h"
#include "base/macros.h"
-#include "extensions/browser/app_window/apps_client.h"
+#include "extensions/browser/app_window/app_window_client.h"
namespace extensions {
-// app_shell's AppsClient implementation.
-class ShellAppsClient : public AppsClient {
+// app_shell's AppWindowClient implementation.
+class ShellAppWindowClient : public AppWindowClient {
public:
- ShellAppsClient();
- virtual ~ShellAppsClient();
+ ShellAppWindowClient();
+ virtual ~ShellAppWindowClient();
- // AppsClient overrides:
+ // AppWindowClient overrides:
virtual std::vector<content::BrowserContext*> GetLoadedBrowserContexts()
OVERRIDE;
virtual AppWindow* CreateAppWindow(content::BrowserContext* context,
@@ -32,9 +32,9 @@ class ShellAppsClient : public AppsClient {
virtual bool IsCurrentChannelOlderThanDev() OVERRIDE;
private:
- DISALLOW_COPY_AND_ASSIGN(ShellAppsClient);
+ DISALLOW_COPY_AND_ASSIGN(ShellAppWindowClient);
};
} // namespace extensions
-#endif // EXTENSIONS_SHELL_BROWSER_SHELL_APPS_CLIENT_H_
+#endif // EXTENSIONS_SHELL_BROWSER_SHELL_APP_WINDOW_CLIENT_H_
diff --git a/extensions/shell/browser/shell_browser_main_parts.cc b/extensions/shell/browser/shell_browser_main_parts.cc
index 5f5819b..78feacd 100644
--- a/extensions/shell/browser/shell_browser_main_parts.cc
+++ b/extensions/shell/browser/shell_browser_main_parts.cc
@@ -13,7 +13,7 @@
#include "content/public/common/result_codes.h"
#include "content/shell/browser/shell_devtools_delegate.h"
#include "content/shell/browser/shell_net_log.h"
-#include "extensions/browser/app_window/apps_client.h"
+#include "extensions/browser/app_window/app_window_client.h"
#include "extensions/browser/browser_context_keyed_service_factories.h"
#include "extensions/browser/extension_system.h"
#include "extensions/common/constants.cc"
diff --git a/extensions/shell/browser/shell_browser_main_parts.h b/extensions/shell/browser/shell_browser_main_parts.h
index aed1354..367b114 100644
--- a/extensions/shell/browser/shell_browser_main_parts.h
+++ b/extensions/shell/browser/shell_browser_main_parts.h
@@ -27,7 +27,7 @@ class NetLog;
namespace extensions {
-class AppsClient;
+class AppWindowClient;
class DesktopController;
class ShellBrowserContext;
class ShellBrowserMainDelegate;
@@ -74,7 +74,7 @@ class ShellBrowserMainParts : public content::BrowserMainParts {
scoped_ptr<DesktopController> desktop_controller_;
scoped_ptr<ShellBrowserContext> browser_context_;
scoped_ptr<ShellDeviceClient> device_client_;
- scoped_ptr<AppsClient> apps_client_;
+ scoped_ptr<AppWindowClient> app_window_client_;
scoped_ptr<ShellExtensionsClient> extensions_client_;
scoped_ptr<ShellExtensionsBrowserClient> extensions_browser_client_;
scoped_ptr<net::NetLog> net_log_;
diff --git a/extensions/shell/browser/shell_desktop_controller.cc b/extensions/shell/browser/shell_desktop_controller.cc
index bb8a185..6e68087 100644
--- a/extensions/shell/browser/shell_desktop_controller.cc
+++ b/extensions/shell/browser/shell_desktop_controller.cc
@@ -11,7 +11,7 @@
#include "extensions/browser/app_window/app_window.h"
#include "extensions/browser/app_window/native_app_window.h"
#include "extensions/shell/browser/shell_app_delegate.h"
-#include "extensions/shell/browser/shell_apps_client.h"
+#include "extensions/shell/browser/shell_app_window_client.h"
#include "extensions/shell/common/switches.h"
#include "ui/aura/client/cursor_client.h"
#include "ui/aura/client/default_capture_client.h"
@@ -160,8 +160,8 @@ class AppsFocusRules : public wm::BaseFocusRules {
} // namespace
ShellDesktopController::ShellDesktopController()
- : apps_client_(new ShellAppsClient), app_window_(NULL) {
- extensions::AppsClient::Set(apps_client_.get());
+ : app_window_client_(new ShellAppWindowClient), app_window_(NULL) {
+ extensions::AppWindowClient::Set(app_window_client_.get());
#if defined(OS_CHROMEOS)
chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->
@@ -181,7 +181,7 @@ ShellDesktopController::~ShellDesktopController() {
chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->
RemoveObserver(this);
#endif
- extensions::AppsClient::Set(NULL);
+ extensions::AppWindowClient::Set(NULL);
}
aura::WindowTreeHost* ShellDesktopController::GetHost() {
diff --git a/extensions/shell/browser/shell_desktop_controller.h b/extensions/shell/browser/shell_desktop_controller.h
index cfaa764..f7e41a8 100644
--- a/extensions/shell/browser/shell_desktop_controller.h
+++ b/extensions/shell/browser/shell_desktop_controller.h
@@ -49,7 +49,7 @@ class UserActivityDetector;
}
namespace extensions {
-class AppsClient;
+class AppWindowClient;
class Extension;
// Handles desktop-related tasks for app_shell.
@@ -129,7 +129,7 @@ class ShellDesktopController : public DesktopController,
scoped_ptr<ui::UserActivityPowerManagerNotifier> user_activity_notifier_;
#endif
- scoped_ptr<AppsClient> apps_client_;
+ scoped_ptr<AppWindowClient> app_window_client_;
// The desktop supports a single app window.
AppWindow* app_window_; // NativeAppWindow::Close() deletes this.