Commit c7971185 authored by rbpotter's avatar rbpotter Committed by Commit Bot

Print Preview: Add empty CloudPrintInterfaceNative

Bug: 829414
Change-Id: Ib6b84bcac405deda514b76c426b14f19888687a3
Reviewed-on: https://chromium-review.googlesource.com/c/1311655Reviewed-by: default avatarDemetrios Papadopoulos <dpapad@chromium.org>
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604824}
parent 70f76ac2
...@@ -66,6 +66,7 @@ js_type_check("print_preview_resources") { ...@@ -66,6 +66,7 @@ js_type_check("print_preview_resources") {
":cloud_print_interface", ":cloud_print_interface",
":cloud_print_interface_js", ":cloud_print_interface_js",
":cloud_print_interface_manager", ":cloud_print_interface_manager",
":cloud_print_interface_native",
":metrics", ":metrics",
":native_layer", ":native_layer",
":print_preview", ":print_preview",
...@@ -93,6 +94,7 @@ js_library("print_preview") { ...@@ -93,6 +94,7 @@ js_library("print_preview") {
"cloud_print_interface.js", "cloud_print_interface.js",
"cloud_print_interface_js.js", "cloud_print_interface_js.js",
"cloud_print_interface_manager.js", "cloud_print_interface_manager.js",
"cloud_print_interface_native.js",
"common/overlay.js", "common/overlay.js",
"common/search_box.js", "common/search_box.js",
"common/search_bubble.js", "common/search_bubble.js",
...@@ -200,6 +202,7 @@ js_library("cloud_print_interface_manager") { ...@@ -200,6 +202,7 @@ js_library("cloud_print_interface_manager") {
deps = [ deps = [
":cloud_print_interface", ":cloud_print_interface",
":cloud_print_interface_js", ":cloud_print_interface_js",
":cloud_print_interface_native",
":native_layer", ":native_layer",
"data:user_info", "data:user_info",
] ]
...@@ -218,6 +221,12 @@ js_library("cloud_print_interface_js") { ...@@ -218,6 +221,12 @@ js_library("cloud_print_interface_js") {
] ]
} }
js_library("cloud_print_interface_native") {
deps = [
":cloud_print_interface",
]
}
js_library("native_layer") { js_library("native_layer") {
deps = [ deps = [
"data:destination", "data:destination",
......
<link rel="import" href="chrome://resources/html/cr.html">
<link rel="import" href="cloud_print_interface.html">
<link rel="import" href="native_layer.html">
<link rel="import" href="data/cloud_parsers.html">
<link rel="import" href="data/destination.html">
<link rel="import" href="data/document_info.html">
<link rel="import" href="data/invitation.html">
<link rel="import" href="data/user_info.html">
<script src="cloud_print_interface_js.js"></script>
<link rel="import" href="chrome://resources/html/cr.html">
<link rel="import" href="cloud_print_interface.html"> <link rel="import" href="cloud_print_interface.html">
<link rel="import" href="cloud_print_interface_js.html">
<link rel="import" href="native_layer.html"> <link rel="import" href="native_layer.html">
<link rel="import" href="data/cloud_parsers.html">
<link rel="import" href="data/destination.html">
<link rel="import" href="data/document_info.html">
<link rel="import" href="data/invitation.html">
<link rel="import" href="data/user_info.html"> <link rel="import" href="data/user_info.html">
<script src="cloud_print_interface_js.js"></script>
<script src="cloud_print_interface_native.js"></script>
<script src="cloud_print_interface_manager.js"></script> <script src="cloud_print_interface_manager.js"></script>
...@@ -21,8 +21,12 @@ cr.define('cloudprint', function() { ...@@ -21,8 +21,12 @@ cr.define('cloudprint', function() {
function getCloudPrintInterface( function getCloudPrintInterface(
baseUrl, nativeLayer, userInfo, isInAppKioskMode) { baseUrl, nativeLayer, userInfo, isInAppKioskMode) {
if (instance === null) { if (instance === null) {
instance = new cloudprint.CloudPrintInterfaceJS( if (loadTimeData.getBoolean('cloudPrinterHandlerEnabled')) {
baseUrl, nativeLayer, userInfo, isInAppKioskMode); instance = new cloudprint.CloudPrintInterfaceNative();
} else {
instance = new cloudprint.CloudPrintInterfaceJS(
baseUrl, nativeLayer, userInfo, isInAppKioskMode);
}
} }
return instance; return instance;
} }
......
// Copyright 2018 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.
cr.define('cloudprint', function() {
'use strict';
/** @implements {cloudprint.CloudPrintInterface} */
class CloudPrintInterfaceNative {
constructor() {}
/** @override */
isCloudDestinationSearchInProgress() {}
/** @override */
getEventTarget() {}
/** @override */
search(opt_account, opt_origin) {}
/** @override */
invites(account) {}
/** @override */
processInvite(invitation, accept) {}
/** @override */
submit(destination, printTicket, documentInfo, data) {}
/** @override */
printer(printerId, origin, account) {}
}
// Export
return {
CloudPrintInterfaceNative: CloudPrintInterfaceNative,
};
});
...@@ -1389,6 +1389,7 @@ cr.define('print_preview', function() { ...@@ -1389,6 +1389,7 @@ cr.define('print_preview', function() {
// <include src="print_preview_animations.js"> // <include src="print_preview_animations.js">
// <include src="cloud_print_interface.js"> // <include src="cloud_print_interface.js">
// <include src="cloud_print_interface_js.js"> // <include src="cloud_print_interface_js.js">
// <include src="cloud_print_interface_native.js">
// <include src="cloud_print_interface_manager.js"> // <include src="cloud_print_interface_manager.js">
// <include src="print_preview_utils.js"> // <include src="print_preview_utils.js">
// <include src="print_header.js"> // <include src="print_header.js">
......
...@@ -36,12 +36,12 @@ ...@@ -36,12 +36,12 @@
<structure name="IDR_PRINT_PREVIEW_CLOUD_PRINT_INTERFACE_JS" <structure name="IDR_PRINT_PREVIEW_CLOUD_PRINT_INTERFACE_JS"
file="cloud_print_interface.js" file="cloud_print_interface.js"
type="chrome_html" /> type="chrome_html" />
<structure name="IDR_PRINT_PREVIEW_CLOUD_PRINT_INTERFACE_JS_HTML"
file="cloud_print_interface_js.html"
type="chrome_html" />
<structure name="IDR_PRINT_PREVIEW_CLOUD_PRINT_INTERFACE_JS_JS" <structure name="IDR_PRINT_PREVIEW_CLOUD_PRINT_INTERFACE_JS_JS"
file="cloud_print_interface_js.js" file="cloud_print_interface_js.js"
type="chrome_html" /> type="chrome_html" />
<structure name="IDR_PRINT_PREVIEW_CLOUD_PRINT_INTERFACE_NATIVE_JS"
file="cloud_print_interface_native.js"
type="chrome_html" />
<structure name="IDR_PRINT_PREVIEW_CLOUD_PRINT_INTERFACE_MANAGER_HTML" <structure name="IDR_PRINT_PREVIEW_CLOUD_PRINT_INTERFACE_MANAGER_HTML"
file="cloud_print_interface_manager.html" file="cloud_print_interface_manager.html"
type="chrome_html" /> type="chrome_html" />
......
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