Skip to content

Commit

Permalink
Remove legacy CRD application types.
Browse files Browse the repository at this point in the history
1. Removed CRD v1 app.
2. Removed support for native plugin from the webapp.

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

Cr-Commit-Position: refs/heads/master@{#341794}
  • Loading branch information
SergeyUlanov authored and Commit bot committed Aug 4, 2015
1 parent ac6cdd0 commit a7471f6
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 153 deletions.
5 changes: 0 additions & 5 deletions chrome/tools/build/linux/FILES.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,6 @@ FILES = [
'archive': 'pnacl.zip',
},
# Remoting files:
{
'filename': 'remoting-webapp.zip',
'buildtype': ['dev', 'official'],
'archive': 'remoting-webapp.zip',
},
{
'filename': 'remoting-webapp.v2.zip',
'buildtype': ['dev', 'official'],
Expand Down
5 changes: 0 additions & 5 deletions chrome/tools/build/mac/FILES.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@ FILES = [
'archive': 'browser_tests',
},
# Remoting files:
{
'filename': 'remoting-webapp.zip',
'buildtype': ['dev', 'official'],
'archive': 'remoting-webapp.zip',
},
{
'filename': 'remoting-me2me-host-mac.zip',
'buildtype': ['dev', 'official'],
Expand Down
6 changes: 0 additions & 6 deletions chrome/tools/build/win/FILES.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -438,12 +438,6 @@ FILES = [
'buildtype': ['official'],
'archive': 'remoting-win32.zip',
},
{
'filename': 'remoting-webapp.zip',
'buildtype': ['dev', 'official'],
'archive': 'remoting-webapp.zip',
'optional': ['dev'],
},
# Cloud Print files:
{
'filename': 'gcp_portmon.dll',
Expand Down
69 changes: 20 additions & 49 deletions remoting/remoting_client.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -152,66 +152,37 @@
],
},
{
# GN version: //remoting/webapp:webapp
# GN version: //remoting/webapp
'target_name': 'remoting_webapp',
'type': 'none',
'dependencies': [
'remoting_client_credits',
'remoting_webapp_v1',
],
'conditions': [
['disable_nacl==0 and disable_nacl_untrusted==0', {
'dependencies': [
'remoting_webapp_v2',
],
}]
],
}, # end of target 'remoting_webapp'

{
# GN version: //remoting/webapp:webapp_v1
'target_name': 'remoting_webapp_v1',
'type': 'none',
'variables': {
'webapp_type': 'v1',
'output_dir': '<(PRODUCT_DIR)/remoting/remoting.webapp',
'zip_path': '<(PRODUCT_DIR)/remoting-webapp.zip',
'output_dir': '<(PRODUCT_DIR)/remoting/remoting.webapp.v2',
'zip_path': '<(PRODUCT_DIR)/remoting-webapp.v2.zip',
'webapp_type': 'desktop',
'extra_files': [
'webapp/crd/remoting_client_pnacl.nmf.jinja2',
],
},
'includes': [ 'remoting_webapp.gypi', ],
}, # end of target 'remoting_webapp_v1'
], # end of targets

'conditions': [
['disable_nacl==0 and disable_nacl_untrusted==0', {
'targets': [
{
# GN version: //remoting/webapp:webapp_v1
'target_name': 'remoting_webapp_v2',
'type': 'none',
'conditions': [
['disable_nacl==0 and disable_nacl_untrusted==0', {
'variables': {
'output_dir': '<(PRODUCT_DIR)/remoting/remoting.webapp.v2',
'zip_path': '<(PRODUCT_DIR)/remoting-webapp.v2.zip',
'webapp_type': 'v2_pnacl',
'extra_files': [
'webapp/crd/remoting_client_pnacl.nmf.jinja2',
'<(PRODUCT_DIR)/remoting_client_plugin_newlib.pexe',
],
},
'dependencies': [
'remoting_nacl.gyp:remoting_client_plugin_nacl',
],
'conditions': [
['buildtype == "Dev"', {
'variables': {
'extra_files': [
'<(PRODUCT_DIR)/remoting_client_plugin_newlib.pexe.debug',
],
},
}],
],
'includes': [ 'remoting_webapp.gypi', ],
}, # end of target 'remoting_webapp_v2'
}],
['disable_nacl==0 and disable_nacl_untrusted==0 and buildtype == "Dev"', {
'variables': {
'extra_files': [
'<(PRODUCT_DIR)/remoting_client_plugin_newlib.pexe.debug',
],
},
}],
],
}],
],
'includes': [ 'remoting_webapp.gypi', ],
}, # end of target 'remoting_webapp'
], # end of targets
}
2 changes: 1 addition & 1 deletion remoting/remoting_test.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@
'variables': {
'output_dir': '<(PRODUCT_DIR)/remoting/remoting.webapp.browsertest.v2',
'zip_path': '<(PRODUCT_DIR)/remoting-webapp.browsertest.v2.zip',
'webapp_type': 'v2_pnacl',
'webapp_type': 'v2',
'main_html_file': '<(SHARED_INTERMEDIATE_DIR)/browser_test/main.html',
'extra_files': [
'webapp/crd/remoting_client_pnacl.nmf.jinja2',
Expand Down
28 changes: 2 additions & 26 deletions remoting/webapp/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,6 @@ import("//build/config/features.gni")
import("//remoting/webapp/build_template.gni")
import("//remoting/webapp/files.gni")

group("webapp") {
deps = [
":webapp_v1",
":ar_sample_app",
":credits",
":ar_shared_module",
]

if (enable_internal_app_remoting_targets) {
deps += [ "//remoting/internal:ar_internal_apps" ]
}

if (enable_nacl) {
deps += [ ":webapp_v2" ]
}
}

# GYP version: remoting/remoting_client:remoting_credits
action("credits") {
about_credits_file = "$target_gen_dir/credits.html"
Expand All @@ -49,15 +32,8 @@ action("credits") {
]
}

desktop_remoting_webapp("webapp_v1") {
webapp_type = "v1"
output_dir = "remoting/remoting-webapp"
zip_path = "remoting/remoting-webapp.zip"
extra_files = []
}

desktop_remoting_webapp("webapp_v2") {
webapp_type = "v2_pnacl"
desktop_remoting_webapp("webapp") {
webapp_type = "desktop"
output_dir = "remoting/remoting-webapp.v2"
zip_path = "remoting/remoting-webapp.v2.zip"
extra_files = [
Expand Down
41 changes: 2 additions & 39 deletions remoting/webapp/base/js/client_plugin_impl.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,6 @@ remoting.ClientPluginImpl = function(container,
/** @type {remoting.ClientPluginMessage} */ (event.data));
}, false);

if (remoting.settings.CLIENT_PLUGIN_TYPE == 'native') {
window.setTimeout(this.showPluginForClickToPlay_.bind(this), 500);
}

/** @private */
this.hostDesktop_ = new remoting.ClientPlugin.HostDesktopImpl(
this, this.postMessage_.bind(this));
Expand All @@ -117,16 +113,8 @@ remoting.ClientPluginImpl = function(container,
remoting.ClientPluginImpl.createPluginElement_ = function() {
var plugin =
/** @type {HTMLEmbedElement} */ (document.createElement('embed'));
if (remoting.settings.CLIENT_PLUGIN_TYPE == 'pnacl') {
plugin.src = 'remoting_client_pnacl.nmf';
plugin.type = 'application/x-pnacl';
} else if (remoting.settings.CLIENT_PLUGIN_TYPE == 'nacl') {
plugin.src = 'remoting_client_nacl.nmf';
plugin.type = 'application/x-nacl';
} else {
plugin.src = 'about://none';
plugin.type = 'application/vnd.chromium.remoting-viewer';
}
plugin.src = 'remoting_client_pnacl.nmf';
plugin.type = 'application/x-pnacl';
plugin.width = '0';
plugin.height = '0';
plugin.tabIndex = 0; // Required, otherwise focus() doesn't work.
Expand Down Expand Up @@ -848,27 +836,6 @@ remoting.ClientPluginImpl.prototype.extensions = function() {
return this.extensions_;
};

/**
* If we haven't yet received a "hello" message from the plugin, change its
* size so that the user can confirm it if click-to-play is enabled, or can
* see the "this plugin is disabled" message if it is actually disabled.
* @private
*/
remoting.ClientPluginImpl.prototype.showPluginForClickToPlay_ = function() {
if (!this.helloReceived_) {
var width = 200;
var height = 200;
this.plugin_.style.width = width + 'px';
this.plugin_.style.height = height + 'px';
// Center the plugin just underneath the "Connnecting..." dialog.
var dialog = document.getElementById('client-dialog');
var dialogRect = dialog.getBoundingClientRect();
this.plugin_.style.top = (dialogRect.bottom + 16) + 'px';
this.plugin_.style.left = (window.innerWidth - width) / 2 + 'px';
this.plugin_.style.position = 'fixed';
}
};

/**
* Undo the CSS rules needed to make the plugin clickable for click-to-play.
* @private
Expand Down Expand Up @@ -911,10 +878,6 @@ remoting.DefaultClientPluginFactory.prototype.createPlugin =
};

remoting.DefaultClientPluginFactory.prototype.preloadPlugin = function() {
if (remoting.settings.CLIENT_PLUGIN_TYPE != 'pnacl') {
return;
}

var plugin = remoting.ClientPluginImpl.createPluginElement_();
plugin.addEventListener(
'loadend', function() { document.body.removeChild(plugin); }, false);
Expand Down
3 changes: 0 additions & 3 deletions remoting/webapp/base/js/plugin_settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,5 @@ remoting.Settings.prototype.XMPP_SERVER_USE_TLS =
remoting.Settings.prototype.THIRD_PARTY_AUTH_REDIRECT_URI =
'THIRD_PARTY_AUTH_REDIRECT_URL';

// 'native', 'nacl' or 'pnacl'.
remoting.Settings.prototype.CLIENT_PLUGIN_TYPE = 'CLIENT_PLUGIN_TYPE';

/** @const {boolean} If true, use GCD instead of Chromoting registry. */
remoting.Settings.prototype.USE_GCD = !!'USE_GCD';
17 changes: 1 addition & 16 deletions remoting/webapp/build-webapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,6 @@ def processJinjaTemplate(input_file, include_paths, output_file, context):
io.open(output_file, 'w', encoding='utf-8').write(rendered)


def getClientPluginType(webapp_type):
if webapp_type in ['v1', 'v2']:
return 'native'
elif webapp_type in ['v2_pnacl', 'shared_module']:
return 'pnacl'
elif webapp_type is 'app_remoting':
return ''


def buildWebApp(buildtype, version, destination, zip_path,
manifest_template, webapp_type, appid, app_client_id, app_name,
app_description, app_capabilities, manifest_key, files,
Expand All @@ -131,7 +122,7 @@ def buildWebApp(buildtype, version, destination, zip_path,
contents of |destination|.
manifest_template: jinja2 template file for manifest.
webapp_type: webapp type:
For DesktopRemoting: "v1", "v2" or "v2_pnacl"
For DesktopRemoting: "desktop"
For AppRemoting: "app_remoting" or "shared_module"
appid: A string with the Remoting Application Id (only used for app
remoting webapps). If supplied, it defaults to using the
Expand Down Expand Up @@ -232,12 +223,6 @@ def buildWebApp(buildtype, version, destination, zip_path,
service_environment == 'prod-testing'
is_desktop_remoting = not is_app_remoting

# Set client plugin type.
if not is_app_remoting_webapp:
client_plugin = getClientPluginType(webapp_type)
findAndReplace(os.path.join(destination, 'plugin_settings.js'),
"'CLIENT_PLUGIN_TYPE'", "'" + client_plugin + "'")

# Allow host names for google services/apis to be overriden via env vars.
oauth2AccountsHost = os.environ.get(
'OAUTH2_ACCOUNTS_HOST', 'https://accounts.google.com')
Expand Down
1 change: 0 additions & 1 deletion testing/chromoting/chromoting_integration_tests.isolate
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
'files': [
'../test_env.py',
'<(PRODUCT_DIR)/browser_tests<(EXECUTABLE_SUFFIX)',
'<(PRODUCT_DIR)/remoting/remoting.webapp/',
'<(PRODUCT_DIR)/remoting/remoting.webapp.v2/',
'<(PRODUCT_DIR)/remoting/browser_test_resources/',
'<(PRODUCT_DIR)/resources.pak',
Expand Down
3 changes: 1 addition & 2 deletions testing/chromoting/dependencies.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
{
'dependencies': [
'../../chrome/chrome.gyp:browser_tests',
'../../remoting/remoting.gyp:remoting_webapp_v1',
'../../remoting/remoting.gyp:remoting_webapp_v2',
'../../remoting/remoting.gyp:remoting_webapp',
],
'type': 'none',
'includes': [
Expand Down

0 comments on commit a7471f6

Please sign in to comment.