Commit bb6e4735 authored by tbarzic's avatar tbarzic Committed by Commit bot

Launch webstore widget app when unsupported printer is plugged in

This implements webstore_widget app window, and launches the app when the user
click on the notification shown when an unsupported printer is detected.

Note that the notification is behind switch --enable-printer-app-search

TODO: setting app icon; error handling.

BUG=477106
TEST=None

Review URL: https://codereview.chromium.org/1123373003

Cr-Commit-Position: refs/heads/master@{#330048}
parent a1cc3a62
......@@ -34,6 +34,8 @@
#include "chrome/browser/ui/tab_contents/tab_contents_iterator.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/chrome_version_info.h"
#include "chrome/common/extensions/api/webstore_widget_private.h"
#include "chrome/common/extensions/extension_constants.h"
#include "chrome/grit/generated_resources.h"
#include "chromeos/chromeos_switches.h"
#include "components/user_manager/user.h"
......@@ -44,6 +46,7 @@
#include "dbus/exported_object.h"
#include "dbus/message.h"
#include "device/usb/usb_ids.h"
#include "extensions/browser/event_router.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_set.h"
......@@ -57,6 +60,9 @@
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
namespace webstore_widget_private_api =
extensions::api::webstore_widget_private;
namespace {
const char kPrinterAdded[] = "PrinterAdded";
......@@ -199,25 +205,47 @@ class PrinterProviderExistsNotificationDelegate : public NotificationDelegate {
// (not implemented yet).
class SearchPrinterAppNotificationDelegate : public NotificationDelegate {
public:
SearchPrinterAppNotificationDelegate(const std::string& vendor_id,
const std::string& product_id)
: vendor_id_(vendor_id), product_id_(product_id) {}
SearchPrinterAppNotificationDelegate(content::BrowserContext* browser_context,
uint16 vendor_id,
const std::string& vendor_id_str,
uint16 product_id,
const std::string& product_id_str)
: browser_context_(browser_context),
vendor_id_(vendor_id),
vendor_id_str_(vendor_id_str),
product_id_(product_id),
product_id_str_(product_id_str) {}
std::string id() const override {
return "system.printer.no_printer_provider_found/" +
GetNotificationTag(vendor_id_, product_id_);
GetNotificationTag(vendor_id_str_, product_id_str_);
}
bool HasClickedListener() override { return true; }
void Click() override {
// TODO(tbarzic): Implement this (http://crbug.com/439448).
webstore_widget_private_api::Options options;
options.type = webstore_widget_private_api::TYPE_PRINTER_PROVIDER;
options.usb_id.reset(new webstore_widget_private_api::UsbId());
options.usb_id->vendor_id = vendor_id_;
options.usb_id->product_id = product_id_;
extensions::EventRouter* event_router =
extensions::EventRouter::Get(browser_context_);
scoped_ptr<extensions::Event> event(new extensions::Event(
webstore_widget_private_api::OnShowWidget::kEventName,
webstore_widget_private_api::OnShowWidget::Create(options)));
event_router->DispatchEventToExtension(extension_misc::kWebstoreWidgetAppId,
event.Pass());
}
private:
~SearchPrinterAppNotificationDelegate() override = default;
std::string vendor_id_;
std::string product_id_;
content::BrowserContext* browser_context_;
uint16 vendor_id_;
std::string vendor_id_str_;
uint16 product_id_;
std::string product_id_str_;
DISALLOW_COPY_AND_ASSIGN(SearchPrinterAppNotificationDelegate);
};
......@@ -280,8 +308,9 @@ void ShowPrinterPluggedNotification(
message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT,
kNoPrinterProviderNotificationID),
base::string16(), GetNotificationTag(vendor_id_str, product_id_str),
options, new SearchPrinterAppNotificationDelegate(vendor_id_str,
product_id_str)));
options,
new SearchPrinterAppNotificationDelegate(
profile, vendor_id, vendor_id_str, product_id, product_id_str)));
}
notification->SetSystemPriority();
......@@ -340,7 +369,6 @@ void PrinterServiceProvider::PrinterAdded(
dbus::MethodCall* method_call,
dbus::ExportedObject::ResponseSender response_sender) {
DVLOG(1) << "PrinterAdded " << method_call->ToString();
dbus::MessageReader reader(method_call);
std::string vendor_id;
......
......@@ -2,4 +2,30 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// TODO(tbarzic): Implement this.
/** @const {number} */
var APP_WINDOW_WIDTH = 735;
/** @const {number} */
var APP_WINDOW_HEIGHT = 530;
chrome.webstoreWidgetPrivate.onShowWidget.addListener(function(options) {
if (!options || options.type != 'PRINTER_PROVIDER' || !options.usbId) {
console.error('Invalid widget options.');
return;
}
chrome.app.window.create('app/main.html', {
id: JSON.stringify(options),
frame: 'none',
innerBounds: {width: APP_WINDOW_WIDTH, height: APP_WINDOW_HEIGHT},
resizable: false
}, function(createdWindow) {
createdWindow.contentWindow.params = {
filter: {
'printer_provider_vendor_id': options.usbId.vendorId,
'printer_provider_product_id': options.usbId.productId
},
webstoreUrl: null
};
});
});
# Copyright 2015 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.
{
'targets': [
{
'target_name': 'main',
'variables': {
'depends': [
'<@(cws_widget_container)',
'../../../../third_party/jstemplate/compiled_resources.gyp:jstemplate',
'../../../../ui/webui/resources/js/i18n_template_no_process.js',
'../../../../ui/webui/resources/js/load_time_data.js',
],
'externs': [
'<(CLOSURE_DIR)/externs/chrome_extensions.js',
'<(CLOSURE_DIR)/externs/file_manager_private.js',
'../externs/chrome_webstore_widget_private.js',
'../externs/webview_tag.js'
]
},
'includes': [
'../../../../third_party/closure_compiler/compile_js.gypi',
'../cws_widget/compiled_resources.gypi'
]
},
{
'target_name': 'background',
'variables': {
'externs': [
'<(CLOSURE_DIR)/externs/chrome_extensions.js',
'../externs/chrome_webstore_widget_private.js'
]
},
'includes': [
'../../../../third_party/closure_compiler/compile_js.gypi'
]
}
]
}
/* Copyright 2015 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. */
body {
margin: 0;
}
button {
background-color: #fafafa;
background-image: none;
border: 5px solid transparent;
border-image: -webkit-image-set(
url(chrome://resources/images/apps/button.png) 1x,
url(chrome://resources/images/2x/apps/button.png)
2x) 5 / 5px / 2px repeat;
box-sizing: content-box;
color: #222;
cursor: default;
line-height: 21px;
margin: 0;
min-height: 21px;
min-width: 55px;
padding: 0 10px;
}
button:hover {
border-image: -webkit-image-set(
url(chrome://resources/images/apps/button_hover.png) 1x,
url(chrome://resources/images/2x/apps/button_hover.png)
2x) 5 fill / 5px / 2px repeat;
color: #222;
}
button:active {
border-image: -webkit-image-set(
url(chrome://resources/images/apps/button_pressed.png) 1x,
url(chrome://resources/images/2x/apps/button_pressed.png)
2x) 5 fill / 5px / 2px repeat;
color: #333;
}
button:focus {
outline-color: rgb(77, 144, 254);
}
.title-area {
-webkit-app-region: drag;
background-color: white;
box-shadow: 0 1px #d0d0d0;
display: flex;
font-size: 15px;
height: 48px;
}
.window-title {
-webkit-margin-start: 20px;
flex: 1;
line-height: 48px;
}
<!DOCTYPE HTML>
<!--
-- Copyright 2015 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.
-->
<html i18n-values="dir:textdirection;lang:language">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="chrome://resources/css/apps/topbutton_bar.css">
<link rel="stylesheet" href="chrome://resources/css/dialogs.css">
<link rel="stylesheet" href="/app/main.css">
<link rel="stylesheet" href="/cws_widget/cws_widget_container.css">
<script src="/app/main.js"></script>
</head>
<body>
<div class="title-area">
<span id="title" class="window-title"></span>
<span class="topbutton-bar">
<button id="minimize-button" class="minimize-button" tabindex="-1" alt="">
</button>
<button id="close-button" class="close-button" tabindex="-1" alt="">
</button>
</span>
</div>
<div id="widget-container-root"></div>
</body>
</html>
// Copyright 2015 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.
//<include src="../../../../ui/webui/resources/js/cr.js">
//<include src="../../../../ui/webui/resources/js/load_time_data.js">
//<include src="../../../../ui/webui/resources/js/i18n_template_no_process.js">
//<include src="../../../../ui/webui/resources/js/cr/event_target.js">
//<include src="../../../../ui/webui/resources/js/cr/ui/dialogs.js">
(function() {
'use strict';
//<include src="../cws_widget/app_installer.js">
//<include src="../cws_widget/cws_webview_client.js">
//<include src="../cws_widget/cws_widget_container.js">
//<include src="../cws_widget/cws_widget_container_error_dialog.js">
/**
* @type {?{
* filter: !Object.<string, *>,
* webstoreUrl: ?string
* }}
*/
window.params = window.params || null;
/**
* @param {string} id Element id.
* @return {HTMLElement} The found element, or null.
*/
function $(id) {
return document.getElementById(id);
}
/**
* Default strings.
*/
var defaultStrings = {
'language': 'en',
'LINK_TO_WEBSTORE': '[LOCALIZE ME] Learn more...',
'INSTALLATION_FAILED_MESSAGE': '[LOCALIZE ME] Installation failed!',
'OK_BUTTON': '[LOCALIZE ME] OK',
'TITLE_PRINTER_PROVIDERS': '[LOCALIZE ME] Select app for your printer'
};
/**
* @param {string} id The string id.
* @return {string}
*/
function getString(id) {
return loadTimeData.getString(id) || defaultStrings[id] || '';
}
/**
* @param {Object.<string, string>} strings Localized strings used by the
* container.
* @return {!CWSWidgetContainer.PlatformDelegate}
*/
function createPlatformDelegate(strings) {
return {
strings: {
UI_LOCALE: getString('language'),
LINK_TO_WEBSTORE: getString('LINK_TO_WEBSTORE'),
INSTALLATION_FAILED_MESSAGE: getString('INSTALLATION_FAILED_MESSAGE')
},
metricsImpl: {
/**
* @param {string} enumName
* @param {number} value
* @param {number} enumSize
*/
recordEnum: function(enumName, value, enumSize) {},
/** @param {string} actionName */
recordUserAction: function(actionName) {},
/** @param {string} intervalName */
startInterval: function(intervalName) {},
/** @param {string} intervalName */
recordInterval: function(intervalName) {}
},
/**
* @param {string} itemId Item to be installed.
* @param {function(?string)} callback Callback param is the error message,
* which is set to null on success.
*/
installWebstoreItem: function(itemId, callback) {
chrome.webstoreWidgetPrivate.installWebstoreItem(
itemId,
false,
function() {
callback(chrome.runtime.lastError ?
chrome.runtime.lastError.message || 'UNKNOWN_ERROR' : null);
});
},
/** @param {function(Array.<string>)} callback */
getInstalledItems: function(callback) { callback([]); },
/**
* @param {function(?string)} callback The argument is the fetche3d access
* token. Null on error.
*/
requestWebstoreAccessToken: function(callback) {
chrome.fileManagerPrivate.requestWebStoreAccessToken(function(token) {
if (chrome.runtime.lastError) {
console.error('Error getting access token: ' +
chrome.runtime.lastError.message);
callback(null);
return;
}
callback(token);
});
}
};
}
function initializeTopbarButtons() {
$('close-button').addEventListener('click', function(e) {
e.preventDefault();
chrome.app.window.current().close();
});
$('close-button').addEventListener('mousedown', function(e) {
e.preventDefault();
});
$('minimize-button').addEventListener('click', function(e) {
e.preventDefault();
chrome.app.window.current().minimize();
});
$('minimize-button').addEventListener('mousedown', function(e) {
e.preventDefault();
});
}
window.addEventListener('DOMContentLoaded', function() {
initializeTopbarButtons();
chrome.webstoreWidgetPrivate.getStrings(function(strings) {
loadTimeData.data = strings;
i18nTemplate.process(document, loadTimeData);
cr.ui.dialogs.BaseDialog.OK_LABEL = getString('OK_BUTTON');
document.title = getString('TITLE_PRINTER_PROVIDERS');
$('title').textContent = document.title;
if (!window.params) {
console.error('Params not set!');
return;
}
/** @type {!CWSWidgetContainer.PlatformDelegate} */
var platformDelegate = createPlatformDelegate(strings);
var root = $('widget-container-root');
if (!root) {
console.error('No root element');
return;
}
/** @type {!CWSWidgetContainer} */
var widgetContainer = new CWSWidgetContainer(
document, root, platformDelegate, {} /* state */);
widgetContainer.ready()
/** @return {!Promise.<CWSWidgetContainer.ResolveReason>} */
.then(function() {
return widgetContainer.start(window.params.filter,
window.params.webstoreUrl);
})
/** @param {!CWSWidgetContainer.ResolveReason} reason */
.then(function(reason) {
chrome.app.window.current().close();
})
/** @param {*} error */
.catch(function(error) {
// TODO(tbarzic): Add error UI.
console.error(error);
});
});
});
})();
# Copyright 2015 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.
{
'variables': {
'WIDGET_ROOT': '<(DEPTH)/components/chrome_apps/webstore_widget/cws_widget',
'cws_widget_container': [
'<(DEPTH)/ui/webui/resources/js/cr.js',
'<(DEPTH)/ui/webui/resources/js/cr/event_target.js',
'<(DEPTH)/ui/webui/resources/js/cr/ui/dialogs.js',
'<(WIDGET_ROOT)/app_installer.js',
'<(WIDGET_ROOT)/cws_webview_client.js',
'<(WIDGET_ROOT)/cws_widget_container.js',
'<(WIDGET_ROOT)/cws_widget_container_error_dialog.js',
]
}
}
......@@ -47,10 +47,13 @@ var CWS_WIDGET_ORIGIN = 'https://clients5.google.com';
* @param {!HTMLElement} parentNode Node to be parent for this container.
* @param {!CWSWidgetContainer.PlatformDelegate} delegate Delegate for accessing
* Chrome platform APIs.
* @param {!SuggestAppDialogState} state Static state of suggest app dialog.
* @param {!{
* overrideCwsContainerUrlForTest: (string|undefined),
* overrideCwsContainerOriginForTest: (string|undefined)
* }} params Overrides for container params.
* @constructor
*/
function CWSWidgetContainer(document, parentNode, delegate, state) {
function CWSWidgetContainer(document, parentNode, delegate, params) {
/** @private {!CWSWidgetContainer.PlatformDelegate} */
this.delegate_ = delegate;
......@@ -108,7 +111,6 @@ function CWSWidgetContainer(document, parentNode, delegate, state) {
*/
this.webstoreButton_ = document.createElement('div');
this.webstoreButton_.hidden = true;
this.webstoreButton_.classList.add('cws-widget-webstore-button');
this.webstoreButton_.setAttribute('role', 'button');
this.webstoreButton_.tabIndex = 0;
......@@ -148,14 +150,14 @@ function CWSWidgetContainer(document, parentNode, delegate, state) {
* @const {string}
* @private
*/
this.widgetUrl_ = state.overrideCwsContainerUrlForTest || CWS_WIDGET_URL;
this.widgetUrl_ = params.overrideCwsContainerUrlForTest || CWS_WIDGET_URL;
/**
* The Chrome Web Store widget origin.
* @const {string}
* @private
*/
this.widgetOrigin_ = state.overrideCwsContainerOriginForTest ||
this.widgetOrigin_ = params.overrideCwsContainerOriginForTest ||
CWS_WIDGET_ORIGIN;
/**
......@@ -389,10 +391,10 @@ CWSWidgetContainer.prototype.ready = function() {
*
* @param {!Object<string, *>} options Map of options for the dialog.
* @param {?string} webStoreUrl Url for more results. Null if not supported.
* @return {Promise.<CWSWidgetContainer.ResolveReason>} Resolved when app
* @return {!Promise.<CWSWidgetContainer.ResolveReason>} Resolved when app
* installation is done, or the installation is cancelled.
*/
CWSWidgetContainer.prototype.start = function(options, webStoreUrl) {
CWSWidgetContainer.prototype.start = function(options, webStoreUrl) {
return new Promise(function(resolve, reject) {
if (this.state_ !== CWSWidgetContainer.State.ACCESS_TOKEN_READY) {
this.state_ = CWSWidgetContainer.State.INITIALIZE_FAILED_CLOSING;
......@@ -413,7 +415,9 @@ CWSWidgetContainer.prototype.start = function(options, webStoreUrl) {
this.webStoreUrl_ = webStoreUrl;
this.options_ = options;
this.webstoreButton_.hidden = (webStoreUrl === null);
this.webstoreButton_.hidden = !webStoreUrl;
this.webstoreButton_.classList.toggle('cws-widget-webstore-button',
!!webStoreUrl);
this.webview_ =
/** @type {!WebView} */(this.document_.createElement('webview'));
......@@ -469,7 +473,7 @@ CWSWidgetContainer.prototype.start = function(options, webStoreUrl) {
CWSWidgetContainer.prototype.onWebstoreLinkActivated_ = function(e) {
if (!this.webStoreUrl_)
return;
util.visitURL(this.webStoreUrl_);
window.open(this.webStoreUrl_);
this.state_ = CWSWidgetContainer.State.OPENING_WEBSTORE_CLOSING;
this.reportDone_();
};
......
// Copyright 2015 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.
/** @const */
chrome.webstoreWidgetPrivate = {};
/**
* @enum {string}
*/
chrome.webstoreWidgetPrivate.Type = {
PRINTER_PROVIDER: 'PRINTER_PROVIDER'
};
/**
* @typedef {{vendorId: number, productId: number}}
*/
chrome.webstoreWidgetPrivate.UsbId;
/**
* @typedef {{
* options: chrome.webstoreWidgetPrivate.Type,
* usbId: (chrome.webstoreWidgetPrivate.UsbId|undefined)
* }}
*/
chrome.webstoreWidgetPrivate.Options;
/**
* @constructor
*/
chrome.webstoreWidgetPrivate.ShowWidgetEvent;
/**
* @param {function(!chrome.webstoreWidgetPrivate.Options)} callback
*/
chrome.webstoreWidgetPrivate.ShowWidgetEvent.prototype.addListener = function(
callback) {
};
/**
* @param {function(!chrome.webstoreWidgetPrivate.Options)} callback
*/
chrome.webstoreWidgetPrivate.ShowWidgetEvent.prototype.removeListener =
function(callback) {};
/**
* @param {function(!chrome.webstoreWidgetPrivate.Options)} callback
* @return {boolean}
*/
chrome.webstoreWidgetPrivate.ShowWidgetEvent.prototype.hasListener = function(
callback) {
};
/**
* @return {boolean}
*/
chrome.webstoreWidgetPrivate.ShowWidgetEvent.prototype.hasListeners =
function() {};
/**
* @typedef {!chrome.webstoreWidgetPrivate.ShowWidgetEvent}
*/
chrome.webstoreWidgetPrivate.onShowWidget;
/**
* @param {function(Object.<string, string>)} callback
*/
chrome.webstoreWidgetPrivate.getStrings = function(callback) {};
/**
* Installs the app with ID {@code itemId}.
* @param {string} itemId
* @param {boolean} silentInstall
* @param {function()} callback
*/
chrome.webstoreWidgetPrivate.installWebstoreItem = function(
itemId, silentInstall, callback) {
};
This diff is collapsed.
......@@ -3,9 +3,10 @@
"key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0ZSmlOjtKoapSOZ4kH4vpSh2WzGxT7AlJgTet+0v5O/eV56dg1D+hpIltMswe47zX3kozOOzZ3LhnLHZb7kBIyVdgmtAv73XP1/CjvO7w1F5dzdS3zqJEg4JIblKmGIs8Zb93rols5DsJth58w3nPDz94clWQY3VI0IsgPfgssi/5OHyyzd3fVZS6UQU1XBkfZ+mpUQSKD293Rqq2aol1WgmyVumj7o8YM73SU/9Hnxla56ew88Zv/A78o1i1X6mcQcLCexDIAwcerJ09TvrLRv0sexRKBx47YZqVmR5yJRNGQiJdV54Es/jP6K8Oy8oZnz7Wea/nAL0b0OKAcq7+QIDAQAB",
"name": "Chrome Webstore Gallery Widget app",
"description": "App for showing Chrome Webstore Gallery widget and handling extension installs from the widget",
"version": "0.1",
"version": "0.2",
"manifest_version": 2,
"display_in_launcher": false,
"web_accessible_resources": [
"cws_widget/app_installer.js",
"cws_widget/cws_webview_client.js",
......@@ -14,11 +15,19 @@
"cws_widget/cws_widget_container_error_dialog.js",
"cws_widget/spinner.svg"
],
"app": {
"background": {
"scripts": ["app/background.js"]
}
},
"content_security_policy": "style-src 'self' chrome://resources; img-src 'self' chrome://theme chrome://resources;"
},
"permissions": [
"chrome://resources/",
"chrome://theme/",
"fileManagerPrivate",
"webstoreWidgetPrivate",
"webview"
]
}
<?xml version="1.0" encoding="utf-8"?>
<grit-part>
<!-- Manifest: -->
<include name="IDR_CHROME_APPS_WEBSTORE_WIDGET_MANIFEST" file="webstore_widget/manifest.json" type="BINDATA" />
<!-- Background page: -->
<include name="IDR_CHROME_APPS_WEBSTORE_WIDGET_BACKGROUND_JS" file="webstore_widget/app/background.js" type="BINDATA" />
<!-- Main app window resources: -->
<include name="IDR_CHROME_APPS_WEBSTORE_WIDGET_MAIN_HTML" file="webstore_widget/app/main.html" type="BINDATA" />
<include name="IDR_CHROME_APPS_WEBSTORE_WIDGET_MAIN_JS" file="webstore_widget/app/main.js" flattenhtml="true" type="BINDATA" />
<include name="IDR_CHROME_APPS_WEBSTORE_WIDGET_MAIN_CSS" file="webstore_widget/app/main.css" flattenhtml="true" type="BINDATA" />
<!-- Widget container resoruces: -->
<include name="IDR_CHROME_APPS_WEBSTORE_WIDGET_APP_INSTALLER_JS" file="webstore_widget/cws_widget/app_installer.js" type="BINDATA" />
<include name="IDR_CHROME_APPS_WEBSTORE_WIDGET_CWS_WEBVIEW_CLIENT_JS" file="webstore_widget/cws_widget/cws_webview_client.js" type="BINDATA" />
<include name="IDR_CHROME_APPS_WEBSTORE_WIDGET_CWS_WIDGET_CONTAINER_CSS" file="webstore_widget/cws_widget/cws_widget_container.css" type="BINDATA" />
<include name="IDR_CHROME_APPS_WEBSTORE_WIDGET_CWS_WIDGET_CONTAINER_JS" file="webstore_widget/cws_widget/cws_widget_container.js" type="BINDATA" />
<include name="IDR_CHROME_APPS_WEBSTORE_WIDGET_CWS_WIDGET_CONTAINER_ERROR_DIALOG_JS" file="webstore_widget/cws_widget/cws_widget_container_error_dialog.js" type="BINDATA" />
<include name="IDR_CHROME_APPS_WEBSTORE_WIDGET_CWS_WIDGET_CONTAINER_CSS" file="webstore_widget/cws_widget/cws_widget_container.css" type="BINDATA" />
<include name="IDR_CHROME_APPS_WEBSTORE_WIDGET_SPINNER" file="webstore_widget/cws_widget/spinner.svg" type="BINDATA" />
</grit-part>
......@@ -7,6 +7,7 @@
'target_name': 'main',
'variables': {
'depends': [
'<@(cws_widget_container)',
'../../../../../third_party/jstemplate/compiled_resources.gyp:jstemplate',
'../../../../../ui/webui/resources/js/load_time_data.js',
'../../../../../ui/webui/resources/js/cr.js',
......@@ -39,10 +40,6 @@
'../../../../../ui/webui/resources/js/cr/ui/menu.js',
'../../../../../ui/webui/resources/js/cr/ui/menu_button.js',
'../../../../../ui/webui/resources/js/cr/ui/context_menu_handler.js',
'../../../../../components/chrome_apps/webstore_widget/cws_widget/app_installer.js',
'../../../../../components/chrome_apps/webstore_widget/cws_widget/cws_webview_client.js',
'../../../../../components/chrome_apps/webstore_widget/cws_widget/cws_widget_container.js',
'../../../../../components/chrome_apps/webstore_widget/cws_widget/cws_widget_container_error_dialog.js',
'../../common/js/error_util.js',
'../../common/js/async_util.js',
'../../common/js/file_type.js',
......@@ -163,7 +160,8 @@
],
},
'includes': [
'../../../../../third_party/closure_compiler/compile_js.gypi'
'../../../../../components/chrome_apps/webstore_widget/cws_widget/compiled_resources.gypi',
'../../../../../third_party/closure_compiler/compile_js.gypi',
],
}
],
......
......@@ -4,8 +4,8 @@
/**
* @typedef {{
* overrideCwsContainerUrlForTest: string,
* overrideCwsContainerOriginForTest: string
* overrideCwsContainerUrlForTest: (string|undefined),
* overrideCwsContainerOriginForTest: (string|undefined)
* }}
*/
var SuggestAppDialogState;
......
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