Permalink
Browse files

refactor: move color_chooser out of chromium_src (#15091)

* chore: move color_chooser out of chromium_src

* fix: remove deleted source files

* fix: add build flag, patch and build instructions for ColorChooser
  • Loading branch information...
brenca authored and MarshallOfSound committed Oct 11, 2018
1 parent 95696c9 commit 5ef5d60f77486419335a47347ee6d14d7101f9bf
@@ -277,7 +277,11 @@ content::ColorChooser* CommonWebContentsDelegate::OpenColorChooser(
content::WebContents* web_contents,
SkColor color,
const std::vector<blink::mojom::ColorSuggestionPtr>& suggestions) {
#if BUILDFLAG(ENABLE_COLOR_CHOOSER)
return chrome::ShowColorChooser(web_contents, color);
#else
return nullptr;
#endif
}
void CommonWebContentsDelegate::RunFileChooser(
View
@@ -16,6 +16,7 @@ buildflag_header("buildflags") {
"ENABLE_PEPPER_FLASH=$enable_pepper_flash",
"ENABLE_PDF_VIEWER=$enable_pdf_viewer",
"ENABLE_TTS=$enable_tts",
"ENABLE_COLOR_CHOOSER=$enable_color_chooser",
"OVERRIDE_LOCATION_PROVIDER=$enable_fake_location_provider",
]
}
@@ -16,6 +16,8 @@ declare_args() {
enable_tts = true
enable_color_chooser = true
# Provide a fake location provider for mocking
# the geolocation responses. Disable it if you
# need to test with chromium's location provider.
View
@@ -2,6 +2,7 @@
# Use of this source code is governed by the MIT license that can be
# found in the LICENSE file.
import("//build/config/ui.gni")
import("//electron/buildflags/buildflags.gni")
import("//third_party/widevine/cdm/widevine.gni")
@@ -66,6 +67,37 @@ static_library("chrome") {
deps += [ "//ui/snapshot" ]
}
if (enable_color_chooser) {
sources += [
"//chrome/browser/platform_util.cc",
"//chrome/browser/platform_util.h",
"//chrome/browser/ui/browser_dialogs.h",
]
if (use_aura) {
sources += [
"//chrome/browser/platform_util_aura.cc",
"//chrome/browser/ui/views/color_chooser_aura.cc",
"//chrome/browser/ui/views/color_chooser_aura.h",
]
}
if (is_mac) {
sources += [
"//chrome/browser/ui/cocoa/color_chooser_mac.h",
"//chrome/browser/ui/cocoa/color_chooser_mac.mm",
]
}
if (is_win) {
sources += [
"//chrome/browser/ui/views/color_chooser_dialog.cc",
"//chrome/browser/ui/views/color_chooser_dialog.h",
"//chrome/browser/ui/views/color_chooser_win.cc",
]
}
}
if (enable_tts) {
sources += [
"//chrome/browser/speech/tts_controller.h",

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 5ef5d60

Please sign in to comment.