summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-13 20:52:05 +0000
committerjamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-13 20:52:05 +0000
commitee84cf3bea5bb176a454c1e85043516b6e9b1eb1 (patch)
treee1e9e2fc62d4853e736de49dc3b7984d244b6218
parentcc402534a47d3f82b784b6fe8537e312bf20ad39 (diff)
downloadchromium_src-ee84cf3bea5bb176a454c1e85043516b6e9b1eb1.zip
chromium_src-ee84cf3bea5bb176a454c1e85043516b6e9b1eb1.tar.gz
chromium_src-ee84cf3bea5bb176a454c1e85043516b6e9b1eb1.tar.bz2
Rename apps::AppShell* to apps::Shell*
The names are getting long and unwieldy and everything is in the apps namespace anyway. This is consistent with the ash_shell and content_shell naming conventions. BUG=None TEST=compiles R=miket@chromium.org Review URL: https://codereview.chromium.org/99053008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240742 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--apps/apps.gypi30
-rw-r--r--apps/shell/app_shell_browser_context.cc59
-rw-r--r--apps/shell/shell_app_sorting.cc (renamed from apps/shell/app_shell_app_sorting.cc)42
-rw-r--r--apps/shell/shell_app_sorting.h (renamed from apps/shell/app_shell_app_sorting.h)14
-rw-r--r--apps/shell/shell_browser_context.cc59
-rw-r--r--apps/shell/shell_browser_context.h (renamed from apps/shell/app_shell_browser_context.h)14
-rw-r--r--apps/shell/shell_browser_main_parts.cc (renamed from apps/shell/app_shell_browser_main_parts.cc)32
-rw-r--r--apps/shell/shell_browser_main_parts.h (renamed from apps/shell/app_shell_browser_main_parts.h)24
-rw-r--r--apps/shell/shell_content_browser_client.cc (renamed from apps/shell/app_shell_content_browser_client.cc)16
-rw-r--r--apps/shell/shell_content_browser_client.h (renamed from apps/shell/app_shell_content_browser_client.h)18
-rw-r--r--apps/shell/shell_content_client.cc (renamed from apps/shell/app_shell_content_client.cc)16
-rw-r--r--apps/shell/shell_content_client.h (renamed from apps/shell/app_shell_content_client.h)12
-rw-r--r--apps/shell/shell_extensions_browser_client.cc (renamed from apps/shell/app_shell_extensions_browser_client.cc)37
-rw-r--r--apps/shell/shell_extensions_browser_client.h (renamed from apps/shell/app_shell_extensions_browser_client.h)14
-rw-r--r--apps/shell/shell_main.cc (renamed from apps/shell/app_shell_main.cc)4
-rw-r--r--apps/shell/shell_main_delegate.cc (renamed from apps/shell/app_shell_main_delegate.cc)19
-rw-r--r--apps/shell/shell_main_delegate.h (renamed from apps/shell/app_shell_main_delegate.h)22
17 files changed, 215 insertions, 217 deletions
diff --git a/apps/apps.gypi b/apps/apps.gypi
index d424e8e7..381c57c 100644
--- a/apps/apps.gypi
+++ b/apps/apps.gypi
@@ -122,21 +122,21 @@
'..',
],
'sources': [
- 'shell/app_shell_app_sorting.cc',
- 'shell/app_shell_app_sorting.h',
- 'shell/app_shell_browser_context.cc',
- 'shell_app_shell_browser_context.h',
- 'shell/app_shell_browser_main_parts.cc',
- 'shell/app_shell_browser_main_parts.h',
- 'shell/app_shell_content_browser_client.cc',
- 'shell/app_shell_content_browser_client.h',
- 'shell/app_shell_content_client.cc',
- 'shell/app_shell_content_client.h',
- 'shell/app_shell_extensions_browser_client.cc',
- 'shell/app_shell_extensions_browser_client.h',
- 'shell/app_shell_main_delegate.cc',
- 'shell/app_shell_main_delegate.h',
- 'shell/app_shell_main.cc',
+ 'shell/shell_app_sorting.cc',
+ 'shell/shell_app_sorting.h',
+ 'shell/shell_browser_context.cc',
+ 'shell/shell_browser_context.h',
+ 'shell/shell_browser_main_parts.cc',
+ 'shell/shell_browser_main_parts.h',
+ 'shell/shell_content_browser_client.cc',
+ 'shell/shell_content_browser_client.h',
+ 'shell/shell_content_client.cc',
+ 'shell/shell_content_client.h',
+ 'shell/shell_extensions_browser_client.cc',
+ 'shell/shell_extensions_browser_client.h',
+ 'shell/shell_main_delegate.cc',
+ 'shell/shell_main_delegate.h',
+ 'shell/shell_main.cc',
'shell/web_view_window.cc',
'shell/web_view_window.cc',
],
diff --git a/apps/shell/app_shell_browser_context.cc b/apps/shell/app_shell_browser_context.cc
deleted file mode 100644
index f85697d..0000000
--- a/apps/shell/app_shell_browser_context.cc
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "apps/shell/app_shell_browser_context.h"
-
-#include "apps/app_load_service_factory.h"
-
-namespace {
-
-// See ChromeBrowserMainExtraPartsProfiles for details.
-void EnsureBrowserContextKeyedServiceFactoriesBuilt() {
- apps::AppLoadServiceFactory::GetInstance();
-}
-
-} // namespace
-
-namespace apps {
-
-// TODO(jamescook): Should this be an off-the-record context?
-// TODO(jamescook): Could initialize NetLog here to get logs from the networking
-// stack.
-AppShellBrowserContext::AppShellBrowserContext()
- : content::ShellBrowserContext(false, NULL) {
- EnsureBrowserContextKeyedServiceFactoriesBuilt();
-}
-
-AppShellBrowserContext::~AppShellBrowserContext() {
-}
-
-void AppShellBrowserContext::ProfileFunctionCallOnNonProfileBrowserContext1() {
- NOTREACHED();
-}
-void AppShellBrowserContext::ProfileFunctionCallOnNonProfileBrowserContext2() {
- NOTREACHED();
-}
-void AppShellBrowserContext::ProfileFunctionCallOnNonProfileBrowserContext3() {
- NOTREACHED();
-}
-void AppShellBrowserContext::ProfileFunctionCallOnNonProfileBrowserContext4() {
- NOTREACHED();
-}
-void AppShellBrowserContext::ProfileFunctionCallOnNonProfileBrowserContext5() {
- NOTREACHED();
-}
-void AppShellBrowserContext::ProfileFunctionCallOnNonProfileBrowserContext6() {
- NOTREACHED();
-}
-void AppShellBrowserContext::ProfileFunctionCallOnNonProfileBrowserContext7() {
- NOTREACHED();
-}
-void AppShellBrowserContext::ProfileFunctionCallOnNonProfileBrowserContext8() {
- NOTREACHED();
-}
-void AppShellBrowserContext::ProfileFunctionCallOnNonProfileBrowserContext9() {
- NOTREACHED();
-}
-
-} // namespace apps
diff --git a/apps/shell/app_shell_app_sorting.cc b/apps/shell/shell_app_sorting.cc
index a130d1b..d792da3 100644
--- a/apps/shell/app_shell_app_sorting.cc
+++ b/apps/shell/shell_app_sorting.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 "apps/shell/app_shell_app_sorting.h"
+#include "apps/shell/shell_app_sorting.h"
#include "sync/api/string_ordinal.h"
@@ -17,90 +17,90 @@ const char kFirstPage[] = "a";
namespace apps {
-AppShellAppSorting::AppShellAppSorting() {
+ShellAppSorting::ShellAppSorting() {
}
-AppShellAppSorting::~AppShellAppSorting() {
+ShellAppSorting::~ShellAppSorting() {
}
-void AppShellAppSorting::SetExtensionScopedPrefs(
+void ShellAppSorting::SetExtensionScopedPrefs(
extensions::ExtensionScopedPrefs* prefs) {
}
-void AppShellAppSorting::SetExtensionSyncService(
+void ShellAppSorting::SetExtensionSyncService(
ExtensionSyncService* extension_sync_service) {
}
-void AppShellAppSorting::Initialize(
+void ShellAppSorting::Initialize(
const extensions::ExtensionIdList& extension_ids) {
}
-void AppShellAppSorting::FixNTPOrdinalCollisions() {
+void ShellAppSorting::FixNTPOrdinalCollisions() {
}
-void AppShellAppSorting::EnsureValidOrdinals(
+void ShellAppSorting::EnsureValidOrdinals(
const std::string& extension_id,
const syncer::StringOrdinal& suggested_page) {
}
-void AppShellAppSorting::OnExtensionMoved(
+void ShellAppSorting::OnExtensionMoved(
const std::string& moved_extension_id,
const std::string& predecessor_extension_id,
const std::string& successor_extension_id) {
}
-syncer::StringOrdinal AppShellAppSorting::GetAppLaunchOrdinal(
+syncer::StringOrdinal ShellAppSorting::GetAppLaunchOrdinal(
const std::string& extension_id) const {
return syncer::StringOrdinal(kFirstApp);
}
-void AppShellAppSorting::SetAppLaunchOrdinal(
+void ShellAppSorting::SetAppLaunchOrdinal(
const std::string& extension_id,
const syncer::StringOrdinal& new_app_launch_ordinal) {
}
-syncer::StringOrdinal AppShellAppSorting::CreateFirstAppLaunchOrdinal(
+syncer::StringOrdinal ShellAppSorting::CreateFirstAppLaunchOrdinal(
const syncer::StringOrdinal& page_ordinal) const {
return syncer::StringOrdinal(kFirstApp);
}
-syncer::StringOrdinal AppShellAppSorting::CreateNextAppLaunchOrdinal(
+syncer::StringOrdinal ShellAppSorting::CreateNextAppLaunchOrdinal(
const syncer::StringOrdinal& page_ordinal) const {
return syncer::StringOrdinal(kNextApp);
}
-syncer::StringOrdinal AppShellAppSorting::CreateFirstAppPageOrdinal() const {
+syncer::StringOrdinal ShellAppSorting::CreateFirstAppPageOrdinal() const {
return syncer::StringOrdinal(kFirstPage);
}
-syncer::StringOrdinal AppShellAppSorting::GetNaturalAppPageOrdinal() const {
+syncer::StringOrdinal ShellAppSorting::GetNaturalAppPageOrdinal() const {
return syncer::StringOrdinal(kFirstPage);
}
-syncer::StringOrdinal AppShellAppSorting::GetPageOrdinal(
+syncer::StringOrdinal ShellAppSorting::GetPageOrdinal(
const std::string& extension_id) const {
return syncer::StringOrdinal(kFirstPage);
}
-void AppShellAppSorting::SetPageOrdinal(
+void ShellAppSorting::SetPageOrdinal(
const std::string& extension_id,
const syncer::StringOrdinal& new_page_ordinal) {
}
-void AppShellAppSorting::ClearOrdinals(const std::string& extension_id) {
+void ShellAppSorting::ClearOrdinals(const std::string& extension_id) {
}
-int AppShellAppSorting::PageStringOrdinalAsInteger(
+int ShellAppSorting::PageStringOrdinalAsInteger(
const syncer::StringOrdinal& page_ordinal) const {
return 0;
}
-syncer::StringOrdinal AppShellAppSorting::PageIntegerAsStringOrdinal(
+syncer::StringOrdinal ShellAppSorting::PageIntegerAsStringOrdinal(
size_t page_index) {
return syncer::StringOrdinal(kFirstPage);
}
-void AppShellAppSorting::MarkExtensionAsHidden(
+void ShellAppSorting::MarkExtensionAsHidden(
const std::string& extension_id) {
}
diff --git a/apps/shell/app_shell_app_sorting.h b/apps/shell/shell_app_sorting.h
index d619aa8..e00dc15 100644
--- a/apps/shell/app_shell_app_sorting.h
+++ b/apps/shell/shell_app_sorting.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_SHELL_APP_SHELL_APP_SORTING_H_
-#define APPS_SHELL_APP_SHELL_APP_SORTING_H_
+#ifndef APPS_SHELL_SHELL_APP_SORTING_H_
+#define APPS_SHELL_SHELL_APP_SORTING_H_
#include "base/compiler_specific.h"
#include "extensions/browser/app_sorting.h"
@@ -12,10 +12,10 @@ namespace apps {
// A stub AppSorting. Since app_shell only runs a single app we don't need to
// sort them.
-class AppShellAppSorting : public extensions::AppSorting {
+class ShellAppSorting : public extensions::AppSorting {
public:
- AppShellAppSorting();
- virtual ~AppShellAppSorting();
+ ShellAppSorting();
+ virtual ~ShellAppSorting();
// extensions::AppSorting overrides:
virtual void SetExtensionScopedPrefs(extensions::ExtensionScopedPrefs* prefs)
@@ -56,9 +56,9 @@ class AppShellAppSorting : public extensions::AppSorting {
virtual void MarkExtensionAsHidden(const std::string& extension_id) OVERRIDE;
private:
- DISALLOW_COPY_AND_ASSIGN(AppShellAppSorting);
+ DISALLOW_COPY_AND_ASSIGN(ShellAppSorting);
};
} // namespace apps
-#endif // APPS_SHELL_APP_SHELL_APP_SORTING_H_
+#endif // APPS_SHELL_SHELL_APP_SORTING_H_
diff --git a/apps/shell/shell_browser_context.cc b/apps/shell/shell_browser_context.cc
new file mode 100644
index 0000000..32954e7
--- /dev/null
+++ b/apps/shell/shell_browser_context.cc
@@ -0,0 +1,59 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "apps/shell/shell_browser_context.h"
+
+#include "apps/app_load_service_factory.h"
+
+namespace {
+
+// See ChromeBrowserMainExtraPartsProfiles for details.
+void EnsureBrowserContextKeyedServiceFactoriesBuilt() {
+ apps::AppLoadServiceFactory::GetInstance();
+}
+
+} // namespace
+
+namespace apps {
+
+// TODO(jamescook): Should this be an off-the-record context?
+// TODO(jamescook): Could initialize NetLog here to get logs from the networking
+// stack.
+ShellBrowserContext::ShellBrowserContext()
+ : content::ShellBrowserContext(false, NULL) {
+ EnsureBrowserContextKeyedServiceFactoriesBuilt();
+}
+
+ShellBrowserContext::~ShellBrowserContext() {
+}
+
+void ShellBrowserContext::ProfileFunctionCallOnNonProfileBrowserContext1() {
+ NOTREACHED();
+}
+void ShellBrowserContext::ProfileFunctionCallOnNonProfileBrowserContext2() {
+ NOTREACHED();
+}
+void ShellBrowserContext::ProfileFunctionCallOnNonProfileBrowserContext3() {
+ NOTREACHED();
+}
+void ShellBrowserContext::ProfileFunctionCallOnNonProfileBrowserContext4() {
+ NOTREACHED();
+}
+void ShellBrowserContext::ProfileFunctionCallOnNonProfileBrowserContext5() {
+ NOTREACHED();
+}
+void ShellBrowserContext::ProfileFunctionCallOnNonProfileBrowserContext6() {
+ NOTREACHED();
+}
+void ShellBrowserContext::ProfileFunctionCallOnNonProfileBrowserContext7() {
+ NOTREACHED();
+}
+void ShellBrowserContext::ProfileFunctionCallOnNonProfileBrowserContext8() {
+ NOTREACHED();
+}
+void ShellBrowserContext::ProfileFunctionCallOnNonProfileBrowserContext9() {
+ NOTREACHED();
+}
+
+} // namespace apps
diff --git a/apps/shell/app_shell_browser_context.h b/apps/shell/shell_browser_context.h
index ecde105a..165f906 100644
--- a/apps/shell/app_shell_browser_context.h
+++ b/apps/shell/shell_browser_context.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_SHELL_APP_SHELL_BROWSER_CONTEXT_H_
-#define APPS_SHELL_APP_SHELL_BROWSER_CONTEXT_H_
+#ifndef APPS_SHELL_SHELL_BROWSER_CONTEXT_H_
+#define APPS_SHELL_SHELL_BROWSER_CONTEXT_H_
#include "base/compiler_specific.h"
#include "content/shell/browser/shell_browser_context.h"
@@ -12,10 +12,10 @@ namespace apps {
// The BrowserContext used by the content, apps and extensions systems in
// app_shell.
-class AppShellBrowserContext : public content::ShellBrowserContext {
+class ShellBrowserContext : public content::ShellBrowserContext {
public:
- AppShellBrowserContext();
- virtual ~AppShellBrowserContext();
+ ShellBrowserContext();
+ virtual ~ShellBrowserContext();
// HACK: Pad the virtual function table so we trip an assertion if someone
// tries to use |this| as a Profile.
@@ -30,9 +30,9 @@ class AppShellBrowserContext : public content::ShellBrowserContext {
virtual void ProfileFunctionCallOnNonProfileBrowserContext9();
private:
- DISALLOW_COPY_AND_ASSIGN(AppShellBrowserContext);
+ DISALLOW_COPY_AND_ASSIGN(ShellBrowserContext);
};
} // namespace apps
-#endif // APPS_SHELL_APP_SHELL_BROWSER_CONTEXT_H_
+#endif // APPS_SHELL_SHELL_BROWSER_CONTEXT_H_
diff --git a/apps/shell/app_shell_browser_main_parts.cc b/apps/shell/shell_browser_main_parts.cc
index 7526bcf..262c837 100644
--- a/apps/shell/app_shell_browser_main_parts.cc
+++ b/apps/shell/shell_browser_main_parts.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/shell/app_shell_browser_main_parts.h"
+#include "apps/shell/shell_browser_main_parts.h"
#include "apps/app_load_service.h"
-#include "apps/shell/app_shell_browser_context.h"
-#include "apps/shell/app_shell_extensions_browser_client.h"
+#include "apps/shell/shell_browser_context.h"
+#include "apps/shell/shell_extensions_browser_client.h"
#include "apps/shell/web_view_window.h"
#include "base/command_line.h"
#include "base/file_util.h"
@@ -26,14 +26,14 @@
namespace apps {
-AppShellBrowserMainParts::AppShellBrowserMainParts(
+ShellBrowserMainParts::ShellBrowserMainParts(
const content::MainFunctionParams& parameters) {
}
-AppShellBrowserMainParts::~AppShellBrowserMainParts() {
+ShellBrowserMainParts::~ShellBrowserMainParts() {
}
-void AppShellBrowserMainParts::CreateRootWindow() {
+void ShellBrowserMainParts::CreateRootWindow() {
// TODO(jamescook): Replace this with a real Screen implementation.
gfx::Screen::SetScreenInstance(
gfx::SCREEN_TYPE_NATIVE, aura::TestScreen::Create());
@@ -43,7 +43,7 @@ void AppShellBrowserMainParts::CreateRootWindow() {
wm_test_helper_->root_window()->host()->Show();
}
-void AppShellBrowserMainParts::LoadAndLaunchApp(const base::FilePath& app_dir) {
+void ShellBrowserMainParts::LoadAndLaunchApp(const base::FilePath& app_dir) {
base::FilePath current_dir;
CHECK(file_util::GetCurrentDirectory(&current_dir));
@@ -62,24 +62,24 @@ void AppShellBrowserMainParts::LoadAndLaunchApp(const base::FilePath& app_dir) {
}
}
-void AppShellBrowserMainParts::PreMainMessageLoopStart() {
+void ShellBrowserMainParts::PreMainMessageLoopStart() {
// TODO(jamescook): Initialize touch here?
}
-void AppShellBrowserMainParts::PostMainMessageLoopStart() {
+void ShellBrowserMainParts::PostMainMessageLoopStart() {
}
-void AppShellBrowserMainParts::PreEarlyInitialization() {
+void ShellBrowserMainParts::PreEarlyInitialization() {
}
-int AppShellBrowserMainParts::PreCreateThreads() {
+int ShellBrowserMainParts::PreCreateThreads() {
// TODO(jamescook): Initialize chromeos::CrosSettings here?
// Return no error.
return 0;
}
-void AppShellBrowserMainParts::PreMainMessageLoopRun() {
+void ShellBrowserMainParts::PreMainMessageLoopRun() {
// NOTE: Much of this is culled from chrome/test/base/chrome_test_suite.cc
// Set up all the paths to load files.
chrome::RegisterPathProvider();
@@ -95,11 +95,11 @@ void AppShellBrowserMainParts::PreMainMessageLoopRun() {
// TODO(jamescook): Initialize chromeos::UserManager.
// Initialize our "profile" equivalent.
- browser_context_.reset(new AppShellBrowserContext);
+ browser_context_.reset(new ShellBrowserContext);
// TODO(jamescook): Initialize ExtensionsClient.
extensions_browser_client_.reset(
- new AppShellExtensionsBrowserClient(browser_context_.get()));
+ new ShellExtensionsBrowserClient(browser_context_.get()));
extensions::ExtensionsBrowserClient::Set(extensions_browser_client_.get());
// TODO(jamescook): Initialize policy::ProfilePolicyConnector.
@@ -123,14 +123,14 @@ void AppShellBrowserMainParts::PreMainMessageLoopRun() {
}
}
-bool AppShellBrowserMainParts::MainMessageLoopRun(int* result_code) {
+bool ShellBrowserMainParts::MainMessageLoopRun(int* result_code) {
base::RunLoop run_loop;
run_loop.Run();
*result_code = content::RESULT_CODE_NORMAL_EXIT;
return true;
}
-void AppShellBrowserMainParts::PostMainMessageLoopRun() {
+void ShellBrowserMainParts::PostMainMessageLoopRun() {
extensions::ExtensionsBrowserClient::Set(NULL);
extensions_browser_client_.reset();
browser_context_.reset();
diff --git a/apps/shell/app_shell_browser_main_parts.h b/apps/shell/shell_browser_main_parts.h
index 5300d31..16f3c7a 100644
--- a/apps/shell/app_shell_browser_main_parts.h
+++ b/apps/shell/shell_browser_main_parts.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_SHELL_APP_SHELL_BROWSER_MAIN_PARTS_H_
-#define APPS_SHELL_APP_SHELL_BROWSER_MAIN_PARTS_H_
+#ifndef APPS_SHELL_SHELL_BROWSER_MAIN_PARTS_H_
+#define APPS_SHELL_SHELL_BROWSER_MAIN_PARTS_H_
#include "base/basictypes.h"
#include "base/compiler_specific.h"
@@ -29,17 +29,17 @@ class WMTestHelper;
namespace apps {
-class AppShellBrowserContext;
-class AppShellExtensionsBrowserClient;
+class ShellBrowserContext;
+class ShellExtensionsBrowserClient;
// Handles initialization of AppShell.
-class AppShellBrowserMainParts : public content::BrowserMainParts {
+class ShellBrowserMainParts : public content::BrowserMainParts {
public:
- explicit AppShellBrowserMainParts(
+ explicit ShellBrowserMainParts(
const content::MainFunctionParams& parameters);
- virtual ~AppShellBrowserMainParts();
+ virtual ~ShellBrowserMainParts();
- AppShellBrowserContext* browser_context() {
+ ShellBrowserContext* browser_context() {
return browser_context_.get();
}
@@ -59,15 +59,15 @@ class AppShellBrowserMainParts : public content::BrowserMainParts {
virtual void PostMainMessageLoopRun() OVERRIDE;
private:
- scoped_ptr<AppShellBrowserContext> browser_context_;
- scoped_ptr<AppShellExtensionsBrowserClient> extensions_browser_client_;
+ scoped_ptr<ShellBrowserContext> browser_context_;
+ scoped_ptr<ShellExtensionsBrowserClient> extensions_browser_client_;
// Enable a minimal set of views::corewm to be initialized.
scoped_ptr<wm::WMTestHelper> wm_test_helper_;
- DISALLOW_COPY_AND_ASSIGN(AppShellBrowserMainParts);
+ DISALLOW_COPY_AND_ASSIGN(ShellBrowserMainParts);
};
} // namespace apps
-#endif // APPS_SHELL_APP_SHELL_BROWSER_MAIN_PARTS_H_
+#endif // APPS_SHELL_SHELL_BROWSER_MAIN_PARTS_H_
diff --git a/apps/shell/app_shell_content_browser_client.cc b/apps/shell/shell_content_browser_client.cc
index a5eedbd..d269965 100644
--- a/apps/shell/app_shell_content_browser_client.cc
+++ b/apps/shell/shell_content_browser_client.cc
@@ -2,29 +2,29 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "apps/shell/app_shell_content_browser_client.h"
+#include "apps/shell/shell_content_browser_client.h"
-#include "apps/shell/app_shell_browser_context.h"
-#include "apps/shell/app_shell_browser_main_parts.h"
+#include "apps/shell/shell_browser_context.h"
+#include "apps/shell/shell_browser_main_parts.h"
#include "content/shell/browser/shell_browser_context.h"
namespace apps {
-AppShellContentBrowserClient::AppShellContentBrowserClient()
+ShellContentBrowserClient::ShellContentBrowserClient()
: browser_main_parts_(NULL) {
}
-AppShellContentBrowserClient::~AppShellContentBrowserClient() {
+ShellContentBrowserClient::~ShellContentBrowserClient() {
}
-content::BrowserMainParts* AppShellContentBrowserClient::CreateBrowserMainParts(
+content::BrowserMainParts* ShellContentBrowserClient::CreateBrowserMainParts(
const content::MainFunctionParams& parameters) {
- browser_main_parts_ = new AppShellBrowserMainParts(parameters);
+ browser_main_parts_ = new ShellBrowserMainParts(parameters);
return browser_main_parts_;
}
net::URLRequestContextGetter*
-AppShellContentBrowserClient::CreateRequestContext(
+ShellContentBrowserClient::CreateRequestContext(
content::BrowserContext* content_browser_context,
content::ProtocolHandlerMap* protocol_handlers) {
// TODO(jamescook): Should this be an off-the-record context?
diff --git a/apps/shell/app_shell_content_browser_client.h b/apps/shell/shell_content_browser_client.h
index 6a3f957..e72ab2ed 100644
--- a/apps/shell/app_shell_content_browser_client.h
+++ b/apps/shell/shell_content_browser_client.h
@@ -2,19 +2,19 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef APPS_SHELL_APP_SHELL_CONTENT_BROWSER_CLIENT_H_
-#define APPS_SHELL_APP_SHELL_CONTENT_BROWSER_CLIENT_H_
+#ifndef APPS_SHELL_SHELL_CONTENT_BROWSER_CLIENT_H_
+#define APPS_SHELL_SHELL_CONTENT_BROWSER_CLIENT_H_
#include "base/compiler_specific.h"
#include "content/public/browser/content_browser_client.h"
namespace apps {
-class AppShellBrowserMainParts;
+class ShellBrowserMainParts;
-class AppShellContentBrowserClient : public content::ContentBrowserClient {
+class ShellContentBrowserClient : public content::ContentBrowserClient {
public:
- AppShellContentBrowserClient();
- virtual ~AppShellContentBrowserClient();
+ ShellContentBrowserClient();
+ virtual ~ShellContentBrowserClient();
// content::ContentBrowserClient overrides.
virtual content::BrowserMainParts* CreateBrowserMainParts(
@@ -27,11 +27,11 @@ class AppShellContentBrowserClient : public content::ContentBrowserClient {
private:
// Owned by content::BrowserMainLoop.
- AppShellBrowserMainParts* browser_main_parts_;
+ ShellBrowserMainParts* browser_main_parts_;
- DISALLOW_COPY_AND_ASSIGN(AppShellContentBrowserClient);
+ DISALLOW_COPY_AND_ASSIGN(ShellContentBrowserClient);
};
} // namespace apps
-#endif // APPS_SHELL_APP_SHELL_CONTENT_BROWSER_CLIENT_H_
+#endif // APPS_SHELL_SHELL_CONTENT_BROWSER_CLIENT_H_
diff --git a/apps/shell/app_shell_content_client.cc b/apps/shell/shell_content_client.cc
index 286f3dc..5570a51 100644
--- a/apps/shell/app_shell_content_client.cc
+++ b/apps/shell/shell_content_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 "apps/shell/app_shell_content_client.h"
+#include "apps/shell/shell_content_client.h"
#include "base/strings/string_piece.h"
#include "base/strings/utf_string_conversions.h"
@@ -12,33 +12,33 @@
namespace apps {
-AppShellContentClient::AppShellContentClient() {}
+ShellContentClient::ShellContentClient() {}
-AppShellContentClient::~AppShellContentClient() {}
+ShellContentClient::~ShellContentClient() {}
-std::string AppShellContentClient::GetUserAgent() const {
+std::string ShellContentClient::GetUserAgent() const {
// TODO(derat): Figure out what this should be for app_shell and determine
// whether we need to include a version number to placate browser sniffing.
return webkit_glue::BuildUserAgentFromProduct("Chrome");
}
-string16 AppShellContentClient::GetLocalizedString(int message_id) const {
+string16 ShellContentClient::GetLocalizedString(int message_id) const {
return l10n_util::GetStringUTF16(message_id);
}
-base::StringPiece AppShellContentClient::GetDataResource(
+base::StringPiece ShellContentClient::GetDataResource(
int resource_id,
ui::ScaleFactor scale_factor) const {
return ResourceBundle::GetSharedInstance().GetRawDataResourceForScale(
resource_id, scale_factor);
}
-base::RefCountedStaticMemory* AppShellContentClient::GetDataResourceBytes(
+base::RefCountedStaticMemory* ShellContentClient::GetDataResourceBytes(
int resource_id) const {
return ResourceBundle::GetSharedInstance().LoadDataResourceBytes(resource_id);
}
-gfx::Image& AppShellContentClient::GetNativeImageNamed(int resource_id) const {
+gfx::Image& ShellContentClient::GetNativeImageNamed(int resource_id) const {
return ResourceBundle::GetSharedInstance().GetNativeImageNamed(resource_id);
}
diff --git a/apps/shell/app_shell_content_client.h b/apps/shell/shell_content_client.h
index a953d96..c3c043d 100644
--- a/apps/shell/app_shell_content_client.h
+++ b/apps/shell/shell_content_client.h
@@ -2,18 +2,18 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef APPS_SHELL_APP_SHELL_CONTENT_CLIENT_H_
-#define APPS_SHELL_APP_SHELL_CONTENT_CLIENT_H_
+#ifndef APPS_SHELL_SHELL_CONTENT_CLIENT_H_
+#define APPS_SHELL_SHELL_CONTENT_CLIENT_H_
#include "base/compiler_specific.h"
#include "content/public/common/content_client.h"
namespace apps {
-class AppShellContentClient : public content::ContentClient {
+class ShellContentClient : public content::ContentClient {
public:
- AppShellContentClient();
- virtual ~AppShellContentClient();
+ ShellContentClient();
+ virtual ~ShellContentClient();
virtual std::string GetUserAgent() const OVERRIDE;
virtual string16 GetLocalizedString(int message_id) const OVERRIDE;
@@ -27,4 +27,4 @@ class AppShellContentClient : public content::ContentClient {
} // namespace apps
-#endif // APPS_SHELL_APP_SHELL_CONTENT_CLIENT_H_
+#endif // APPS_SHELL_SHELL_CONTENT_CLIENT_H_
diff --git a/apps/shell/app_shell_extensions_browser_client.cc b/apps/shell/shell_extensions_browser_client.cc
index aee9ac6..c192406 100644
--- a/apps/shell/app_shell_extensions_browser_client.cc
+++ b/apps/shell/shell_extensions_browser_client.cc
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "apps/shell/app_shell_extensions_browser_client.h"
+#include "apps/shell/shell_extensions_browser_client.h"
-#include "apps/shell/app_shell_app_sorting.h"
+#include "apps/shell/shell_app_sorting.h"
#include "base/prefs/pref_service.h"
#include "base/prefs/pref_service_factory.h"
#include "base/prefs/testing_pref_store.h"
@@ -25,7 +25,7 @@ void RegisterPrefs(user_prefs::PrefRegistrySyncable* registry) {
namespace apps {
-AppShellExtensionsBrowserClient::AppShellExtensionsBrowserClient(
+ShellExtensionsBrowserClient::ShellExtensionsBrowserClient(
BrowserContext* context)
: browser_context_(context) {
// Set up the preferences service.
@@ -43,65 +43,64 @@ AppShellExtensionsBrowserClient::AppShellExtensionsBrowserClient(
user_prefs::UserPrefs::Set(browser_context_, prefs_.get());
}
-AppShellExtensionsBrowserClient::~AppShellExtensionsBrowserClient() {}
+ShellExtensionsBrowserClient::~ShellExtensionsBrowserClient() {}
-bool AppShellExtensionsBrowserClient::IsShuttingDown() {
+bool ShellExtensionsBrowserClient::IsShuttingDown() {
return false;
}
-bool AppShellExtensionsBrowserClient::AreExtensionsDisabled(
+bool ShellExtensionsBrowserClient::AreExtensionsDisabled(
const CommandLine& command_line,
BrowserContext* context) {
return false;
}
-bool AppShellExtensionsBrowserClient::IsValidContext(BrowserContext* context) {
+bool ShellExtensionsBrowserClient::IsValidContext(BrowserContext* context) {
return context == browser_context_;
}
-bool AppShellExtensionsBrowserClient::IsSameContext(BrowserContext* first,
- BrowserContext* second) {
+bool ShellExtensionsBrowserClient::IsSameContext(BrowserContext* first,
+ BrowserContext* second) {
return first == second;
}
-bool AppShellExtensionsBrowserClient::HasOffTheRecordContext(
+bool ShellExtensionsBrowserClient::HasOffTheRecordContext(
BrowserContext* context) {
return false;
}
-BrowserContext* AppShellExtensionsBrowserClient::GetOffTheRecordContext(
+BrowserContext* ShellExtensionsBrowserClient::GetOffTheRecordContext(
BrowserContext* context) {
// app_shell only supports a single context.
return NULL;
}
-BrowserContext* AppShellExtensionsBrowserClient::GetOriginalContext(
+BrowserContext* ShellExtensionsBrowserClient::GetOriginalContext(
BrowserContext* context) {
return context;
}
-PrefService* AppShellExtensionsBrowserClient::GetPrefServiceForContext(
+PrefService* ShellExtensionsBrowserClient::GetPrefServiceForContext(
BrowserContext* context) {
return prefs_.get();
}
-bool AppShellExtensionsBrowserClient::DeferLoadingBackgroundHosts(
+bool ShellExtensionsBrowserClient::DeferLoadingBackgroundHosts(
BrowserContext* context) const {
return false;
}
-bool AppShellExtensionsBrowserClient::DidVersionUpdate(
- BrowserContext* context) {
+bool ShellExtensionsBrowserClient::DidVersionUpdate(BrowserContext* context) {
// TODO(jamescook): We might want to tell extensions when app_shell updates.
return false;
}
scoped_ptr<extensions::AppSorting>
-AppShellExtensionsBrowserClient::CreateAppSorting() {
- return scoped_ptr<extensions::AppSorting>(new AppShellAppSorting).Pass();
+ShellExtensionsBrowserClient::CreateAppSorting() {
+ return scoped_ptr<extensions::AppSorting>(new ShellAppSorting).Pass();
}
-bool AppShellExtensionsBrowserClient::IsRunningInForcedAppMode() {
+bool ShellExtensionsBrowserClient::IsRunningInForcedAppMode() {
return false;
}
diff --git a/apps/shell/app_shell_extensions_browser_client.h b/apps/shell/shell_extensions_browser_client.h
index 564a40d..203336c 100644
--- a/apps/shell/app_shell_extensions_browser_client.h
+++ b/apps/shell/shell_extensions_browser_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 APPS_SHELL_APP_SHELL_EXTENSIONS_BROWSER_CLIENT_H_
-#define APPS_SHELL_APP_SHELL_EXTENSIONS_BROWSER_CLIENT_H_
+#ifndef APPS_SHELL_SHELL_EXTENSIONS_BROWSER_CLIENT_H_
+#define APPS_SHELL_SHELL_EXTENSIONS_BROWSER_CLIENT_H_
#include "base/compiler_specific.h"
#include "extensions/browser/extensions_browser_client.h"
@@ -14,12 +14,12 @@ namespace apps {
// An ExtensionsBrowserClient that supports a single content::BrowserContent
// with no related incognito context.
-class AppShellExtensionsBrowserClient
+class ShellExtensionsBrowserClient
: public extensions::ExtensionsBrowserClient {
public:
// |context| is the single BrowserContext used for IsValidContext() below.
- explicit AppShellExtensionsBrowserClient(content::BrowserContext* context);
- virtual ~AppShellExtensionsBrowserClient();
+ explicit ShellExtensionsBrowserClient(content::BrowserContext* context);
+ virtual ~ShellExtensionsBrowserClient();
// extensions::ExtensionsBrowserClient overrides:
virtual bool IsShuttingDown() OVERRIDE;
@@ -49,9 +49,9 @@ class AppShellExtensionsBrowserClient
// The PrefService for |browser_context_|.
scoped_ptr<PrefService> prefs_;
- DISALLOW_COPY_AND_ASSIGN(AppShellExtensionsBrowserClient);
+ DISALLOW_COPY_AND_ASSIGN(ShellExtensionsBrowserClient);
};
} // namespace apps
-#endif // APPS_SHELL_APP_SHELL_EXTENSIONS_BROWSER_CLIENT_H_
+#endif // APPS_SHELL_SHELL_EXTENSIONS_BROWSER_CLIENT_H_
diff --git a/apps/shell/app_shell_main.cc b/apps/shell/shell_main.cc
index ed7c100..4048c17 100644
--- a/apps/shell/app_shell_main.cc
+++ b/apps/shell/shell_main.cc
@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "apps/shell/app_shell_main_delegate.h"
+#include "apps/shell/shell_main_delegate.h"
#include "content/public/app/content_main.h"
int main(int argc, const char** argv) {
- apps::AppShellMainDelegate delegate;
+ apps::ShellMainDelegate delegate;
return content::ContentMain(argc, argv, &delegate);
}
diff --git a/apps/shell/app_shell_main_delegate.cc b/apps/shell/shell_main_delegate.cc
index 16fbc9d..9876bec 100644
--- a/apps/shell/app_shell_main_delegate.cc
+++ b/apps/shell/shell_main_delegate.cc
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "apps/shell/app_shell_main_delegate.h"
+#include "apps/shell/shell_main_delegate.h"
-#include "apps/shell/app_shell_content_browser_client.h"
+#include "apps/shell/shell_content_browser_client.h"
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/logging.h"
@@ -14,29 +14,28 @@
namespace apps {
-AppShellMainDelegate::AppShellMainDelegate() {
+ShellMainDelegate::ShellMainDelegate() {
}
-AppShellMainDelegate::~AppShellMainDelegate() {
+ShellMainDelegate::~ShellMainDelegate() {
}
-bool AppShellMainDelegate::BasicStartupComplete(int* exit_code) {
+bool ShellMainDelegate::BasicStartupComplete(int* exit_code) {
// TODO(jamescook): Initialize logging here.
SetContentClient(&content_client_);
return false;
}
-void AppShellMainDelegate::PreSandboxStartup() {
+void ShellMainDelegate::PreSandboxStartup() {
InitializeResourceBundle();
}
-content::ContentBrowserClient*
-AppShellMainDelegate::CreateContentBrowserClient() {
- browser_client_.reset(new apps::AppShellContentBrowserClient);
+content::ContentBrowserClient* ShellMainDelegate::CreateContentBrowserClient() {
+ browser_client_.reset(new apps::ShellContentBrowserClient);
return browser_client_.get();
}
-void AppShellMainDelegate::InitializeResourceBundle() {
+void ShellMainDelegate::InitializeResourceBundle() {
ui::ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL);
}
diff --git a/apps/shell/app_shell_main_delegate.h b/apps/shell/shell_main_delegate.h
index 86aae44..98c21cd 100644
--- a/apps/shell/app_shell_main_delegate.h
+++ b/apps/shell/shell_main_delegate.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 APPS_SHELL_APP_SHELL_MAIN_DELEGATE_H_
-#define APPS_SHELL_APP_SHELL_MAIN_DELEGATE_H_
+#ifndef APPS_SHELL_SHELL_MAIN_DELEGATE_H_
+#define APPS_SHELL_SHELL_MAIN_DELEGATE_H_
-#include "apps/shell/app_shell_content_client.h"
+#include "apps/shell/shell_content_client.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "content/public/app/content_main_delegate.h"
namespace apps {
-class AppShellContentBrowserClient;
+class ShellContentBrowserClient;
-class AppShellMainDelegate : public content::ContentMainDelegate {
+class ShellMainDelegate : public content::ContentMainDelegate {
public:
- AppShellMainDelegate();
- virtual ~AppShellMainDelegate();
+ ShellMainDelegate();
+ virtual ~ShellMainDelegate();
// ContentMainDelegate implementation:
virtual bool BasicStartupComplete(int* exit_code) OVERRIDE;
@@ -27,12 +27,12 @@ class AppShellMainDelegate : public content::ContentMainDelegate {
static void InitializeResourceBundle();
private:
- scoped_ptr<AppShellContentBrowserClient> browser_client_;
- AppShellContentClient content_client_;
+ scoped_ptr<ShellContentBrowserClient> browser_client_;
+ ShellContentClient content_client_;
- DISALLOW_COPY_AND_ASSIGN(AppShellMainDelegate);
+ DISALLOW_COPY_AND_ASSIGN(ShellMainDelegate);
};
} // namespace apps
-#endif // APPS_SHELL_APP_SHELL_MAIN_DELEGATE_H_
+#endif // APPS_SHELL_SHELL_MAIN_DELEGATE_H_