diff options
-rw-r--r-- | app/DEPS | 3 | ||||
-rw-r--r-- | app/app.vcproj | 598 | ||||
-rw-r--r-- | app/gfx/icon_util_unittest.cc | 4 | ||||
-rw-r--r-- | app/l10n_util.cc | 4 | ||||
-rw-r--r-- | app/l10n_util_unittest.cc | 8 | ||||
-rw-r--r-- | app/resource_bundle_linux.cc | 8 | ||||
-rw-r--r-- | app/resource_bundle_win.cc | 6 | ||||
-rw-r--r-- | app/test/data/icon_util/128_X_128_icon.ico (renamed from chrome/test/data/icon_util/128_X_128_icon.ico) | bin | 67646 -> 67646 bytes | |||
-rw-r--r-- | app/test/data/icon_util/16_X_16_icon.ico (renamed from chrome/test/data/icon_util/16_X_16_icon.ico) | bin | 1150 -> 1150 bytes | |||
-rw-r--r-- | chrome/app/chrome_dll_main.cc | 2 | ||||
-rw-r--r-- | chrome/common/chrome_paths.cc | 19 | ||||
-rw-r--r-- | chrome/common/chrome_paths.h | 2 | ||||
-rw-r--r-- | views/DEPS | 1 |
13 files changed, 320 insertions, 335 deletions
@@ -4,8 +4,5 @@ include_rules = [ "+grit/locale_settings.h", "+grit/theme_resources.h", "+net", - # TODO(beng): Sever these links once we have extracted all deps from - # chrome/common. - "+chrome/common/chrome_paths.h", "+skia", ] diff --git a/app/app.vcproj b/app/app.vcproj index 92b555c..f54461a 100644 --- a/app/app.vcproj +++ b/app/app.vcproj @@ -1,295 +1,303 @@ -<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="app"
- ProjectGUID="{4631946D-7D5F-44BD-A5A8-504C0A7033BE}"
- RootNamespace="app"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="4"
- InheritedPropertySheets=".\app.vsprops;$(SolutionDir)..\build\debug.vsprops"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="4"
- InheritedPropertySheets=".\app.vsprops;$(SolutionDir)..\build\release.vsprops"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="gfx"
- >
- <File
- RelativePath=".\gfx\canvas.cc"
- >
- </File>
- <File
- RelativePath=".\gfx\canvas.h"
- >
- </File>
- <File
- RelativePath=".\gfx\canvas_win.cc"
- >
- </File>
- <File
- RelativePath=".\gfx\color_utils.cc"
- >
- </File>
- <File
- RelativePath=".\gfx\color_utils.h"
- >
- </File>
- <File
- RelativePath=".\gfx\favicon_size.h"
- >
- </File>
- <File
- RelativePath=".\gfx\font.h"
- >
- </File>
- <File
- RelativePath=".\gfx\font_win.cc"
- >
- </File>
- <File
- RelativePath=".\gfx\icon_util.cc"
- >
- </File>
- <File
- RelativePath=".\gfx\icon_util.h"
- >
- </File>
- <File
- RelativePath=".\gfx\insets.h"
- >
- </File>
- <File
- RelativePath=".\gfx\path.h"
- >
- </File>
- <File
- RelativePath=".\gfx\path_win.cc"
- >
- </File>
- <File
- RelativePath=".\gfx\text_elider.cc"
- >
- </File>
- <File
- RelativePath=".\gfx\text_elider.h"
- >
- </File>
- </Filter>
- <File
- RelativePath=".\animation.cc"
- >
- </File>
- <File
- RelativePath=".\animation.h"
- >
- </File>
- <File
- RelativePath=".\app_switches.cc"
- >
- </File>
- <File
- RelativePath=".\app_switches.h"
- >
- </File>
- <File
- RelativePath=".\drag_drop_types.cc"
- >
- </File>
- <File
- RelativePath=".\drag_drop_types.h"
- >
- </File>
- <File
- RelativePath=".\l10n_util.cc"
- >
- </File>
- <File
- RelativePath=".\l10n_util.h"
- >
- </File>
- <File
- RelativePath=".\l10n_util_win.cc"
- >
- </File>
- <File
- RelativePath=".\l10n_util_win.h"
- >
- </File>
- <File
- RelativePath=".\message_box_flags.h"
- >
- </File>
- <File
- RelativePath=".\os_exchange_data.h"
- >
- </File>
- <File
- RelativePath=".\os_exchange_data_win.cc"
- >
- </File>
- <File
- RelativePath=".\resource_bundle.cc"
- >
- </File>
- <File
- RelativePath=".\resource_bundle.h"
- >
- </File>
- <File
- RelativePath=".\resource_bundle_win.cc"
- >
- </File>
- <File
- RelativePath=".\slide_animation.cc"
- >
- </File>
- <File
- RelativePath=".\slide_animation.h"
- >
- </File>
- <File
- RelativePath=".\theme_provider.h"
- >
- </File>
- <File
- RelativePath=".\throb_animation.cc"
- >
- </File>
- <File
- RelativePath=".\throb_animation.h"
- >
- </File>
- <File
- RelativePath=".\tree_model.h"
- >
- </File>
- <File
- RelativePath=".\tree_node_iterator.h"
- >
- </File>
- <File
- RelativePath=".\tree_node_model.h"
- >
- </File>
- <File
- RelativePath=".\win_util.cc"
- >
- </File>
- <File
- RelativePath=".\win_util.h"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
+<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8.00" + Name="app" + ProjectGUID="{4631946D-7D5F-44BD-A5A8-504C0A7033BE}" + RootNamespace="app" + Keyword="Win32Proj" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + ConfigurationType="4" + InheritedPropertySheets=".\app.vsprops;$(SolutionDir)..\build\debug.vsprops" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLibrarianTool" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + ConfigurationType="4" + InheritedPropertySheets=".\app.vsprops;$(SolutionDir)..\build\release.vsprops" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLibrarianTool" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="gfx" + > + <File + RelativePath=".\gfx\canvas.cc" + > + </File> + <File + RelativePath=".\gfx\canvas.h" + > + </File> + <File + RelativePath=".\gfx\canvas_win.cc" + > + </File> + <File + RelativePath=".\gfx\color_utils.cc" + > + </File> + <File + RelativePath=".\gfx\color_utils.h" + > + </File> + <File + RelativePath=".\gfx\favicon_size.h" + > + </File> + <File + RelativePath=".\gfx\font.h" + > + </File> + <File + RelativePath=".\gfx\font_win.cc" + > + </File> + <File + RelativePath=".\gfx\icon_util.cc" + > + </File> + <File + RelativePath=".\gfx\icon_util.h" + > + </File> + <File + RelativePath=".\gfx\insets.h" + > + </File> + <File + RelativePath=".\gfx\path.h" + > + </File> + <File + RelativePath=".\gfx\path_win.cc" + > + </File> + <File + RelativePath=".\gfx\text_elider.cc" + > + </File> + <File + RelativePath=".\gfx\text_elider.h" + > + </File> + </Filter> + <File + RelativePath=".\animation.cc" + > + </File> + <File + RelativePath=".\animation.h" + > + </File> + <File + RelativePath=".\app_paths.cc" + > + </File> + <File + RelativePath=".\app_paths.h" + > + </File> + <File + RelativePath=".\app_switches.cc" + > + </File> + <File + RelativePath=".\app_switches.h" + > + </File> + <File + RelativePath=".\drag_drop_types.cc" + > + </File> + <File + RelativePath=".\drag_drop_types.h" + > + </File> + <File + RelativePath=".\l10n_util.cc" + > + </File> + <File + RelativePath=".\l10n_util.h" + > + </File> + <File + RelativePath=".\l10n_util_win.cc" + > + </File> + <File + RelativePath=".\l10n_util_win.h" + > + </File> + <File + RelativePath=".\message_box_flags.h" + > + </File> + <File + RelativePath=".\os_exchange_data.h" + > + </File> + <File + RelativePath=".\os_exchange_data_win.cc" + > + </File> + <File + RelativePath=".\resource_bundle.cc" + > + </File> + <File + RelativePath=".\resource_bundle.h" + > + </File> + <File + RelativePath=".\resource_bundle_win.cc" + > + </File> + <File + RelativePath=".\slide_animation.cc" + > + </File> + <File + RelativePath=".\slide_animation.h" + > + </File> + <File + RelativePath=".\theme_provider.h" + > + </File> + <File + RelativePath=".\throb_animation.cc" + > + </File> + <File + RelativePath=".\throb_animation.h" + > + </File> + <File + RelativePath=".\tree_model.h" + > + </File> + <File + RelativePath=".\tree_node_iterator.h" + > + </File> + <File + RelativePath=".\tree_node_model.h" + > + </File> + <File + RelativePath=".\win_util.cc" + > + </File> + <File + RelativePath=".\win_util.h" + > + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/app/gfx/icon_util_unittest.cc b/app/gfx/icon_util_unittest.cc index ed65ca52..27f749d 100644 --- a/app/gfx/icon_util_unittest.cc +++ b/app/gfx/icon_util_unittest.cc @@ -2,12 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "app/app_paths.h" #include "app/gfx/icon_util.h" #include "base/gfx/size.h" #include "base/scoped_ptr.h" #include "base/file_util.h" #include "base/path_service.h" -#include "chrome/common/chrome_paths.h" #include "third_party/skia/include/core/SkBitmap.h" #include "testing/gtest/include/gtest/gtest.h" @@ -20,7 +20,7 @@ namespace { class IconUtilTest : public testing::Test { public: IconUtilTest() { - PathService::Get(chrome::DIR_TEST_DATA, &test_data_directory_); + PathService::Get(app::DIR_TEST_DATA, &test_data_directory_); } ~IconUtilTest() {} diff --git a/app/l10n_util.cc b/app/l10n_util.cc index 611c21a..8791024 100644 --- a/app/l10n_util.cc +++ b/app/l10n_util.cc @@ -6,6 +6,7 @@ #include "app/l10n_util.h" +#include "app/app_paths.h" #include "app/app_switches.h" #include "app/gfx/canvas.h" #include "app/resource_bundle.h" @@ -17,7 +18,6 @@ #include "base/string_piece.h" #include "base/string_util.h" #include "base/sys_string_conversions.h" -#include "chrome/common/chrome_paths.h" #include "unicode/uscript.h" // TODO(playmobil): remove this undef once SkPostConfig.h is fixed. @@ -229,7 +229,7 @@ std::wstring GetApplicationLocale(const std::wstring& pref_locale) { return L"en"; #else FilePath locale_path; - PathService::Get(chrome::DIR_LOCALES, &locale_path); + PathService::Get(app::DIR_LOCALES, &locale_path); std::wstring resolved_locale; // First, check to see if there's a --lang flag. diff --git a/app/l10n_util_unittest.cc b/app/l10n_util_unittest.cc index b1f8c93..3503c096 100644 --- a/app/l10n_util_unittest.cc +++ b/app/l10n_util_unittest.cc @@ -4,6 +4,7 @@ #include "build/build_config.h" +#include "app/app_paths.h" #include "app/l10n_util.h" #if !defined(OS_MACOSX) #include "app/test/data/resource.h" @@ -16,7 +17,6 @@ #if defined(OS_WIN) #include "base/win_util.h" #endif -#include "chrome/common/chrome_paths.h" #include "testing/gtest/include/gtest/gtest.h" #include "testing/platform_test.h" #include "unicode/locid.h" @@ -100,12 +100,12 @@ TEST_F(L10nUtilTest, GetAppLocale) { // Use a temporary locale dir so we don't have to actually build the locale // dlls for this test. FilePath orig_locale_dir; - PathService::Get(chrome::DIR_LOCALES, &orig_locale_dir); + PathService::Get(app::DIR_LOCALES, &orig_locale_dir); FilePath new_locale_dir; EXPECT_TRUE(file_util::CreateNewTempDirectory( FILE_PATH_LITERAL("l10n_util_test"), &new_locale_dir)); - PathService::Override(chrome::DIR_LOCALES, new_locale_dir.ToWStringHack()); + PathService::Override(app::DIR_LOCALES, new_locale_dir.ToWStringHack()); // Make fake locale files. std::string filenames[] = { "en-US", @@ -204,7 +204,7 @@ TEST_F(L10nUtilTest, GetAppLocale) { #endif // Clean up. - PathService::Override(chrome::DIR_LOCALES, orig_locale_dir.ToWStringHack()); + PathService::Override(app::DIR_LOCALES, orig_locale_dir.ToWStringHack()); file_util::Delete(new_locale_dir, true); UErrorCode error_code = U_ZERO_ERROR; Locale::setDefault(locale, error_code); diff --git a/app/resource_bundle_linux.cc b/app/resource_bundle_linux.cc index 6f4b43f..e27c7b6 100644 --- a/app/resource_bundle_linux.cc +++ b/app/resource_bundle_linux.cc @@ -6,6 +6,7 @@ #include <gtk/gtk.h> +#include "app/app_paths.h" #include "app/gfx/font.h" #include "app/gfx/gtk_util.h" #include "app/l10n_util.h" @@ -18,8 +19,7 @@ #include "base/path_service.h" #include "base/string_piece.h" #include "base/string_util.h" -#include "chrome/common/chrome_paths.h" -#include "SkBitmap.h" +#include "third_party/skia/include/core/SkBitmap.h" namespace { @@ -94,7 +94,7 @@ void ResourceBundle::LoadResources(const std::wstring& pref_locale) { FilePath ResourceBundle::GetLocaleFilePath(const std::wstring& pref_locale) { FilePath locale_path; - PathService::Get(chrome::DIR_LOCALES, &locale_path); + PathService::Get(app::DIR_LOCALES, &locale_path); const std::wstring app_locale = l10n_util::GetApplicationLocale(pref_locale); if (app_locale.empty()) @@ -105,7 +105,7 @@ FilePath ResourceBundle::GetLocaleFilePath(const std::wstring& pref_locale) { void ResourceBundle::LoadThemeResources() { FilePath theme_data_path; - PathService::Get(chrome::DIR_THEMES, &theme_data_path); + PathService::Get(app::DIR_THEMES, &theme_data_path); theme_data_path = theme_data_path.Append(FILE_PATH_LITERAL("default.pak")); theme_data_ = new base::DataPack; bool success = theme_data_->Load(theme_data_path); diff --git a/app/resource_bundle_win.cc b/app/resource_bundle_win.cc index 1d0d28f..82f34b0 100644 --- a/app/resource_bundle_win.cc +++ b/app/resource_bundle_win.cc @@ -6,6 +6,7 @@ #include <atlbase.h> +#include "app/app_paths.h" #include "app/gfx/font.h" #include "app/l10n_util.h" #include "base/file_util.h" @@ -14,7 +15,6 @@ #include "base/resource_util.h" #include "base/string_piece.h" #include "base/win_util.h" -#include "chrome/common/chrome_paths.h" namespace { @@ -63,7 +63,7 @@ void ResourceBundle::LoadResources(const std::wstring& pref_locale) { FilePath ResourceBundle::GetLocaleFilePath(const std::wstring& pref_locale) { FilePath locale_path; - PathService::Get(chrome::DIR_LOCALES, &locale_path); + PathService::Get(app::DIR_LOCALES, &locale_path); const std::wstring app_locale = l10n_util::GetApplicationLocale(pref_locale); if (app_locale.empty()) @@ -75,7 +75,7 @@ FilePath ResourceBundle::GetLocaleFilePath(const std::wstring& pref_locale) { void ResourceBundle::LoadThemeResources() { DCHECK(NULL == theme_data_) << "theme dll already loaded"; std::wstring theme_data_path; - PathService::Get(chrome::DIR_THEMES, &theme_data_path); + PathService::Get(app::DIR_THEMES, &theme_data_path); file_util::AppendToPath(&theme_data_path, L"default.dll"); // The dll should only have resources, not executable code. diff --git a/chrome/test/data/icon_util/128_X_128_icon.ico b/app/test/data/icon_util/128_X_128_icon.ico Binary files differindex a5d72fe..a5d72fe 100644 --- a/chrome/test/data/icon_util/128_X_128_icon.ico +++ b/app/test/data/icon_util/128_X_128_icon.ico diff --git a/chrome/test/data/icon_util/16_X_16_icon.ico b/app/test/data/icon_util/16_X_16_icon.ico Binary files differindex 0e524f1..0e524f1 100644 --- a/chrome/test/data/icon_util/16_X_16_icon.ico +++ b/app/test/data/icon_util/16_X_16_icon.ico diff --git a/chrome/app/chrome_dll_main.cc b/chrome/app/chrome_dll_main.cc index be727ef..97e059d 100644 --- a/chrome/app/chrome_dll_main.cc +++ b/chrome/app/chrome_dll_main.cc @@ -29,6 +29,7 @@ #include <string.h> #endif +#include "app/app_paths.h" #include "app/resource_bundle.h" #include "base/at_exit.h" #include "base/command_line.h" @@ -331,6 +332,7 @@ int ChromeMain(int argc, const char** argv) { SetupCRT(parsed_command_line); // Initialize the Chrome path provider. + app::RegisterPathProvider(); chrome::RegisterPathProvider(); // Initialize the Stats Counters table. With this initialized, diff --git a/chrome/common/chrome_paths.cc b/chrome/common/chrome_paths.cc index c1b4ce6..1c307ed 100644 --- a/chrome/common/chrome_paths.cc +++ b/chrome/common/chrome_paths.cc @@ -92,25 +92,6 @@ bool PathProvider(int key, FilePath* result) { cur = cur.Append(FILE_PATH_LITERAL("resources")); cur = cur.Append(FILE_PATH_LITERAL("inspector")); break; - case chrome::DIR_THEMES: - if (!PathService::Get(chrome::DIR_APP, &cur)) - return false; - cur = cur.Append(FILE_PATH_LITERAL("themes")); - create_dir = true; - break; - case chrome::DIR_LOCALES: - if (!PathService::Get(chrome::DIR_APP, &cur)) - return false; -#if defined(OS_MACOSX) - // On Mac, locale files are in Contents/Resources, a sibling of the - // App dir. - cur = cur.DirName(); - cur = cur.Append(FILE_PATH_LITERAL("Resources")); -#else - cur = cur.Append(FILE_PATH_LITERAL("locales")); -#endif - create_dir = true; - break; case chrome::DIR_APP_DICTIONARIES: #if defined(OS_LINUX) // We can't write into the EXE dir on Linux, so keep dictionaries diff --git a/chrome/common/chrome_paths.h b/chrome/common/chrome_paths.h index fe01807..9f5b3cf 100644 --- a/chrome/common/chrome_paths.h +++ b/chrome/common/chrome_paths.h @@ -20,8 +20,6 @@ enum { DIR_USER_DESKTOP, // directory that correspond to the desktop DIR_RESOURCES, // directory where application resources are stored DIR_INSPECTOR, // directory where web inspector is located - DIR_THEMES, // directory where theme dll files are stored - DIR_LOCALES, // directory where locale resources are stored DIR_APP_DICTIONARIES, // directory where the global dictionaries are DIR_USER_DOCUMENTS, // directory for a user's "My Documents" DIR_DEFAULT_DOWNLOADS, // directory for a user's "My Documents/Downloads" @@ -4,5 +4,4 @@ include_rules = [ "+grit/generated_resources.h", "+grit/theme_resources.h", "+skia/ext", - "+skia/include", ] |