Commit 1d6f5141 authored by Robert Liao's avatar Robert Liao Committed by Commit Bot

Remove All USE_COLOR_PIPELINE References from //chrome

BUG=1057239

Change-Id: I1896c6030cf5728ba197137438ae977f4781b91f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2088184
Commit-Queue: Robert Liao <robliao@chromium.org>
Reviewed-by: default avatarPeter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#746975}
parent 920bb45b
......@@ -24,6 +24,7 @@
#include "base/values.h"
#include "build/build_config.h"
#include "chrome/browser/themes/theme_properties.h"
#include "chrome/browser/ui/color/chrome_color_id.h"
#include "chrome/browser/ui/frame/window_frame_util.h"
#include "chrome/common/extensions/manifest_handlers/theme_handler.h"
#include "chrome/common/themes/autogenerated_theme_util.h"
......@@ -31,7 +32,10 @@
#include "components/crx_file/id_util.h"
#include "content/public/browser/browser_thread.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/base/resource/data_pack.h"
#include "ui/color/color_mixer.h"
#include "ui/color/color_provider.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/codec/png_codec.h"
#include "ui/gfx/color_analysis.h"
......@@ -45,13 +49,6 @@
#include "ui/gfx/image/image_skia_operations.h"
#include "ui/gfx/skia_util.h"
#if BUILDFLAG(USE_COLOR_PIPELINE)
#include "chrome/browser/ui/color/chrome_color_id.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/color/color_mixer.h"
#include "ui/color/color_provider.h"
#endif
using content::BrowserThread;
using extensions::Extension;
using TP = ThemeProperties;
......@@ -1024,7 +1021,6 @@ bool BrowserThemePack::HasCustomImage(int idr_id) const {
return false;
}
#if BUILDFLAG(USE_COLOR_PIPELINE)
void BrowserThemePack::AddCustomThemeColorMixers(
ui::ColorProvider* provider) const {
// A map from theme property IDs to color IDs for use in color mixers.
......@@ -1047,7 +1043,6 @@ void BrowserThemePack::AddCustomThemeColorMixers(
return;
provider->AddMixer().AddSet({kColorSetCustomTheme, std::move(theme_colors)});
}
#endif
// private:
......
......@@ -33,11 +33,8 @@ class Image;
}
namespace ui {
class DataPack;
#if BUILDFLAG(USE_COLOR_PIPELINE)
class ColorProvider;
#endif
class DataPack;
}
// An optimized representation of a theme, backed by a mmapped DataPack.
......@@ -104,11 +101,9 @@ class BrowserThemePack : public CustomThemeSupplier {
const override;
bool HasCustomImage(int id) const override;
#if BUILDFLAG(USE_COLOR_PIPELINE)
// Builds the color mixers that represent the state of the current browser
// theme instance.
void AddCustomThemeColorMixers(ui::ColorProvider* provider) const;
#endif
private:
friend class BrowserThemePackTest;
......
......@@ -13,6 +13,7 @@
#include "base/values.h"
#include "build/build_config.h"
#include "chrome/browser/themes/theme_properties.h"
#include "chrome/browser/ui/color/chrome_color_id.h"
#include "chrome/browser/ui/frame/window_frame_util.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/themes/autogenerated_theme_util.h"
......@@ -20,18 +21,14 @@
#include "content/public/test/browser_task_environment.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/color/color_buildflags.h"
#include "ui/color/color_mixer.h"
#include "ui/color/color_provider.h"
#include "ui/color/color_test_ids.h"
#include "ui/gfx/color_utils.h"
#include "ui/gfx/image/image.h"
#include "ui/gfx/image/image_skia.h"
#include "ui/gfx/image/image_skia_rep.h"
#if BUILDFLAG(USE_COLOR_PIPELINE)
#include "chrome/browser/ui/color/chrome_color_id.h"
#include "ui/color/color_mixer.h"
#include "ui/color/color_provider.h"
#include "ui/color/color_test_ids.h"
#endif
using extensions::Extension;
using TP = ThemeProperties;
......@@ -741,7 +738,6 @@ TEST_F(BrowserThemePackTest, TestNonExistantImages) {
EXPECT_FALSE(LoadRawBitmapsTo(out_file_paths));
}
#if BUILDFLAG(USE_COLOR_PIPELINE)
TEST_F(BrowserThemePackTest, TestCreateColorMixersOmniboxNoValues) {
// Tests to make sure that existing colors within the color provider are not
// overwritten or lost in the absence of any user provided theme values.
......@@ -791,7 +787,6 @@ TEST_F(BrowserThemePackTest, TestCreateColorMixersOmniboxAllValues) {
EXPECT_EQ(SkColorSetRGB(120, 140, 160),
provider.GetColor(kColorOmniboxBackground));
}
#endif
// TODO(erg): This test should actually test more of the built resources from
// the extension data, but for now, exists so valgrind can test some of the
......
......@@ -1434,6 +1434,7 @@ jumbo_static_library("ui") {
"//chrome/browser/resource_coordinator/tab_ranker",
"//chrome/browser/safe_browsing:advanced_protection",
"//chrome/browser/ui/color:color_headers",
"//chrome/browser/ui/color:mixers",
"//chrome/browser/ui/webui/app_management:mojo_bindings",
"//chrome/common:buildflags",
"//chrome/common:search_mojom",
......@@ -1486,10 +1487,6 @@ jumbo_static_library("ui") {
"//google_apis/drive",
]
}
if (use_color_pipeline) {
deps += [ "//chrome/browser/ui/color:mixers" ]
}
}
if (enable_kaleidoscope) {
......
......@@ -8,37 +8,31 @@ source_set("color_headers") {
sources = [ "chrome_color_id.h" ]
public_deps = [ "//ui/color:color_headers" ]
}
executable("dump_colors") {
testonly = true
sources = [ "tools/dump_colors.cc" ]
if (!use_color_pipeline) {
public_deps += [ "//chrome/browser:theme_properties" ]
}
deps = [
":color_headers",
":mixers",
"//ui/color:mixers",
]
}
if (use_color_pipeline) {
executable("dump_colors") {
testonly = true
sources = [ "tools/dump_colors.cc" ]
deps = [
":color_headers",
":mixers",
"//ui/color:mixers",
]
}
source_set("mixers") {
sources = [
"chrome_color_mixers.cc",
"chrome_color_mixers.h",
"omnibox_color_mixers.cc",
"omnibox_color_mixers.h",
]
deps = [
":color_headers",
"//ui/color:color",
"//ui/color:mixers",
]
}
source_set("mixers") {
sources = [
"chrome_color_mixers.cc",
"chrome_color_mixers.h",
"omnibox_color_mixers.cc",
"omnibox_color_mixers.h",
]
deps = [
":color_headers",
"//ui/color:color",
"//ui/color:mixers",
]
}
......@@ -8,10 +8,6 @@
#include "ui/color/color_buildflags.h"
#include "ui/color/color_id.h"
#if !BUILDFLAG(USE_COLOR_PIPELINE)
#include "chrome/browser/themes/theme_properties.h" // nogncheck
#endif
// TODO(pkasting): Add the rest of the colors.
// clang-format off
......@@ -73,12 +69,10 @@ enum ChromeColorIds : ui::ColorId {
static_assert(ui::ColorId{kChromeColorsEnd} <= ui::ColorId{ui::kUiColorsLast},
"Embedder colors must not exceed allowed space");
#if BUILDFLAG(USE_COLOR_PIPELINE)
enum ChromeColorSetIds : ui::ColorSetId {
kColorSetCustomTheme = ui::kUiColorSetsEnd,
kChromeColorSetsEnd,
};
#endif // BUILDFLAG(USE_COLOR_PIPELINE)
#endif // CHROME_BROWSER_UI_COLOR_CHROME_COLOR_ID_H_
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