diff options
25 files changed, 124 insertions, 31 deletions
diff --git a/app/app.gyp b/app/app.gyp index 2f3b7f5..bcbb26e 100644 --- a/app/app.gyp +++ b/app/app.gyp @@ -43,7 +43,6 @@ 'gfx/codec/png_codec_unittest.cc', 'gfx/color_utils_unittest.cc', 'gfx/font_unittest.cc', - 'gfx/icon_util_unittest.cc', 'gfx/insets_unittest.cc', 'gfx/native_theme_win_unittest.cc', 'gfx/skbitmap_operations_unittest.cc', @@ -72,7 +71,6 @@ }], ['OS!="win"', { 'sources!': [ - 'gfx/icon_util_unittest.cc', 'gfx/native_theme_win_unittest.cc', 'os_exchange_data_win_unittest.cc', 'win_util_unittest.cc', diff --git a/app/app_base.gypi b/app/app_base.gypi index 77ce707..6744070 100644 --- a/app/app_base.gypi +++ b/app/app_base.gypi @@ -73,6 +73,7 @@ 'app_strings', '../base/base.gyp:base', '../base/base.gyp:base_i18n', + '../gfx/gfx.gyp:gfx', '../net/net.gyp:net', '../skia/skia.gyp:skia', '../third_party/icu/icu.gyp:icui18n', @@ -135,8 +136,6 @@ 'gfx/gdi_util.h', 'gfx/gtk_util.cc', 'gfx/gtk_util.h', - 'gfx/icon_util.cc', - 'gfx/icon_util.h', 'gfx/insets.h', 'gfx/insets.cc', 'gfx/native_widget_types.h', diff --git a/build/all.gyp b/build/all.gyp index 51c6525..50a582f 100644 --- a/build/all.gyp +++ b/build/all.gyp @@ -12,6 +12,7 @@ '../app/app.gyp:*', '../base/base.gyp:*', '../chrome/chrome.gyp:*', + '../gfx/gfx.gyp:*', '../ipc/ipc.gyp:*', '../media/media.gyp:*', '../net/net.gyp:*', @@ -139,6 +140,7 @@ 'type': 'none', 'dependencies': [ '../app/app.gyp:app_unittests', + '../gfx/gfx.gyp:gfx_unittests', '../ipc/ipc.gyp:ipc_tests', '../media/media.gyp:media_unittests', '../printing/printing.gyp:printing_unittests', @@ -163,6 +165,7 @@ '../chrome/chrome.gyp:ui_tests', '../chrome/chrome.gyp:unit_tests', '../chrome/chrome.gyp:url_fetch_test', + '../gfx/gfx.gyp:gfx_unittests', '../ipc/ipc.gyp:ipc_tests', '../media/media.gyp:media_unittests', '../printing/printing.gyp:printing_unittests', @@ -211,6 +214,7 @@ '../chrome/installer/mini_installer.gyp:mini_installer', '../chrome/installer/mini_installer.gyp:chrome_frame_mini_installer', '../courgette/courgette.gyp:courgette_unittests', + '../gfx/gfx.gyp:gfx_unittests', '../ipc/ipc.gyp:ipc_tests', '../media/media.gyp:media_unittests', '../printing/printing.gyp:printing_unittests', @@ -253,6 +257,7 @@ '../chrome/chrome.gyp:ui_tests', '../chrome/chrome.gyp:unit_tests', '../chrome/chrome.gyp:url_fetch_test', + '../gfx/gfx.gyp:gfx_unittests', '../ipc/ipc.gyp:ipc_tests', '../media/media.gyp:ffmpeg_tests', '../media/media.gyp:media_unittests', diff --git a/chrome/DEPS b/chrome/DEPS index f8a0e86..8c60a9e 100644 --- a/chrome/DEPS +++ b/chrome/DEPS @@ -1,5 +1,6 @@ include_rules = [ "+app", + "+gfx", "+gpu", "+net", "+printing", diff --git a/chrome/browser/aeropeek_manager.cc b/chrome/browser/aeropeek_manager.cc index ae1dec6..f7f2203 100644 --- a/chrome/browser/aeropeek_manager.cc +++ b/chrome/browser/aeropeek_manager.cc @@ -8,7 +8,6 @@ #include <shobjidl.h> #include "app/gfx/gdi_util.h" -#include "app/gfx/icon_util.h" #include "app/gfx/insets.h" #include "app/win_util.h" #include "app/win/window_impl.h" @@ -29,6 +28,7 @@ #include "chrome/browser/tab_contents/thumbnail_generator.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_switches.h" +#include "gfx/icon_util.h" #include "skia/ext/image_operations.h" #include "skia/ext/platform_canvas.h" #include "third_party/skia/include/core/SkBitmap.h" diff --git a/chrome/browser/icon_loader_win.cc b/chrome/browser/icon_loader_win.cc index 1d47c37..ba24521 100644 --- a/chrome/browser/icon_loader_win.cc +++ b/chrome/browser/icon_loader_win.cc @@ -7,10 +7,10 @@ #include <windows.h> #include <shellapi.h> -#include "app/gfx/icon_util.h" #include "base/gfx/size.h" #include "base/message_loop.h" #include "base/thread.h" +#include "gfx/icon_util.h" void IconLoader::ReadIcon() { int size = 0; diff --git a/chrome/browser/jumplist.cc b/chrome/browser/jumplist.cc index 34ece2a..21c80e1 100644 --- a/chrome/browser/jumplist.cc +++ b/chrome/browser/jumplist.cc @@ -13,7 +13,6 @@ #include <vector> #include "app/gfx/codec/png_codec.h" -#include "app/gfx/icon_util.h" #include "app/l10n_util.h" #include "base/callback.h" #include "base/command_line.h" @@ -34,6 +33,7 @@ #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/url_constants.h" +#include "gfx/icon_util.h" #include "googleurl/src/gurl.h" #include "third_party/skia/include/core/SkBitmap.h" diff --git a/chrome/browser/task_manager_resource_providers.cc b/chrome/browser/task_manager_resource_providers.cc index de40cf3..f1ffefd 100644 --- a/chrome/browser/task_manager_resource_providers.cc +++ b/chrome/browser/task_manager_resource_providers.cc @@ -6,13 +6,6 @@ #include "build/build_config.h" -#if defined(OS_WIN) -#include <atlbase.h> -#endif // defined(OS_WIN) - -#if defined(OS_WIN) -#include "app/gfx/icon_util.h" -#endif // defined(OS_WIN) #include "app/l10n_util.h" #include "app/resource_bundle.h" #include "base/basictypes.h" @@ -44,6 +37,10 @@ #if defined(OS_MACOSX) #include "skia/ext/skia_utils_mac.h" #endif +#if defined(OS_WIN) +#include <atlbase.h> +#include "gfx/icon_util.h" +#endif // defined(OS_WIN) //////////////////////////////////////////////////////////////////////////////// // TaskManagerTabContentsResource class diff --git a/chrome/browser/views/frame/glass_browser_frame_view.cc b/chrome/browser/views/frame/glass_browser_frame_view.cc index 4128f33..04c2bd6 100644 --- a/chrome/browser/views/frame/glass_browser_frame_view.cc +++ b/chrome/browser/views/frame/glass_browser_frame_view.cc @@ -5,7 +5,6 @@ #include "chrome/browser/views/frame/glass_browser_frame_view.h" #include "app/gfx/canvas.h" -#include "app/gfx/icon_util.h" #include "app/resource_bundle.h" #include "app/theme_provider.h" #include "chrome/app/chrome_dll_resource.h" @@ -13,6 +12,7 @@ #include "chrome/browser/views/frame/browser_view.h" #include "chrome/browser/views/tabs/side_tab_strip.h" #include "chrome/browser/views/tabs/tab_strip.h" +#include "gfx/icon_util.h" #include "grit/app_resources.h" #include "grit/theme_resources.h" #include "views/window/client_view.h" diff --git a/chrome/browser/views/tab_icon_view.cc b/chrome/browser/views/tab_icon_view.cc index 8d42e6b..aa65191 100644 --- a/chrome/browser/views/tab_icon_view.cc +++ b/chrome/browser/views/tab_icon_view.cc @@ -22,7 +22,7 @@ #include "grit/theme_resources.h" #if defined(OS_WIN) -#include "app/gfx/icon_util.h" +#include "gfx/icon_util.h" #endif static bool g_initialized = false; diff --git a/chrome/browser/web_applications/web_app.cc b/chrome/browser/web_applications/web_app.cc index e74d13b..9eebef4 100644 --- a/chrome/browser/web_applications/web_app.cc +++ b/chrome/browser/web_applications/web_app.cc @@ -36,8 +36,8 @@ #endif // defined(OS_LINUX) #if defined(OS_WIN) -#include "app/gfx/icon_util.h" #include "base/win_util.h" +#include "gfx/icon_util.h" #endif // defined(OS_WIN) namespace { diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp index 03dd596..98bce6c 100644 --- a/chrome/chrome.gyp +++ b/chrome/chrome.gyp @@ -1346,6 +1346,7 @@ '../app/app.gyp:*', '../base/base.gyp:*', '../chrome_frame/chrome_frame.gyp:*', + '../gfx/gfx.gyp:*', '../ipc/ipc.gyp:*', '../media/media.gyp:*', '../net/net.gyp:*', diff --git a/gfx/DEPS b/gfx/DEPS new file mode 100644 index 0000000..568a137 --- /dev/null +++ b/gfx/DEPS @@ -0,0 +1,4 @@ +include_rules = [ + "+base", + "+skia", +] diff --git a/gfx/empty.cc b/gfx/empty.cc new file mode 100644 index 0000000..63672f6 --- /dev/null +++ b/gfx/empty.cc @@ -0,0 +1,6 @@ +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +void MacSux() { +} diff --git a/gfx/gfx.gyp b/gfx/gfx.gyp new file mode 100644 index 0000000..e8f9272 --- /dev/null +++ b/gfx/gfx.gyp @@ -0,0 +1,72 @@ +# Copyright (c) 2009 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +{ + 'variables': { + 'chromium_code': 1, + }, + 'targets': [ + { + 'target_name': 'gfx_unittests', + 'type': 'executable', + 'msvs_guid': 'C8BD2821-EAE5-4AC6-A0E4-F82CAC2956CC', + 'dependencies': [ + 'gfx', + '../skia/skia.gyp:skia', + '../testing/gtest.gyp:gtest', + ], + 'sources': [ + 'run_all_unittests.cc', + ], + 'include_dirs': [ + '..', + ], + 'conditions': [ + ['OS=="win"', { + 'sources': [ + 'icon_util_unittest.cc', + ], + }], + ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', { + 'dependencies': [ + '../build/linux/system.gyp:gtk', + ], + }], + ], + }, + { + 'target_name': 'gfx', + 'type': '<(library)', + 'msvs_guid': '13A8D36C-0467-4B4E-BAA3-FD69C45F076A', + 'dependencies': [ + '../base/base.gyp:base', + '../base/base.gyp:base_i18n', + '../skia/skia.gyp:skia', + '../third_party/icu/icu.gyp:icui18n', + '../third_party/icu/icu.gyp:icuuc', + '../third_party/libjpeg/libjpeg.gyp:libjpeg', + '../third_party/libpng/libpng.gyp:libpng', + '../third_party/sqlite/sqlite.gyp:sqlite', + '../third_party/zlib/zlib.gyp:zlib', + ], + 'sources': [ + 'empty.cc', + ], + 'conditions': [ + ['OS=="win"', { + 'sources': [ + 'icon_util.cc', + 'icon_util.h', + ], + }], + ], + }, + ], +} + +# Local Variables: +# tab-width:2 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=2 shiftwidth=2: diff --git a/app/gfx/icon_util.cc b/gfx/icon_util.cc index b87d799..243ed17 100644 --- a/app/gfx/icon_util.cc +++ b/gfx/icon_util.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 "app/gfx/icon_util.h" +#include "gfx/icon_util.h" #include "app/win_util.h" #include "base/file_util.h" diff --git a/app/gfx/icon_util.h b/gfx/icon_util.h index 65d3d80..3e697e1 100644 --- a/app/gfx/icon_util.h +++ b/gfx/icon_util.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 APP_GFX_ICON_UTIL_H_ -#define APP_GFX_ICON_UTIL_H_ +#ifndef GFX_ICON_UTIL_H_ +#define GFX_ICON_UTIL_H_ #include <windows.h> #include <string> @@ -193,4 +193,4 @@ class IconUtil { DISALLOW_IMPLICIT_CONSTRUCTORS(IconUtil); }; -#endif // APP_GFX_ICON_UTIL_H_ +#endif // GFX_ICON_UTIL_H_ diff --git a/app/gfx/icon_util_unittest.cc b/gfx/icon_util_unittest.cc index 27f749d..967a547 100644 --- a/app/gfx/icon_util_unittest.cc +++ b/gfx/icon_util_unittest.cc @@ -3,11 +3,11 @@ // 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 "gfx/icon_util.h" #include "third_party/skia/include/core/SkBitmap.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/gfx/run_all_unittests.cc b/gfx/run_all_unittests.cc new file mode 100644 index 0000000..f008d3e --- /dev/null +++ b/gfx/run_all_unittests.cc @@ -0,0 +1,9 @@ +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "base/test/test_suite.h" + +int main(int argc, char** argv) { + return TestSuite(argc, argv).Run(); +} @@ -1,5 +1,6 @@ include_rules = [ "+app", + "+gfx", "+grit/app_strings.h", "+grit/app_resources.h", "+skia/ext", diff --git a/views/controls/table/native_table_win.cc b/views/controls/table/native_table_win.cc index 2bf96f3..e683553 100644 --- a/views/controls/table/native_table_win.cc +++ b/views/controls/table/native_table_win.cc @@ -1,6 +1,6 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this -// source code is governed by a BSD-style license that can be found in the -// LICENSE file. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. #include "views/controls/table/native_table_win.h" @@ -9,12 +9,12 @@ #include "app/gfx/canvas.h" #include "app/gfx/favicon_size.h" -#include "app/gfx/icon_util.h" #include "app/l10n_util.h" #include "app/l10n_util_win.h" #include "app/table_model.h" #include "base/logging.h" #include "base/win_util.h" +#include "gfx/icon_util.h" #include "skia/ext/skia_utils_win.h" #include "views/controls/table/table_view2.h" #include "views/controls/table/table_view_observer.h" diff --git a/views/controls/table/table_view.cc b/views/controls/table/table_view.cc index 0e5b46c..f944d22 100644 --- a/views/controls/table/table_view.cc +++ b/views/controls/table/table_view.cc @@ -1,4 +1,4 @@ -// Copyright (c)2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -12,13 +12,13 @@ #include "app/gfx/canvas.h" #include "app/gfx/favicon_size.h" #include "app/gfx/font.h" -#include "app/gfx/icon_util.h" #include "app/l10n_util.h" #include "app/l10n_util_win.h" #include "app/resource_bundle.h" #include "app/table_model.h" #include "base/string_util.h" #include "base/win_util.h" +#include "gfx/icon_util.h" #include "skia/ext/skia_utils_win.h" #include "third_party/skia/include/core/SkBitmap.h" #include "third_party/skia/include/core/SkColorFilter.h" diff --git a/views/controls/tree/tree_view.cc b/views/controls/tree/tree_view.cc index f61b4c58..d07feb4 100644 --- a/views/controls/tree/tree_view.cc +++ b/views/controls/tree/tree_view.cc @@ -9,7 +9,6 @@ #include "app/gfx/canvas.h" #include "app/gfx/canvas_paint.h" #include "app/gfx/favicon_size.h" -#include "app/gfx/icon_util.h" #include "app/l10n_util.h" #include "app/l10n_util_win.h" #include "app/resource_bundle.h" @@ -17,6 +16,7 @@ #include "base/keyboard_codes.h" #include "base/stl_util-inl.h" #include "base/win_util.h" +#include "gfx/icon_util.h" #include "grit/app_resources.h" #include "views/focus/focus_manager.h" #include "views/widget/widget.h" diff --git a/views/window/window_win.cc b/views/window/window_win.cc index 635aedb..aa5555a 100644 --- a/views/window/window_win.cc +++ b/views/window/window_win.cc @@ -9,13 +9,13 @@ #include "app/gfx/canvas_paint.h" #include "app/gfx/font.h" -#include "app/gfx/icon_util.h" #include "app/gfx/path.h" #include "app/l10n_util.h" #include "app/resource_bundle.h" #include "app/theme_provider.h" #include "app/win_util.h" #include "base/win_util.h" +#include "gfx/icon_util.h" #include "views/widget/root_view.h" #include "views/window/client_view.h" #include "views/window/custom_frame_view.h" diff --git a/webkit/tools/pepper_test_plugin/test_page.html b/webkit/tools/pepper_test_plugin/test_page.html index 5c20d6d..332de34 100644 --- a/webkit/tools/pepper_test_plugin/test_page.html +++ b/webkit/tools/pepper_test_plugin/test_page.html @@ -29,7 +29,7 @@ This page embeds a file declared as the pepper test plugins MIME type so that it <table> <tr> <td valign="top" width="50%"> -<object id="plugin" type="pepper-application/x-pepper-test-plugin" width="400" height="400" dimensions="3" /> +<object id="plugin" type="pepper-application/x-pepper-test-plugin" width="400" height="400" dimensions="2" /> </td> <td valign="top" style="background-color:Silver" width="50%"> <div id="event_text_box" style="width:400px; height:400px; overflow:auto"> |