Skip to content

Commit

Permalink
Reorganize apps/shell into app, browser and common directories.
Browse files Browse the repository at this point in the history
This allows us to separate browser process, render process and common code, similar to how content/shell is organized.  This also allows the DEPS files to be more restrictive to enforce those dependencies.

A parallel CL adds apps/shell/renderer and some renderer-specific code: https://codereview.chromium.org/149163002/

BUG=none
TEST=compiles
R=joi@chromium.org, miket@chromium.org
TBR=stevenjb@chromium.org for DEPS on src/chromeos (just moving the DEP from one file to another)

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248575 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
jamescook@chromium.org committed Feb 3, 2014
1 parent 69624f8 commit a424119
Show file tree
Hide file tree
Showing 29 changed files with 120 additions and 85 deletions.
1 change: 0 additions & 1 deletion apps/DEPS
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
include_rules = [
"+base",
"+content/public/app",
"+content/public/browser",
"+content/public/common",
"+content/public/test",
Expand Down
42 changes: 21 additions & 21 deletions apps/apps.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -124,29 +124,29 @@
'..',
],
'sources': [
'shell/app/shell_main_delegate.cc',
'shell/app/shell_main_delegate.h',
'shell/app/shell_main.cc',
'shell/browser/shell_app_sorting.cc',
'shell/browser/shell_app_sorting.h',
'shell/browser/shell_browser_context.cc',
'shell/browser/shell_browser_context.h',
'shell/browser/shell_browser_main_parts.cc',
'shell/browser/shell_browser_main_parts.h',
'shell/browser/shell_content_browser_client.cc',
'shell/browser/shell_content_browser_client.h',
'shell/browser/shell_extension_system.cc',
'shell/browser/shell_extension_system.h',
'shell/browser/shell_extensions_browser_client.cc',
'shell/browser/shell_extensions_browser_client.h',
'shell/browser/web_view_window.cc',
'shell/browser/web_view_window.cc',
'shell/common/shell_content_client.cc',
'shell/common/shell_content_client.h',
'shell/common/shell_extensions_client.cc',
'shell/common/shell_extensions_client.h',
'shell/renderer/shell_content_renderer_client.cc',
'shell/renderer/shell_content_renderer_client.h',
'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_extension_system.cc',
'shell/shell_extension_system.h',
'shell/shell_extensions_browser_client.cc',
'shell/shell_extensions_browser_client.h',
'shell/shell_extensions_client.cc',
'shell/shell_extensions_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',
],
},
], # targets
Expand Down
13 changes: 13 additions & 0 deletions apps/shell/app/DEPS
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
include_rules = [
# TODO(jamescook): Remove these. http://crbug.com/305404
# Chrome pieces for app_shell bring-up.
"+chrome/common/chrome_paths.h",

"+chromeos",

# Override apps/DEPS to be more selective about content includes.
"-content",
"+content/public/app",
"+content/public/browser",
"+content/public/common",
]
5 changes: 5 additions & 0 deletions apps/shell/app/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"Application support" for the app_shell executable.

This directory has nothing to do with the apps/extensions themselves.

See content/shell/app for a similar example.
2 changes: 1 addition & 1 deletion apps/shell/shell_main.cc → apps/shell/app/shell_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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/shell_main_delegate.h"
#include "apps/shell/app/shell_main_delegate.h"
#include "content/public/app/content_main.h"

int main(int argc, const char** argv) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/shell_main_delegate.h"
#include "apps/shell/app/shell_main_delegate.h"

#include "apps/shell/browser/shell_content_browser_client.h"
#include "apps/shell/common/shell_content_client.h"
#include "apps/shell/renderer/shell_content_renderer_client.h"
#include "apps/shell/shell_content_browser_client.h"
#include "apps/shell/shell_content_client.h"
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/logging.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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_SHELL_MAIN_DELEGATE_H_
#define APPS_SHELL_SHELL_MAIN_DELEGATE_H_
#ifndef APPS_SHELL_APP_SHELL_MAIN_DELEGATE_H_
#define APPS_SHELL_APP_SHELL_MAIN_DELEGATE_H_

#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
Expand Down Expand Up @@ -44,4 +44,4 @@ class ShellMainDelegate : public content::ContentMainDelegate {

} // namespace apps

#endif // APPS_SHELL_SHELL_MAIN_DELEGATE_H_
#endif // APPS_SHELL_APP_SHELL_MAIN_DELEGATE_H_
21 changes: 13 additions & 8 deletions apps/shell/DEPS → apps/shell/browser/DEPS
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
include_rules = [
"+chromeos",
"+components/user_prefs",
"+sync/api",
"+webkit/common/user_agent/user_agent_util.h",

# TODO(jamescook): Remove these. http://crbug.com/305404
# Chrome pieces for bring-up.
# Chrome pieces for app_shell bring-up.
"+chrome/browser/extensions/extension_protocols.h",
"+chrome/browser/extensions/extension_resource_protocols.h",
"+chrome/common/chrome_paths.h",
"+chrome/common/extensions/extension_file_util.h",
"+chrome/common/extensions/features/base_feature_provider.h",
"+chrome/common/extensions/permissions/chrome_api_permissions.h",
"+chrome/common/extensions/extension_file_util.h",

"+chromeos",
"+components/user_prefs",

# Override apps/DEPS to be more selective about content includes.
"-content",
"+content/public/browser",
"+content/public/common",
"+content/public/test",

# Pieces of content_shell reused in app_shell.
"+content/shell/browser/shell_browser_context.h",

"+sync/api",
]
Original file line number Diff line number Diff line change
Expand Up @@ -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/shell_app_sorting.h"
#include "apps/shell/browser/shell_app_sorting.h"

#include "sync/api/string_ordinal.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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_SHELL_APP_SORTING_H_
#define APPS_SHELL_SHELL_APP_SORTING_H_
#ifndef APPS_SHELL_BROWSER_SHELL_APP_SORTING_H_
#define APPS_SHELL_BROWSER_SHELL_APP_SORTING_H_

#include "base/compiler_specific.h"
#include "extensions/browser/app_sorting.h"
Expand Down Expand Up @@ -61,4 +61,4 @@ class ShellAppSorting : public extensions::AppSorting {

} // namespace apps

#endif // APPS_SHELL_SHELL_APP_SORTING_H_
#endif // APPS_SHELL_BROWSER_SHELL_APP_SORTING_H_
Original file line number Diff line number Diff line change
Expand Up @@ -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/shell_browser_context.h"
#include "apps/shell/browser/shell_browser_context.h"

namespace apps {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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_SHELL_BROWSER_CONTEXT_H_
#define APPS_SHELL_SHELL_BROWSER_CONTEXT_H_
#ifndef APPS_SHELL_BROWSER_SHELL_BROWSER_CONTEXT_H_
#define APPS_SHELL_BROWSER_SHELL_BROWSER_CONTEXT_H_

#include "base/compiler_specific.h"
#include "content/shell/browser/shell_browser_context.h"
Expand Down Expand Up @@ -41,4 +41,4 @@ class ShellBrowserContext : public content::ShellBrowserContext {

} // namespace apps

#endif // APPS_SHELL_SHELL_BROWSER_CONTEXT_H_
#endif // APPS_SHELL_BROWSER_SHELL_BROWSER_CONTEXT_H_
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
// 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_main_parts.h"
#include "apps/shell/browser/shell_browser_main_parts.h"

#include "apps/shell/shell_browser_context.h"
#include "apps/shell/shell_extension_system.h"
#include "apps/shell/shell_extensions_browser_client.h"
#include "apps/shell/shell_extensions_client.h"
#include "apps/shell/web_view_window.h"
#include "apps/shell/browser/shell_browser_context.h"
#include "apps/shell/browser/shell_extension_system.h"
#include "apps/shell/browser/shell_extensions_browser_client.h"
#include "apps/shell/browser/web_view_window.h"
#include "apps/shell/common/shell_extensions_client.h"
#include "base/command_line.h"
#include "base/file_util.h"
#include "base/files/file_path.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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_SHELL_BROWSER_MAIN_PARTS_H_
#define APPS_SHELL_SHELL_BROWSER_MAIN_PARTS_H_
#ifndef APPS_SHELL_BROWSER_SHELL_BROWSER_MAIN_PARTS_H_
#define APPS_SHELL_BROWSER_SHELL_BROWSER_MAIN_PARTS_H_

#include "base/basictypes.h"
#include "base/compiler_specific.h"
Expand Down Expand Up @@ -91,4 +91,4 @@ class ShellBrowserMainParts : public content::BrowserMainParts,

} // namespace apps

#endif // APPS_SHELL_SHELL_BROWSER_MAIN_PARTS_H_
#endif // APPS_SHELL_BROWSER_SHELL_BROWSER_MAIN_PARTS_H_
Original file line number Diff line number Diff line change
Expand Up @@ -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/shell_content_browser_client.h"
#include "apps/shell/browser/shell_content_browser_client.h"

#include "apps/shell/shell_browser_context.h"
#include "apps/shell/shell_browser_main_parts.h"
#include "apps/shell/shell_extension_system.h"
#include "apps/shell/browser/shell_browser_context.h"
#include "apps/shell/browser/shell_browser_main_parts.h"
#include "apps/shell/browser/shell_extension_system.h"
#include "base/command_line.h"
#include "chrome/browser/extensions/extension_protocols.h"
#include "chrome/browser/extensions/extension_resource_protocols.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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_SHELL_CONTENT_BROWSER_CLIENT_H_
#define APPS_SHELL_SHELL_CONTENT_BROWSER_CLIENT_H_
#ifndef APPS_SHELL_BROWSER_SHELL_CONTENT_BROWSER_CLIENT_H_
#define APPS_SHELL_BROWSER_SHELL_CONTENT_BROWSER_CLIENT_H_

#include "base/compiler_specific.h"
#include "content/public/browser/content_browser_client.h"
Expand Down Expand Up @@ -54,4 +54,4 @@ class ShellContentBrowserClient : public content::ContentBrowserClient {

} // namespace apps

#endif // APPS_SHELL_SHELL_CONTENT_BROWSER_CLIENT_H_
#endif // APPS_SHELL_BROWSER_SHELL_CONTENT_BROWSER_CLIENT_H_
Original file line number Diff line number Diff line change
Expand Up @@ -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/shell_extension_system.h"
#include "apps/shell/browser/shell_extension_system.h"

#include <string>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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_SHELL_EXTENSION_SYSTEM_H_
#define APPS_SHELL_SHELL_EXTENSION_SYSTEM_H_
#ifndef APPS_SHELL_BROWSER_SHELL_EXTENSION_SYSTEM_H_
#define APPS_SHELL_BROWSER_SHELL_EXTENSION_SYSTEM_H_

#include <vector>

Expand Down Expand Up @@ -89,4 +89,4 @@ class ShellExtensionSystem : public ExtensionSystem {

} // namespace extensions

#endif // APPS_SHELL_SHELL_EXTENSION_SYSTEM_H_
#endif // APPS_SHELL_BROWSER_SHELL_EXTENSION_SYSTEM_H_
Original file line number Diff line number Diff line change
Expand Up @@ -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/shell_extensions_browser_client.h"
#include "apps/shell/browser/shell_extensions_browser_client.h"

#include "apps/shell/shell_app_sorting.h"
#include "apps/shell/shell_extension_system.h"
#include "apps/shell/browser/shell_app_sorting.h"
#include "apps/shell/browser/shell_extension_system.h"
#include "base/prefs/pref_service.h"
#include "base/prefs/pref_service_factory.h"
#include "base/prefs/testing_pref_store.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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_SHELL_EXTENSIONS_BROWSER_CLIENT_H_
#define APPS_SHELL_SHELL_EXTENSIONS_BROWSER_CLIENT_H_
#ifndef APPS_SHELL_BROWSER_SHELL_EXTENSIONS_BROWSER_CLIENT_H_
#define APPS_SHELL_BROWSER_SHELL_EXTENSIONS_BROWSER_CLIENT_H_

#include "base/compiler_specific.h"
#include "extensions/browser/extensions_browser_client.h"
Expand Down Expand Up @@ -63,4 +63,4 @@ class ShellExtensionsBrowserClient : public ExtensionsBrowserClient {

} // namespace extensions

#endif // APPS_SHELL_SHELL_EXTENSIONS_BROWSER_CLIENT_H_
#endif // APPS_SHELL_BROWSER_SHELL_EXTENSIONS_BROWSER_CLIENT_H_
Original file line number Diff line number Diff line change
Expand Up @@ -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/web_view_window.h"
#include "apps/shell/browser/web_view_window.h"

#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_view.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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_WEB_VIEW_WINDOW_H_
#define APPS_SHELL_WEB_VIEW_WINDOW_H_
#ifndef APPS_SHELL_BROWSER_WEB_VIEW_WINDOW_H_
#define APPS_SHELL_BROWSER_WEB_VIEW_WINDOW_H_

namespace aura {
class Window;
Expand All @@ -21,4 +21,4 @@ void ShowWebViewWindow(content::BrowserContext* browser_context,

} // namespace apps

#endif // APPS_SHELL_WEB_VIEW_WINDOW_H_
#endif // APPS_SHELL_BROWSER_WEB_VIEW_WINDOW_H_
13 changes: 13 additions & 0 deletions apps/shell/common/DEPS
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
include_rules = [
# TODO(jamescook): Remove these. http://crbug.com/305404
# Chrome pieces for app_shell bring-up.
"+chrome/common/extensions/features/base_feature_provider.h",
"+chrome/common/extensions/permissions/chrome_api_permissions.h",

# Override apps/DEPS to be more selective about content includes.
"-content",
"+content/public/common",
"+content/public/test",

"+webkit/common/user_agent/user_agent_util.h",
]
Original file line number Diff line number Diff line change
Expand Up @@ -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/shell_content_client.h"
#include "apps/shell/common/shell_content_client.h"

#include "base/strings/string_piece.h"
#include "base/strings/utf_string_conversions.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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_SHELL_CONTENT_CLIENT_H_
#define APPS_SHELL_SHELL_CONTENT_CLIENT_H_
#ifndef APPS_SHELL_COMMON_SHELL_CONTENT_CLIENT_H_
#define APPS_SHELL_COMMON_SHELL_CONTENT_CLIENT_H_

#include "base/compiler_specific.h"
#include "content/public/common/content_client.h"
Expand All @@ -30,4 +30,4 @@ class ShellContentClient : public content::ContentClient {

} // namespace apps

#endif // APPS_SHELL_SHELL_CONTENT_CLIENT_H_
#endif // APPS_SHELL_COMMON_SHELL_CONTENT_CLIENT_H_
Loading

0 comments on commit a424119

Please sign in to comment.