Commit 1fed1b5f authored by mukai's avatar mukai Committed by Commit bot

Move ContentAppModelBuilder to athena/extensions.

The AppModelBuilder does not rely on content so much, rather
it's highly related to the extension system. Therefore, it's
better to be in athena/extensions, and its name should be
ExtensionAppModelBuilder instead.

This will simplifies DEPS rules of athena/content.

BUG=None
R=oshima@chromium.org
TBR=yoz@chromium.org, xiyuan@chromium.org, tony@chromium.org
TEST=build

Review URL: https://codereview.chromium.org/543263002

Cr-Commit-Position: refs/heads/master@{#294011}
parent 3914c250
...@@ -147,11 +147,11 @@ ...@@ -147,11 +147,11 @@
'content/app_activity_registry.h', 'content/app_activity_registry.h',
'content/app_registry_impl.cc', 'content/app_registry_impl.cc',
'content/content_activity_factory.cc', 'content/content_activity_factory.cc',
'content/content_app_model_builder.cc', 'extensions/extension_app_model_builder.cc',
'content/public/app_registry.h', 'content/public/app_registry.h',
'content/content_activity_factory.h', 'content/content_activity_factory.h',
'content/public/content_activity_factory_creator.h', 'content/public/content_activity_factory_creator.h',
'content/public/content_app_model_builder.h', 'extensions/public/extension_app_model_builder.h',
'content/public/web_contents_view_delegate_creator.h', 'content/public/web_contents_view_delegate_creator.h',
'content/render_view_context_menu_impl.cc', 'content/render_view_context_menu_impl.cc',
'content/render_view_context_menu_impl.h', 'content/render_view_context_menu_impl.h',
......
...@@ -7,12 +7,7 @@ include_rules = [ ...@@ -7,12 +7,7 @@ include_rules = [
"+components/renderer_context_menu", "+components/renderer_context_menu",
"+components/web_modal", "+components/web_modal",
"+content/public", "+content/public",
"+extensions/browser",
"+extensions/common",
"+extensions/grit",
"+ui/app_list",
"+ui/aura", "+ui/aura",
"+ui/base/resource",
"+ui/compositor", "+ui/compositor",
"+ui/gfx", "+ui/gfx",
"+ui/views", "+ui/views",
...@@ -21,3 +16,9 @@ include_rules = [ ...@@ -21,3 +16,9 @@ include_rules = [
# strictly enum/POD, header-only types, and some selected common code. # strictly enum/POD, header-only types, and some selected common code.
"+third_party/WebKit/public/web/WebContextMenuData.h", "+third_party/WebKit/public/web/WebContextMenuData.h",
] ]
specific_include_rules = {
"app_activity_unittest.cc": [
"+extensions/common",
],
}
include_rules = [ include_rules = [
"+apps/app_window.h", "+extensions/browser/app_window/app_window.h",
] ]
include_rules = [ include_rules = [
"+athena/activity/public",
"+athena/home/public",
"+extensions/browser",
"+extensions/common", "+extensions/common",
"+extensions/grit",
"+ui/app_list",
"+ui/base/resource",
] ]
include_rules = [ include_rules = [
"+athena/activity/public",
"+chrome/browser", "+chrome/browser",
"+chrome/common/extensions", "+chrome/common/extensions",
"+extensions/browser",
"+net/base", "+net/base",
] ]
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "athena/content/public/content_app_model_builder.h" #include "athena/extensions/public/extension_app_model_builder.h"
#include "athena/activity/public/activity_factory.h" #include "athena/activity/public/activity_factory.h"
#include "athena/activity/public/activity_manager.h" #include "athena/activity/public/activity_manager.h"
...@@ -91,15 +91,15 @@ class AppItem : public app_list::AppListItem { ...@@ -91,15 +91,15 @@ class AppItem : public app_list::AppListItem {
} // namespace } // namespace
ContentAppModelBuilder::ContentAppModelBuilder( ExtensionAppModelBuilder::ExtensionAppModelBuilder(
content::BrowserContext* browser_context) content::BrowserContext* browser_context)
: browser_context_(browser_context) { : browser_context_(browser_context) {
} }
ContentAppModelBuilder::~ContentAppModelBuilder() { ExtensionAppModelBuilder::~ExtensionAppModelBuilder() {
} }
void ContentAppModelBuilder::PopulateApps(app_list::AppListModel* model) { void ExtensionAppModelBuilder::PopulateApps(app_list::AppListModel* model) {
ExtensionsDelegate* bridge = ExtensionsDelegate::Get(browser_context_); ExtensionsDelegate* bridge = ExtensionsDelegate::Get(browser_context_);
const extensions::ExtensionSet& extensions = bridge->GetInstalledExtensions(); const extensions::ExtensionSet& extensions = bridge->GetInstalledExtensions();
for (extensions::ExtensionSet::const_iterator iter = extensions.begin(); for (extensions::ExtensionSet::const_iterator iter = extensions.begin();
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef ATHENA_CONTENT_PUBLIC_CONTENT_APP_MODEL_BUILDER_H_ #ifndef ATHENA_EXTENSIONS_PUBLIC_EXTENSION_APP_MODEL_BUILDER_H_
#define ATHENA_CONTENT_PUBLIC_CONTENT_APP_MODEL_BUILDER_H_ #define ATHENA_EXTENSIONS_PUBLIC_EXTENSION_APP_MODEL_BUILDER_H_
#include "athena/home/public/app_model_builder.h" #include "athena/home/public/app_model_builder.h"
#include "base/macros.h" #include "base/macros.h"
...@@ -14,19 +14,19 @@ class BrowserContext; ...@@ -14,19 +14,19 @@ class BrowserContext;
namespace athena { namespace athena {
class ATHENA_EXPORT ContentAppModelBuilder : public AppModelBuilder { class ATHENA_EXPORT ExtensionAppModelBuilder : public AppModelBuilder {
public: public:
explicit ContentAppModelBuilder(content::BrowserContext* browser_context); explicit ExtensionAppModelBuilder(content::BrowserContext* browser_context);
virtual ~ContentAppModelBuilder(); virtual ~ExtensionAppModelBuilder();
virtual void PopulateApps(app_list::AppListModel* model) OVERRIDE; virtual void PopulateApps(app_list::AppListModel* model) OVERRIDE;
private: private:
content::BrowserContext* browser_context_; content::BrowserContext* browser_context_;
DISALLOW_COPY_AND_ASSIGN(ContentAppModelBuilder); DISALLOW_COPY_AND_ASSIGN(ExtensionAppModelBuilder);
}; };
} // namespace athena } // namespace athena
#endif // ATHENA_CONTENT_PUBLIC_CONTENT_APP_MODEL_BUILDER_H_ #endif // ATHENA_EXTENSIONS_PUBLIC_EXTENSION_APP_MODEL_BUILDER_H_
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
#include "athena/activity/public/activity_manager.h" #include "athena/activity/public/activity_manager.h"
#include "athena/content/public/app_registry.h" #include "athena/content/public/app_registry.h"
#include "athena/content/public/content_activity_factory_creator.h" #include "athena/content/public/content_activity_factory_creator.h"
#include "athena/content/public/content_app_model_builder.h"
#include "athena/env/public/athena_env.h" #include "athena/env/public/athena_env.h"
#include "athena/extensions/public/extension_app_model_builder.h"
#include "athena/extensions/public/extensions_delegate.h" #include "athena/extensions/public/extensions_delegate.h"
#include "athena/home/public/home_card.h" #include "athena/home/public/home_card.h"
#include "athena/input/public/input_manager.h" #include "athena/input/public/input_manager.h"
...@@ -131,7 +131,7 @@ void StartAthenaEnv(scoped_refptr<base::TaskRunner> file_runner) { ...@@ -131,7 +131,7 @@ void StartAthenaEnv(scoped_refptr<base::TaskRunner> file_runner) {
void StartAthenaSessionWithContext(content::BrowserContext* context) { void StartAthenaSessionWithContext(content::BrowserContext* context) {
StartAthenaSession(athena::CreateContentActivityFactory(), StartAthenaSession(athena::CreateContentActivityFactory(),
new athena::ContentAppModelBuilder(context)); new athena::ExtensionAppModelBuilder(context));
athena::VirtualKeyboardManager::Create(context); athena::VirtualKeyboardManager::Create(context);
athena::HomeCard::Get()->RegisterSearchProvider( athena::HomeCard::Get()->RegisterSearchProvider(
new athena::UrlSearchProvider(context)); new athena::UrlSearchProvider(context));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment