Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate Cloud Print utility messages to Mojo
These are the last remaining legacy IPC messages sent to or from any utility process. Bug: 993189 Change-Id: If231f7eaa9986deced8149a9095b31007945ab50 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2953763 Reviewed-by: Avi Drissman <avi@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Ken Rockot <rockot@google.com> Cr-Commit-Position: refs/heads/master@{#891777}
- Loading branch information
Showing
21 changed files
with
200 additions
and
264 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
56 changes: 56 additions & 0 deletions
56
chrome/common/chrome_utility_printing_param_traits_macros.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
// Copyright 2014 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. | ||
|
||
#ifndef CHROME_COMMON_CHROME_UTILITY_PRINTING_PARAM_TRAITS_MACROS_H_ | ||
#define CHROME_COMMON_CHROME_UTILITY_PRINTING_PARAM_TRAITS_MACROS_H_ | ||
|
||
#include "build/build_config.h" | ||
#include "ipc/ipc_message_macros.h" | ||
#include "ipc/ipc_message_start.h" | ||
#include "ipc/ipc_param_traits.h" | ||
#include "printing/backend/print_backend.h" | ||
#include "printing/buildflags/buildflags.h" | ||
#include "printing/mojom/print.mojom.h" | ||
|
||
#if defined(OS_WIN) && BUILDFLAG(ENABLE_PRINT_PREVIEW) | ||
// Preview and Cloud Print messages. | ||
IPC_STRUCT_TRAITS_BEGIN(printing::PrinterCapsAndDefaults) | ||
IPC_STRUCT_TRAITS_MEMBER(printer_capabilities) | ||
IPC_STRUCT_TRAITS_MEMBER(caps_mime_type) | ||
IPC_STRUCT_TRAITS_MEMBER(printer_defaults) | ||
IPC_STRUCT_TRAITS_MEMBER(defaults_mime_type) | ||
IPC_STRUCT_TRAITS_END() | ||
|
||
IPC_ENUM_TRAITS_MAX_VALUE(printing::mojom::ColorModel, | ||
printing::mojom::ColorModel::kColorModelLast) | ||
|
||
IPC_STRUCT_TRAITS_BEGIN(printing::PrinterSemanticCapsAndDefaults::Paper) | ||
IPC_STRUCT_TRAITS_MEMBER(display_name) | ||
IPC_STRUCT_TRAITS_MEMBER(vendor_id) | ||
IPC_STRUCT_TRAITS_MEMBER(size_um) | ||
IPC_STRUCT_TRAITS_END() | ||
|
||
IPC_ENUM_TRAITS_MIN_MAX_VALUE(printing::mojom::DuplexMode, | ||
printing::mojom::DuplexMode::kUnknownDuplexMode, | ||
printing::mojom::DuplexMode::kShortEdge) | ||
|
||
IPC_STRUCT_TRAITS_BEGIN(printing::PrinterSemanticCapsAndDefaults) | ||
IPC_STRUCT_TRAITS_MEMBER(collate_capable) | ||
IPC_STRUCT_TRAITS_MEMBER(collate_default) | ||
IPC_STRUCT_TRAITS_MEMBER(copies_max) | ||
IPC_STRUCT_TRAITS_MEMBER(duplex_modes) | ||
IPC_STRUCT_TRAITS_MEMBER(duplex_default) | ||
IPC_STRUCT_TRAITS_MEMBER(color_changeable) | ||
IPC_STRUCT_TRAITS_MEMBER(color_default) | ||
IPC_STRUCT_TRAITS_MEMBER(color_model) | ||
IPC_STRUCT_TRAITS_MEMBER(bw_model) | ||
IPC_STRUCT_TRAITS_MEMBER(papers) | ||
IPC_STRUCT_TRAITS_MEMBER(default_paper) | ||
IPC_STRUCT_TRAITS_MEMBER(dpis) | ||
IPC_STRUCT_TRAITS_MEMBER(default_dpi) | ||
IPC_STRUCT_TRAITS_END() | ||
|
||
#endif // defined(OS_WIN) && BUILDFLAG(ENABLE_PRINT_PREVIEW) | ||
|
||
#endif // CHROME_COMMON_CHROME_UTILITY_PRINTING_PARAM_TRAITS_MACROS_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// Copyright 2021 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. | ||
|
||
module chrome.mojom; | ||
|
||
// Interface implemented by the unsandboxed Cloud Print utility process (see | ||
// src/chrome/utility/printing_handler.cc) and called by the Cloud Print service | ||
// process, which is a special Windows service process run by the deprecated | ||
// Cloud Print Connector tool. The purpose of the utility process is to isolate | ||
// printer driver crashes from the service process. | ||
interface CloudPrintUtility { | ||
// Retrieves capabilities and defaults for the specified printer. Returns null | ||
// on failure. | ||
GetPrinterCapsAndDefaults(string printer_name) | ||
=> (PrinterCapsAndDefaults? caps_and_defaults); | ||
|
||
// Retrieves capabilities and defaults for the specified printer. Returns null | ||
// on failure. | ||
GetPrinterSemanticCapsAndDefaults(string printer_name) | ||
=> (PrinterSemanticCapsAndDefaults? caps_and_defaults); | ||
}; | ||
|
||
[Native] | ||
struct PrinterCapsAndDefaults; | ||
|
||
[Native] | ||
struct PrinterSemanticCapsAndDefaults; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.