summaryrefslogtreecommitdiffstats
path: root/athena
diff options
context:
space:
mode:
authoryoz@chromium.org <yoz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-24 03:39:36 +0000
committeryoz@chromium.org <yoz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-24 03:39:36 +0000
commit7685f64a35b6d029f7d11ce752dc126163d9474e (patch)
tree0cb10d4ed10d781bc6de27672bbcc8528134baab /athena
parentaf97fe7d55c6310aacf1585bdbd8d38e3bc4c080 (diff)
downloadchromium_src-7685f64a35b6d029f7d11ce752dc126163d9474e.zip
chromium_src-7685f64a35b6d029f7d11ce752dc126163d9474e.tar.gz
chromium_src-7685f64a35b6d029f7d11ce752dc126163d9474e.tar.bz2
Move apps/shell to extensions/shell.
This does: - Move files - Fix up all namespaces in these files to be extensions, not apps - Clean up DEPS files This does not: - Change the name of the build targets (app_shell, app_shell_browsertests) BUG=394987 TBR=ben@chromium.org Review URL: https://codereview.chromium.org/412713002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285144 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'athena')
-rw-r--r--athena/activity/public/activity_factory.h11
-rw-r--r--athena/content/DEPS2
-rw-r--r--athena/content/app_activity.cc4
-rw-r--r--athena/content/app_activity.h6
-rw-r--r--athena/content/content_activity_factory.cc2
-rw-r--r--athena/content/content_app_model_builder.cc2
-rw-r--r--athena/content/public/content_activity_factory.h2
-rw-r--r--athena/main/DEPS10
-rw-r--r--athena/main/athena_app_window_controller.cc6
-rw-r--r--athena/main/athena_app_window_controller.h8
-rw-r--r--athena/main/athena_main.cc55
-rw-r--r--athena/main/athena_main.gyp2
-rw-r--r--athena/resources/athena_resources.gyp2
-rw-r--r--athena/test/sample_activity_factory.cc2
-rw-r--r--athena/test/sample_activity_factory.h2
15 files changed, 61 insertions, 55 deletions
diff --git a/athena/activity/public/activity_factory.h b/athena/activity/public/activity_factory.h
index bc95893..cd79ca7 100644
--- a/athena/activity/public/activity_factory.h
+++ b/athena/activity/public/activity_factory.h
@@ -8,14 +8,14 @@
#include "athena/athena_export.h"
#include "url/gurl.h"
-namespace apps {
-class ShellAppWindow;
-}
-
namespace content {
class BrowserContext;
}
+namespace extensions {
+class ShellAppWindow;
+}
+
namespace athena {
class Activity;
@@ -38,7 +38,8 @@ class ATHENA_EXPORT ActivityFactory {
// Create an activity of an app with |app_window|. The returned activity
// should own |app_window|.
- virtual Activity* CreateAppActivity(apps::ShellAppWindow* app_window) = 0;
+ virtual Activity* CreateAppActivity(
+ extensions::ShellAppWindow* app_window) = 0;
};
} // namespace athena
diff --git a/athena/content/DEPS b/athena/content/DEPS
index 7278520..5401a42 100644
--- a/athena/content/DEPS
+++ b/athena/content/DEPS
@@ -1,11 +1,11 @@
include_rules = [
- "+apps/shell/browser",
"+athena/activity/public",
"+athena/home/public",
"+athena/input/public",
"+content/public",
"+extensions/browser",
"+extensions/common",
+ "+extensions/shell/browser",
"+ui/app_list",
"+ui/gfx",
"+ui/views",
diff --git a/athena/content/app_activity.cc b/athena/content/app_activity.cc
index 3a4cb69..c90daff 100644
--- a/athena/content/app_activity.cc
+++ b/athena/content/app_activity.cc
@@ -4,15 +4,15 @@
#include "athena/content/app_activity.h"
-#include "apps/shell/browser/shell_app_window.h"
#include "athena/activity/public/activity_manager.h"
#include "content/public/browser/web_contents.h"
+#include "extensions/shell/browser/shell_app_window.h"
#include "ui/views/controls/webview/webview.h"
namespace athena {
// TODO(mukai): specifies the same accelerators of WebActivity.
-AppActivity::AppActivity(apps::ShellAppWindow* app_window)
+AppActivity::AppActivity(extensions::ShellAppWindow* app_window)
: app_window_(app_window),
web_view_(NULL),
current_state_(ACTIVITY_UNLOADED) {
diff --git a/athena/content/app_activity.h b/athena/content/app_activity.h
index cfbe93d..4f6ef2b 100644
--- a/athena/content/app_activity.h
+++ b/athena/content/app_activity.h
@@ -10,7 +10,7 @@
#include "content/public/browser/web_contents_observer.h"
#include "ui/gfx/image/image_skia.h"
-namespace apps {
+namespace extensions {
class ShellAppWindow;
}
@@ -24,7 +24,7 @@ class AppActivity : public Activity,
public ActivityViewModel,
public content::WebContentsObserver {
public:
- explicit AppActivity(apps::ShellAppWindow* app_window);
+ explicit AppActivity(extensions::ShellAppWindow* app_window);
virtual ~AppActivity();
protected:
@@ -51,7 +51,7 @@ class AppActivity : public Activity,
const std::vector<content::FaviconURL>& candidates) OVERRIDE;
private:
- scoped_ptr<apps::ShellAppWindow> app_window_;
+ scoped_ptr<extensions::ShellAppWindow> app_window_;
views::WebView* web_view_;
// The current state for this activity.
diff --git a/athena/content/content_activity_factory.cc b/athena/content/content_activity_factory.cc
index 3a08641..65747dc 100644
--- a/athena/content/content_activity_factory.cc
+++ b/athena/content/content_activity_factory.cc
@@ -22,7 +22,7 @@ Activity* ContentActivityFactory::CreateWebActivity(
}
Activity* ContentActivityFactory::CreateAppActivity(
- apps::ShellAppWindow* app_window) {
+ extensions::ShellAppWindow* app_window) {
return new AppActivity(app_window);
}
diff --git a/athena/content/content_app_model_builder.cc b/athena/content/content_app_model_builder.cc
index c90304d..d8a3616 100644
--- a/athena/content/content_app_model_builder.cc
+++ b/athena/content/content_app_model_builder.cc
@@ -4,13 +4,13 @@
#include "athena/content/public/content_app_model_builder.h"
-#include "apps/shell/browser/shell_extension_system.h"
#include "athena/activity/public/activity_factory.h"
#include "athena/activity/public/activity_manager.h"
#include "extensions/browser/extension_icon_image.h"
#include "extensions/common/constants.h"
#include "extensions/common/extension.h"
#include "extensions/common/manifest_handlers/icons_handler.h"
+#include "extensions/shell/browser/shell_extension_system.h"
#include "ui/app_list/app_list_item.h"
#include "ui/app_list/app_list_model.h"
diff --git a/athena/content/public/content_activity_factory.h b/athena/content/public/content_activity_factory.h
index 2698123..2d41441 100644
--- a/athena/content/public/content_activity_factory.h
+++ b/athena/content/public/content_activity_factory.h
@@ -20,7 +20,7 @@ class ATHENA_EXPORT ContentActivityFactory : public ActivityFactory {
virtual Activity* CreateWebActivity(content::BrowserContext* browser_context,
const GURL& url) OVERRIDE;
virtual Activity* CreateAppActivity(
- apps::ShellAppWindow* app_window) OVERRIDE;
+ extensions::ShellAppWindow* app_window) OVERRIDE;
private:
DISALLOW_COPY_AND_ASSIGN(ContentActivityFactory);
diff --git a/athena/main/DEPS b/athena/main/DEPS
index 6e5a0d4..fca20e1 100644
--- a/athena/main/DEPS
+++ b/athena/main/DEPS
@@ -24,14 +24,14 @@ include_rules = [
specific_include_rules = {
"athena_main\.cc": [
- "+apps/shell/app",
- "+apps/shell/browser",
- "+apps/shell/common",
- "+apps/shell/renderer",
"+content/public/app",
+ "+extensions/shell/app",
+ "+extensions/shell/browser",
+ "+extensions/shell/common",
+ "+extensions/shell/renderer",
],
"athena_app_window_controller\.*": [
- "+apps/shell/browser",
+ "+extensions/shell/browser",
],
"athena_shell\.cc": [
"+athena/test",
diff --git a/athena/main/athena_app_window_controller.cc b/athena/main/athena_app_window_controller.cc
index df44bc5..a1da206 100644
--- a/athena/main/athena_app_window_controller.cc
+++ b/athena/main/athena_app_window_controller.cc
@@ -4,11 +4,11 @@
#include "athena/main/athena_app_window_controller.h"
-#include "apps/shell/browser/shell_app_window.h"
#include "athena/activity/public/activity_factory.h"
#include "athena/activity/public/activity_manager.h"
#include "base/memory/scoped_ptr.h"
#include "content/public/browser/web_contents_observer.h"
+#include "extensions/shell/browser/shell_app_window.h"
namespace athena {
@@ -18,9 +18,9 @@ AthenaAppWindowController::AthenaAppWindowController() {
AthenaAppWindowController::~AthenaAppWindowController() {
}
-apps::ShellAppWindow* AthenaAppWindowController::CreateAppWindow(
+extensions::ShellAppWindow* AthenaAppWindowController::CreateAppWindow(
content::BrowserContext* context) {
- apps::ShellAppWindow* app_window = new apps::ShellAppWindow();
+ extensions::ShellAppWindow* app_window = new extensions::ShellAppWindow();
app_window->Init(context, gfx::Size(100, 100));
ActivityManager::Get()->AddActivity(ActivityFactory::Get()->CreateAppActivity(
app_window));
diff --git a/athena/main/athena_app_window_controller.h b/athena/main/athena_app_window_controller.h
index 78684d5..ea2c172 100644
--- a/athena/main/athena_app_window_controller.h
+++ b/athena/main/athena_app_window_controller.h
@@ -5,20 +5,20 @@
#ifndef ATHENA_MAIN_ATHENA_APP_WINDOW_CONTROLLER_H_
#define ATHENA_MAIN_ATHENA_APP_WINDOW_CONTROLLER_H_
-#include "apps/shell/browser/shell_app_window_controller.h"
#include "base/macros.h"
+#include "extensions/shell/browser/shell_app_window_controller.h"
namespace athena {
// The shell app window controller for athena. It embeds the web_contents of
// an app window into an Athena activity.
-class AthenaAppWindowController : public apps::ShellAppWindowController {
+class AthenaAppWindowController : public extensions::ShellAppWindowController {
public:
AthenaAppWindowController();
virtual ~AthenaAppWindowController();
- // Overridden from apps::ShellAppWindowController:
- virtual apps::ShellAppWindow* CreateAppWindow(
+ // Overridden from extensions::ShellAppWindowController:
+ virtual extensions::ShellAppWindow* CreateAppWindow(
content::BrowserContext* context) OVERRIDE;
virtual void CloseAppWindows() OVERRIDE;
diff --git a/athena/main/athena_main.cc b/athena/main/athena_main.cc
index 6286034..d50330e 100644
--- a/athena/main/athena_main.cc
+++ b/athena/main/athena_main.cc
@@ -2,13 +2,6 @@
// 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/browser/shell_browser_main_delegate.h"
-#include "apps/shell/browser/shell_content_browser_client.h"
-#include "apps/shell/browser/shell_desktop_controller.h"
-#include "apps/shell/browser/shell_extension_system.h"
-#include "apps/shell/common/switches.h"
-#include "apps/shell/renderer/shell_renderer_main_delegate.h"
#include "athena/content/public/content_activity_factory.h"
#include "athena/content/public/content_app_model_builder.h"
#include "athena/home/public/home_card.h"
@@ -24,6 +17,13 @@
#include "base/file_util.h"
#include "base/path_service.h"
#include "content/public/app/content_main.h"
+#include "extensions/shell/app/shell_main_delegate.h"
+#include "extensions/shell/browser/shell_browser_main_delegate.h"
+#include "extensions/shell/browser/shell_content_browser_client.h"
+#include "extensions/shell/browser/shell_desktop_controller.h"
+#include "extensions/shell/browser/shell_extension_system.h"
+#include "extensions/shell/common/switches.h"
+#include "extensions/shell/renderer/shell_renderer_main_delegate.h"
#include "ui/app_list/app_list_switches.h"
#include "ui/aura/window_tree_host.h"
#include "ui/base/resource/resource_bundle.h"
@@ -60,13 +60,13 @@ class VirtualKeyboardObserver : public keyboard::KeyboardControllerObserver {
DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardObserver);
};
-class AthenaDesktopController : public apps::ShellDesktopController {
+class AthenaDesktopController : public extensions::ShellDesktopController {
public:
AthenaDesktopController() {}
virtual ~AthenaDesktopController() {}
private:
- // apps::ShellDesktopController:
+ // extensions::ShellDesktopController:
virtual wm::FocusRules* CreateFocusRules() OVERRIDE {
return athena::ScreenManager::CreateFocusRules();
}
@@ -74,12 +74,12 @@ class AthenaDesktopController : public apps::ShellDesktopController {
DISALLOW_COPY_AND_ASSIGN(AthenaDesktopController);
};
-class AthenaBrowserMainDelegate : public apps::ShellBrowserMainDelegate {
+class AthenaBrowserMainDelegate : public extensions::ShellBrowserMainDelegate {
public:
AthenaBrowserMainDelegate() {}
virtual ~AthenaBrowserMainDelegate() {}
- // apps::ShellBrowserMainDelegate:
+ // extensions::ShellBrowserMainDelegate:
virtual void Start(content::BrowserContext* context) OVERRIDE {
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
@@ -87,9 +87,10 @@ class AthenaBrowserMainDelegate : public apps::ShellBrowserMainDelegate {
command_line->AppendSwitch(app_list::switches::kEnableExperimentalAppList);
base::FilePath app_dir = base::FilePath::FromUTF8Unsafe(
- command_line->HasSwitch(apps::switches::kAppShellAppPath) ?
- command_line->GetSwitchValueNative(apps::switches::kAppShellAppPath) :
- kDefaultAppPath);
+ command_line->HasSwitch(extensions::switches::kAppShellAppPath)
+ ? command_line->GetSwitchValueNative(
+ extensions::switches::kAppShellAppPath)
+ : kDefaultAppPath);
base::FilePath app_absolute_dir = base::MakeAbsoluteFilePath(app_dir);
if (base::DirectoryExists(app_absolute_dir)) {
@@ -100,7 +101,7 @@ class AthenaBrowserMainDelegate : public apps::ShellBrowserMainDelegate {
}
athena::StartAthena(
- apps::ShellDesktopController::instance()->host()->window(),
+ extensions::ShellDesktopController::instance()->host()->window(),
new athena::ContentActivityFactory(),
new athena::ContentAppModelBuilder(context));
athena::HomeCard::Get()->RegisterSearchProvider(
@@ -117,10 +118,11 @@ class AthenaBrowserMainDelegate : public apps::ShellBrowserMainDelegate {
athena::ShutdownAthena();
}
- virtual apps::ShellDesktopController* CreateDesktopController() OVERRIDE {
+ virtual extensions::ShellDesktopController* CreateDesktopController()
+ OVERRIDE {
// TODO(mukai): create Athena's own ShellDesktopController subclass so that
// it can initialize its own window manager logic.
- apps::ShellDesktopController* desktop = new AthenaDesktopController();
+ extensions::ShellDesktopController* desktop = new AthenaDesktopController();
desktop->SetAppWindowController(new athena::AthenaAppWindowController());
return desktop;
}
@@ -131,10 +133,12 @@ class AthenaBrowserMainDelegate : public apps::ShellBrowserMainDelegate {
DISALLOW_COPY_AND_ASSIGN(AthenaBrowserMainDelegate);
};
-class AthenaContentBrowserClient : public apps::ShellContentBrowserClient {
+class AthenaContentBrowserClient
+ : public extensions::ShellContentBrowserClient {
public:
AthenaContentBrowserClient()
- : apps::ShellContentBrowserClient(new AthenaBrowserMainDelegate()) {}
+ : extensions::ShellContentBrowserClient(new AthenaBrowserMainDelegate()) {
+ }
virtual ~AthenaContentBrowserClient() {}
// content::ContentBrowserClient:
@@ -148,13 +152,14 @@ class AthenaContentBrowserClient : public apps::ShellContentBrowserClient {
DISALLOW_COPY_AND_ASSIGN(AthenaContentBrowserClient);
};
-class AthenaRendererMainDelegate : public apps::ShellRendererMainDelegate {
+class AthenaRendererMainDelegate
+ : public extensions::ShellRendererMainDelegate {
public:
AthenaRendererMainDelegate() {}
virtual ~AthenaRendererMainDelegate() {}
private:
- // apps::ShellRendererMainDelegate:
+ // extensions::ShellRendererMainDelegate:
virtual void OnThreadStarted(content::RenderThread* thread) OVERRIDE {}
virtual void OnViewCreated(content::RenderView* render_view) OVERRIDE {
@@ -164,21 +169,21 @@ class AthenaRendererMainDelegate : public apps::ShellRendererMainDelegate {
DISALLOW_COPY_AND_ASSIGN(AthenaRendererMainDelegate);
};
-class AthenaMainDelegate : public apps::ShellMainDelegate {
+class AthenaMainDelegate : public extensions::ShellMainDelegate {
public:
AthenaMainDelegate() {}
virtual ~AthenaMainDelegate() {}
private:
- // apps::ShellMainDelegate:
+ // extensions::ShellMainDelegate:
virtual content::ContentBrowserClient* CreateShellContentBrowserClient()
OVERRIDE {
return new AthenaContentBrowserClient();
}
- virtual scoped_ptr<apps::ShellRendererMainDelegate>
+ virtual scoped_ptr<extensions::ShellRendererMainDelegate>
CreateShellRendererMainDelegate() OVERRIDE {
- return scoped_ptr<apps::ShellRendererMainDelegate>(
+ return scoped_ptr<extensions::ShellRendererMainDelegate>(
new AthenaRendererMainDelegate());
}
diff --git a/athena/main/athena_main.gyp b/athena/main/athena_main.gyp
index e878a37..7366e5b 100644
--- a/athena/main/athena_main.gyp
+++ b/athena/main/athena_main.gyp
@@ -14,7 +14,6 @@
'../athena.gyp:athena_lib',
'../athena.gyp:athena_content_lib',
'../resources/athena_resources.gyp:athena_pak',
- '../../apps/shell/app_shell.gyp:app_shell_lib',
# debug_widow.cc depends on this. Remove this once debug_window
# is removed.
'../../ash/ash_resources.gyp:ash_resources',
@@ -27,6 +26,7 @@
# TODO(mukai): declare those symbols for Athena.
'../../components/components.gyp:infobars_test_support',
'../../components/components.gyp:search_engines',
+ '../../extensions/shell/app_shell.gyp:app_shell_lib',
'../../skia/skia.gyp:skia',
'../../ui/accessibility/accessibility.gyp:ax_gen',
'../../ui/app_list/app_list.gyp:app_list',
diff --git a/athena/resources/athena_resources.gyp b/athena/resources/athena_resources.gyp
index e3bc6aa..c836d59 100644
--- a/athena/resources/athena_resources.gyp
+++ b/athena/resources/athena_resources.gyp
@@ -11,9 +11,9 @@
'target_name': 'athena_pak',
'type': 'none',
'dependencies': [
- '../../apps/shell/app_shell.gyp:app_shell_pak',
'../../ash/ash_resources.gyp:ash_resources',
'../../content/content_resources.gyp:content_resources',
+ '../../extensions/shell/app_shell.gyp:app_shell_pak',
'../../webkit/webkit_resources.gyp:webkit_resources',
'../../webkit/webkit_resources.gyp:webkit_strings',
],
diff --git a/athena/test/sample_activity_factory.cc b/athena/test/sample_activity_factory.cc
index cdd059d..429342a 100644
--- a/athena/test/sample_activity_factory.cc
+++ b/athena/test/sample_activity_factory.cc
@@ -35,7 +35,7 @@ Activity* SampleActivityFactory::CreateWebActivity(
}
Activity* SampleActivityFactory::CreateAppActivity(
- apps::ShellAppWindow* app_window) {
+ extensions::ShellAppWindow* app_window) {
// SampleActivityFactory can't own the |app_window|, so it must be NULL.
DCHECK(app_window == NULL);
return new SampleActivity(
diff --git a/athena/test/sample_activity_factory.h b/athena/test/sample_activity_factory.h
index 38b672a..df89a72 100644
--- a/athena/test/sample_activity_factory.h
+++ b/athena/test/sample_activity_factory.h
@@ -20,7 +20,7 @@ class SampleActivityFactory : public ActivityFactory {
virtual Activity* CreateWebActivity(content::BrowserContext* browser_context,
const GURL& url) OVERRIDE;
virtual Activity* CreateAppActivity(
- apps::ShellAppWindow* app_window) OVERRIDE;
+ extensions::ShellAppWindow* app_window) OVERRIDE;
private:
DISALLOW_COPY_AND_ASSIGN(SampleActivityFactory);