Skip to content

Commit

Permalink
Remove local printer handler lacros
Browse files Browse the repository at this point in the history
Use the local printer mojom interface for both the ash and lacros
printer handler implementations. Ash chrome uses the LocalPrinterAsh
class directly while lacros chrome uses a mojo remote to call methods.

Update unit tests for local printer handler chromeos.

Bug: b/179305359
Change-Id: Ifea2ed10adb7e24c56bd001ba3fa131e57595e4a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2912948
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Sean Kau <skau@chromium.org>
Commit-Queue: Pranav Batra <batrapranav@chromium.org>
Cr-Commit-Position: refs/heads/master@{#892765}
  • Loading branch information
tsite authored and Chromium LUCI CQ committed Jun 15, 2021
1 parent 30a1611 commit 1457920
Show file tree
Hide file tree
Showing 11 changed files with 414 additions and 1,087 deletions.
6 changes: 2 additions & 4 deletions chrome/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -481,9 +481,7 @@ if (is_win) {
# executable because dlopen() and loading all the dependent dylibs
# is time-consuming, see https://crbug.com/1197495.
deps += [ ":chrome_framework+link" ]
ldflags = [
"-Wl,-rpath,@executable_path/../Frameworks",
]
ldflags = [ "-Wl,-rpath,@executable_path/../Frameworks" ]

# The Framework is packaged inside the .app bundle. But when using the
# component build, all the dependent shared libraries of :chrome_dll are
Expand Down Expand Up @@ -1352,7 +1350,7 @@ group("browser_dependencies") {

if (enable_basic_printing) {
public_deps += [ "//printing" ]
if (enable_print_preview && !is_chromeos_ash) {
if (enable_print_preview && !is_chromeos) {
public_deps += [ "//chrome/service" ]
}
}
Expand Down
4 changes: 2 additions & 2 deletions chrome/app/chrome_main_delegate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ base::LazyInstance<ChromeContentUtilityClient>::DestructorAtExit

extern int NaClMain(const content::MainFunctionParams&);

#if !BUILDFLAG(IS_CHROMEOS_ASH)
#if !defined(OS_CHROMEOS)
extern int CloudPrintServiceProcessMain(const content::MainFunctionParams&);
#endif

Expand Down Expand Up @@ -1165,7 +1165,7 @@ int ChromeMainDelegate::RunProcess(
NOTREACHED(); // Android provides a subclass and shares no code here.
#else
static const MainFunction kMainFunctions[] = {
#if BUILDFLAG(ENABLE_PRINT_PREVIEW) && !BUILDFLAG(IS_CHROMEOS_ASH)
#if BUILDFLAG(ENABLE_PRINT_PREVIEW) && !defined(OS_CHROMEOS)
{switches::kCloudPrintServiceProcess, CloudPrintServiceProcessMain},
#endif

Expand Down
14 changes: 2 additions & 12 deletions chrome/browser/ui/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -4861,21 +4861,11 @@ static_library("ui") {
]

if (is_chromeos) {
sources += [
"webui/print_preview/print_preview_handler_chromeos.cc",
"webui/print_preview/print_preview_handler_chromeos.h",
]
}
if (is_chromeos_lacros) {
sources += [
"webui/print_preview/local_printer_handler_lacros.cc",
"webui/print_preview/local_printer_handler_lacros.h",
]
}
if (is_chromeos_ash) {
sources += [
"webui/print_preview/local_printer_handler_chromeos.cc",
"webui/print_preview/local_printer_handler_chromeos.h",
"webui/print_preview/print_preview_handler_chromeos.cc",
"webui/print_preview/print_preview_handler_chromeos.h",
]
} else {
sources += [
Expand Down

0 comments on commit 1457920

Please sign in to comment.