diff options
author | ben <ben@chromium.org> | 2015-09-25 16:12:53 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-09-25 23:13:57 +0000 |
commit | f97b2571626e6a54a322515d80bc04de0172d867 (patch) | |
tree | 851b29c6d336ecf613244dcbb25c195e188f43fa /ash | |
parent | c1bcbb8b466fa2e8b249af6dd2d20016d89a60a3 (diff) | |
download | chromium_src-f97b2571626e6a54a322515d80bc04de0172d867.zip chromium_src-f97b2571626e6a54a322515d80bc04de0172d867.tar.gz chromium_src-f97b2571626e6a54a322515d80bc04de0172d867.tar.bz2 |
Move some files around in ash in preparation for splitting content stuff some more.
TBR=sky@chromium.org
http://crbug.com/332504
Review URL: https://codereview.chromium.org/1363643004
Cr-Commit-Position: refs/heads/master@{#350941}
Diffstat (limited to 'ash')
-rw-r--r-- | ash/BUILD.gn | 32 | ||||
-rw-r--r-- | ash/ash.gyp | 60 | ||||
-rw-r--r-- | ash/content/DEPS (renamed from ash/content_support/DEPS) | 0 | ||||
-rw-r--r-- | ash/content/ash_with_content_export.h (renamed from ash/content_support/ash_with_content_export.h) | 6 | ||||
-rw-r--r-- | ash/content/gpu_support_impl.cc (renamed from ash/content_support/gpu_support_impl.cc) | 10 | ||||
-rw-r--r-- | ash/content/gpu_support_impl.h (renamed from ash/content_support/gpu_support_impl.h) | 8 | ||||
-rw-r--r-- | ash/keyboard_overlay/keyboard_overlay_delegate.h | 2 | ||||
-rw-r--r-- | ash/keyboard_overlay/keyboard_overlay_view.h | 2 | ||||
-rw-r--r-- | ash/shell/content/client/DEPS (renamed from ash/shell/content_client/DEPS) | 0 | ||||
-rw-r--r-- | ash/shell/content/client/shell_browser_main_parts.cc (renamed from ash/shell/content_client/shell_browser_main_parts.cc) | 16 | ||||
-rw-r--r-- | ash/shell/content/client/shell_browser_main_parts.h (renamed from ash/shell/content_client/shell_browser_main_parts.h) | 3 | ||||
-rw-r--r-- | ash/shell/content/client/shell_content_browser_client.cc (renamed from ash/shell/content_client/shell_content_browser_client.cc) | 12 | ||||
-rw-r--r-- | ash/shell/content/client/shell_content_browser_client.h (renamed from ash/shell/content_client/shell_content_browser_client.h) | 0 | ||||
-rw-r--r-- | ash/shell/content/client/shell_main_delegate.cc (renamed from ash/shell/content_client/shell_main_delegate.cc) | 10 | ||||
-rw-r--r-- | ash/shell/content/client/shell_main_delegate.h (renamed from ash/shell/content_client/shell_main_delegate.h) | 0 | ||||
-rw-r--r-- | ash/shell/content/shell_main_parts.cc (renamed from ash/shell/shell_main_parts.cc) | 2 | ||||
-rw-r--r-- | ash/shell/content/shell_main_parts.h (renamed from ash/shell/shell_main_parts.h) | 6 | ||||
-rw-r--r-- | ash/shell/content/shell_with_content_main.cc (renamed from ash/shell/shell_main.cc) | 2 |
18 files changed, 89 insertions, 82 deletions
diff --git a/ash/BUILD.gn b/ash/BUILD.gn index 50f56ae..2fa9274 100644 --- a/ash/BUILD.gn +++ b/ash/BUILD.gn @@ -138,15 +138,7 @@ component("ash") { } component("ash_with_content") { - sources = [ - "content_support/ash_with_content_export.h", - "content_support/gpu_support_impl.cc", - "content_support/gpu_support_impl.h", - "keyboard_overlay/keyboard_overlay_delegate.cc", - "keyboard_overlay/keyboard_overlay_delegate.h", - "keyboard_overlay/keyboard_overlay_view.cc", - "keyboard_overlay/keyboard_overlay_view.h", - ] + sources = gypi_values.ash_with_content_sources defines = [ "ASH_WITH_CONTENT_IMPLEMENTATION" ] @@ -245,9 +237,6 @@ static_library("ash_shell_lib") { "//base", "//base:i18n", - #"//chrome:packed_resources", TODO(GYP) - "//content", - "//content/shell:content_shell_lib", "//net", "//skia", "//third_party/icu", @@ -270,6 +259,19 @@ static_library("ash_shell_lib") { ] } +static_library("ash_shell_lib_with_content") { + testonly = true + sources = gypi_values.ash_shell_with_content_lib_sources + + deps = [ + #"//chrome:packed_resources", TODO(GYP) + "//content", + "//content/shell:content_shell_lib", + ":ash_shell_lib", + "//skia", + ] +} + test("ash_unittests") { sources = gypi_values.ash_unittests_sources configs += [ "//build/config:precompiled_headers" ] @@ -376,14 +378,14 @@ test("ash_unittests") { } } -executable("ash_shell") { +executable("ash_shell_with_content") { testonly = true sources = [ - "shell/shell_main.cc", + "shell/content/shell_with_content_main.cc", ] deps = [ - ":ash_shell_lib", + ":ash_shell_lib_with_content", "//build/config/sanitizers:deps", "//components/user_manager", ] diff --git a/ash/ash.gyp b/ash/ash.gyp index 2cce476..0b5c98a 100644 --- a/ash/ash.gyp +++ b/ash/ash.gyp @@ -674,6 +674,15 @@ 'wm/workspace_controller.cc', 'wm/workspace_controller.h', ], + 'ash_with_content_sources': [ + 'content/ash_with_content_export.h', + 'content/gpu_support_impl.cc', + 'content/gpu_support_impl.h', + 'keyboard_overlay/keyboard_overlay_delegate.cc', + 'keyboard_overlay/keyboard_overlay_delegate.h', + 'keyboard_overlay/keyboard_overlay_view.cc', + 'keyboard_overlay/keyboard_overlay_view.h', + ], 'ash_test_support_sources': [ 'desktop_background/desktop_background_controller_test_api.cc', 'desktop_background/desktop_background_controller_test_api.h', @@ -754,12 +763,6 @@ '../ui/views/test/test_views_delegate_aura.cc', 'shell/app_list.cc', 'shell/bubble.cc', - 'shell/content_client/shell_browser_main_parts.cc', - 'shell/content_client/shell_browser_main_parts.h', - 'shell/content_client/shell_content_browser_client.cc', - 'shell/content_client/shell_content_browser_client.h', - 'shell/content_client/shell_main_delegate.cc', - 'shell/content_client/shell_main_delegate.h', 'shell/context_menu.cc', 'shell/context_menu.h', 'shell/example_factory.h', @@ -772,8 +775,6 @@ 'shell/shelf_delegate_impl.h', 'shell/shell_delegate_impl.cc', 'shell/shell_delegate_impl.h', - 'shell/shell_main_parts.cc', - 'shell/shell_main_parts.h', 'shell/toplevel_window.cc', 'shell/toplevel_window.h', 'shell/widgets.cc', @@ -784,6 +785,16 @@ 'shell/window_watcher_shelf_item_delegate.cc', 'shell/window_watcher_shelf_item_delegate.h', ], + 'ash_shell_with_content_lib_sources': [ + 'shell/content/client/shell_browser_main_parts.cc', + 'shell/content/client/shell_browser_main_parts.h', + 'shell/content/client/shell_content_browser_client.cc', + 'shell/content/client/shell_content_browser_client.h', + 'shell/content/client/shell_main_delegate.cc', + 'shell/content/client/shell_main_delegate.h', + 'shell/content/shell_main_parts.cc', + 'shell/content/shell_main_parts.h', + ], 'ash_unittests_sources': [ 'accelerators/accelerator_commands_unittest.cc', 'accelerators/accelerator_controller_unittest.cc', @@ -1060,14 +1071,7 @@ 'ASH_WITH_CONTENT_IMPLEMENTATION', ], 'sources': [ - # Note: sources list duplicated in GN build. - 'content_support/ash_with_content_export.h', - 'content_support/gpu_support_impl.cc', - 'content_support/gpu_support_impl.h', - 'keyboard_overlay/keyboard_overlay_delegate.cc', - 'keyboard_overlay/keyboard_overlay_delegate.h', - 'keyboard_overlay/keyboard_overlay_view.cc', - 'keyboard_overlay/keyboard_overlay_view.h', + '<@(ash_with_content_sources)', ], }, { @@ -1238,8 +1242,6 @@ '../base/base.gyp:base', '../base/base.gyp:base_i18n', '../chrome/chrome_resources.gyp:packed_resources', - '../content/content_shell_and_tests.gyp:content_shell_lib', - '../content/content.gyp:content', '../skia/skia.gyp:skia', '../third_party/icu/icu.gyp:icui18n', '../third_party/icu/icu.gyp:icuuc', @@ -1267,6 +1269,20 @@ 'sources': [ '<@(ash_shell_lib_sources)', ], + }, + { + # GN version: //ash:ash_shell_lib_with_content + 'target_name': 'ash_shell_lib_with_content', + 'type': 'static_library', + 'dependencies': [ + 'ash_shell_lib', + '../content/content_shell_and_tests.gyp:content_shell_lib', + '../content/content.gyp:content', + '../skia/skia.gyp:skia', + ], + 'sources': [ + '<@(ash_shell_with_content_lib_sources)', + ], 'conditions': [ ['OS=="win"', { 'dependencies': [ @@ -1276,15 +1292,15 @@ ], }, { - # GN version: //ash:ash_shell - 'target_name': 'ash_shell', + # GN version: //ash:ash_shell_with_content + 'target_name': 'ash_shell_with_content', 'type': 'executable', 'dependencies': [ - 'ash_shell_lib', + 'ash_shell_lib_with_content', '../components/components.gyp:user_manager', ], 'sources': [ - 'shell/shell_main.cc', + 'shell/content/shell_with_content_main.cc', ], 'conditions': [ ['OS=="win"', { diff --git a/ash/content_support/DEPS b/ash/content/DEPS index 5ed73eb..5ed73eb 100644 --- a/ash/content_support/DEPS +++ b/ash/content/DEPS diff --git a/ash/content_support/ash_with_content_export.h b/ash/content/ash_with_content_export.h index 155b0b3..65179a6 100644 --- a/ash/content_support/ash_with_content_export.h +++ b/ash/content/ash_with_content_export.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 ASH_CONTENT_SUPPORT_ASH_WITH_CONTENT_EXPORT_H_ -#define ASH_CONTENT_SUPPORT_ASH_WITH_CONTENT_EXPORT_H_ +#ifndef ASH_CONTENT_ASH_WITH_CONTENT_EXPORT_H_ +#define ASH_CONTENT_ASH_WITH_CONTENT_EXPORT_H_ // Defines ASH_EXPORT so that functionality implemented by the Ash module can // be exported to consumers. @@ -29,4 +29,4 @@ #define ASH_WITH_CONTENT_EXPORT #endif -#endif // ASH_CONTENT_SUPPORT_ASH_WITH_CONTENT_EXPORT_H_ +#endif // ASH_CONTENT_ASH_WITH_CONTENT_EXPORT_H_ diff --git a/ash/content_support/gpu_support_impl.cc b/ash/content/gpu_support_impl.cc index d425d89..7131821 100644 --- a/ash/content_support/gpu_support_impl.cc +++ b/ash/content/gpu_support_impl.cc @@ -2,18 +2,16 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ash/content_support/gpu_support_impl.h" +#include "ash/content/gpu_support_impl.h" #include "content/public/browser/gpu_data_manager.h" #include "gpu/config/gpu_feature_type.h" namespace ash { -GPUSupportImpl::GPUSupportImpl() { -} +GPUSupportImpl::GPUSupportImpl() {} -GPUSupportImpl::~GPUSupportImpl() { -} +GPUSupportImpl::~GPUSupportImpl() {} bool GPUSupportImpl::IsPanelFittingDisabled() const { return content::GpuDataManager::GetInstance()->IsFeatureBlacklisted( @@ -25,7 +23,7 @@ void GPUSupportImpl::DisableGpuWatchdog() { } void GPUSupportImpl::GetGpuProcessHandles( - const GetGpuProcessHandlesCallback& callback) const { + const GetGpuProcessHandlesCallback& callback) const { content::GpuDataManager::GetInstance()->GetGpuProcessHandles(callback); } diff --git a/ash/content_support/gpu_support_impl.h b/ash/content/gpu_support_impl.h index 138bb8d..f1c1572 100644 --- a/ash/content_support/gpu_support_impl.h +++ b/ash/content/gpu_support_impl.h @@ -2,10 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef ASH_CONTENT_SUPPORT_GPU_SUPPORT_IMPL_H_ -#define ASH_CONTENT_SUPPORT_GPU_SUPPORT_IMPL_H_ +#ifndef ASH_CONTENT_GPU_SUPPORT_IMPL_H_ +#define ASH_CONTENT_GPU_SUPPORT_IMPL_H_ -#include "ash/content_support/ash_with_content_export.h" +#include "ash/content/ash_with_content_export.h" #include "ash/gpu_support.h" namespace ash { @@ -28,4 +28,4 @@ class ASH_WITH_CONTENT_EXPORT GPUSupportImpl : public GPUSupport { } // namespace ash -#endif // ASH_CONTENT_SUPPORT_GPU_SUPPORT_IMPL_H_ +#endif // ASH_CONTENT_GPU_SUPPORT_IMPL_H_ diff --git a/ash/keyboard_overlay/keyboard_overlay_delegate.h b/ash/keyboard_overlay/keyboard_overlay_delegate.h index ef92dea..eebc044 100644 --- a/ash/keyboard_overlay/keyboard_overlay_delegate.h +++ b/ash/keyboard_overlay/keyboard_overlay_delegate.h @@ -5,7 +5,7 @@ #ifndef ASH_KEYBOARD_OVERLAY_KEYBOARD_OVERLAY_DELEGATE_H_ #define ASH_KEYBOARD_OVERLAY_KEYBOARD_OVERLAY_DELEGATE_H_ -#include "ash/content_support/ash_with_content_export.h" +#include "ash/content/ash_with_content_export.h" #include "base/basictypes.h" #include "base/compiler_specific.h" #include "base/gtest_prod_util.h" diff --git a/ash/keyboard_overlay/keyboard_overlay_view.h b/ash/keyboard_overlay/keyboard_overlay_view.h index d7a473f..99d0354 100644 --- a/ash/keyboard_overlay/keyboard_overlay_view.h +++ b/ash/keyboard_overlay/keyboard_overlay_view.h @@ -7,7 +7,7 @@ #include <vector> -#include "ash/content_support/ash_with_content_export.h" +#include "ash/content/ash_with_content_export.h" #include "ash/wm/overlay_event_filter.h" #include "base/compiler_specific.h" #include "base/gtest_prod_util.h" diff --git a/ash/shell/content_client/DEPS b/ash/shell/content/client/DEPS index f71262e..f71262e 100644 --- a/ash/shell/content_client/DEPS +++ b/ash/shell/content/client/DEPS diff --git a/ash/shell/content_client/shell_browser_main_parts.cc b/ash/shell/content/client/shell_browser_main_parts.cc index 1845c76..af1f5cc 100644 --- a/ash/shell/content_client/shell_browser_main_parts.cc +++ b/ash/shell/content/client/shell_browser_main_parts.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 "ash/shell/content_client/shell_browser_main_parts.h" +#include "ash/shell/content/client/shell_browser_main_parts.h" #include "ash/ash_switches.h" #include "ash/desktop_background/desktop_background_controller.h" @@ -79,12 +79,9 @@ class ShellViewsDelegate : public views::TestViewsDelegate { ShellBrowserMainParts::ShellBrowserMainParts( const content::MainFunctionParams& parameters) - : BrowserMainParts(), - delegate_(NULL) { -} + : BrowserMainParts(), delegate_(NULL) {} -ShellBrowserMainParts::~ShellBrowserMainParts() { -} +ShellBrowserMainParts::~ShellBrowserMainParts() {} void ShellBrowserMainParts::PreMainMessageLoopStart() { #if defined(USE_X11) @@ -104,8 +101,8 @@ void ShellBrowserMainParts::ToolkitInitialized() { void ShellBrowserMainParts::PreMainMessageLoopRun() { net_log_.reset(new content::ShellNetLog("ash_shell")); - browser_context_.reset(new content::ShellBrowserContext( - false, net_log_.get())); + browser_context_.reset( + new content::ShellBrowserContext(false, net_log_.get())); // A ViewsDelegate is required. if (!views::ViewsDelegate::GetInstance()) @@ -128,8 +125,7 @@ void ShellBrowserMainParts::PreMainMessageLoopRun() { ash::Shell::CreateInstance(init_params); delegate_->set_browser_context(browser_context_.get()); ash::Shell::GetInstance()->CreateShelf(); - ash::Shell::GetInstance()->UpdateAfterLoginStatusChange( - user::LOGGED_IN_USER); + ash::Shell::GetInstance()->UpdateAfterLoginStatusChange(user::LOGGED_IN_USER); window_watcher_.reset(new ash::shell::WindowWatcher); gfx::Screen* screen = Shell::GetInstance()->GetScreen(); diff --git a/ash/shell/content_client/shell_browser_main_parts.h b/ash/shell/content/client/shell_browser_main_parts.h index 539354e..8b0c374 100644 --- a/ash/shell/content_client/shell_browser_main_parts.h +++ b/ash/shell/content/client/shell_browser_main_parts.h @@ -38,8 +38,7 @@ class WindowWatcher; class ShellBrowserMainParts : public content::BrowserMainParts { public: - explicit ShellBrowserMainParts( - const content::MainFunctionParams& parameters); + explicit ShellBrowserMainParts(const content::MainFunctionParams& parameters); ~ShellBrowserMainParts() override; // Overridden from content::BrowserMainParts: diff --git a/ash/shell/content_client/shell_content_browser_client.cc b/ash/shell/content/client/shell_content_browser_client.cc index d75e759..287b596 100644 --- a/ash/shell/content_client/shell_content_browser_client.cc +++ b/ash/shell/content/client/shell_content_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 "ash/shell/content_client/shell_content_browser_client.h" +#include "ash/shell/content/client/shell_content_browser_client.h" -#include "ash/shell/content_client/shell_browser_main_parts.h" +#include "ash/shell/content/client/shell_browser_main_parts.h" #include "base/command_line.h" #include "content/shell/browser/shell_browser_context.h" #include "third_party/skia/include/core/SkBitmap.h" @@ -13,15 +13,13 @@ namespace ash { namespace shell { ShellContentBrowserClient::ShellContentBrowserClient() - : shell_browser_main_parts_(nullptr) { -} + : shell_browser_main_parts_(nullptr) {} -ShellContentBrowserClient::~ShellContentBrowserClient() { -} +ShellContentBrowserClient::~ShellContentBrowserClient() {} content::BrowserMainParts* ShellContentBrowserClient::CreateBrowserMainParts( const content::MainFunctionParams& parameters) { - shell_browser_main_parts_ = new ShellBrowserMainParts(parameters); + shell_browser_main_parts_ = new ShellBrowserMainParts(parameters); return shell_browser_main_parts_; } diff --git a/ash/shell/content_client/shell_content_browser_client.h b/ash/shell/content/client/shell_content_browser_client.h index 1a5eb44..1a5eb44 100644 --- a/ash/shell/content_client/shell_content_browser_client.h +++ b/ash/shell/content/client/shell_content_browser_client.h diff --git a/ash/shell/content_client/shell_main_delegate.cc b/ash/shell/content/client/shell_main_delegate.cc index 3bb7e63..c6e596e 100644 --- a/ash/shell/content_client/shell_main_delegate.cc +++ b/ash/shell/content/client/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 "ash/shell/content_client/shell_main_delegate.h" +#include "ash/shell/content/client/shell_main_delegate.h" -#include "ash/shell/content_client/shell_content_browser_client.h" +#include "ash/shell/content/client/shell_content_browser_client.h" #include "base/command_line.h" #include "content/public/common/content_switches.h" #include "ui/base/resource/resource_bundle.h" @@ -12,11 +12,9 @@ namespace ash { namespace shell { -ShellMainDelegate::ShellMainDelegate() { -} +ShellMainDelegate::ShellMainDelegate() {} -ShellMainDelegate::~ShellMainDelegate() { -} +ShellMainDelegate::~ShellMainDelegate() {} bool ShellMainDelegate::BasicStartupComplete(int* exit_code) { const base::CommandLine& command_line = diff --git a/ash/shell/content_client/shell_main_delegate.h b/ash/shell/content/client/shell_main_delegate.h index 7daf1fa..7daf1fa 100644 --- a/ash/shell/content_client/shell_main_delegate.h +++ b/ash/shell/content/client/shell_main_delegate.h diff --git a/ash/shell/shell_main_parts.cc b/ash/shell/content/shell_main_parts.cc index 0de3d31..d99635e 100644 --- a/ash/shell/shell_main_parts.cc +++ b/ash/shell/content/shell_main_parts.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 "ash/shell/shell_main_parts.h" +#include "ash/shell/content/shell_main_parts.h" #include "base/i18n/icu_util.h" #include "ui/base/resource/resource_bundle.h" diff --git a/ash/shell/shell_main_parts.h b/ash/shell/content/shell_main_parts.h index c0452e9..55f1b11f 100644 --- a/ash/shell/shell_main_parts.h +++ b/ash/shell/content/shell_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 ASH_SHELL_SHELL_MAIN_PARTS_H_ -#define ASH_SHELL_SHELL_MAIN_PARTS_H_ +#ifndef ASH_SHELL_CONTENT_SHELL_MAIN_PARTS_H_ +#define ASH_SHELL_CONTENT_SHELL_MAIN_PARTS_H_ namespace ash { namespace shell { @@ -14,4 +14,4 @@ void PreMainMessageLoopStart(); } // namespace shell } // namespace ash -#endif // ASH_SHELL_SHELL_MAIN_PARTS_H_ +#endif // ASH_SHELL_CONTENT_SHELL_MAIN_PARTS_H_ diff --git a/ash/shell/shell_main.cc b/ash/shell/content/shell_with_content_main.cc index 6c26140..fad3bdf 100644 --- a/ash/shell/shell_main.cc +++ b/ash/shell/content/shell_with_content_main.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 "ash/shell/content_client/shell_main_delegate.h" +#include "ash/shell/content/client/shell_main_delegate.h" #include "base/at_exit.h" #include "base/command_line.h" #include "base/files/file_path.h" |