<!DOCTYPE html>
<!--
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.
-->

<link rel="import" href="/tracing/base/base.html">

<!--
@fileoverview Polymer element for various analysis sub-views.
-->
<script>
'use strict';

tr.exportTo('tr.ui.analysis.behaviors', function() {

  var AnalysisSubView = {
    set tabLabel(label) {
      Polymer.dom(this).setAttribute('tab-label', label);
    },

    get tabLabel() {
      return Polymer.dom(this).getAttribute('tab-label');
    },

    get requiresTallView() {
      return false;
    },

    get relatedEventsToHighlight() {
      return undefined;
    },

    /**
     * Each element extending this one must implement
     * a 'selection' property.
     */
    set selection(selection) {
      throw new Error('Not implemented!');
    },

    get selection() {
      throw new Error('Not implemented!');
    }
  };

  return {
    AnalysisSubView: AnalysisSubView
  };
});

// Dummy element for testing
Polymer({
  is: 'tr-ui-a-sub-view',
  behaviors: [tr.ui.analysis.behaviors.AnalysisSubView]
});
</script>

<!DOCTYPE html>
<!--
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.
-->

<link rel="import" href="/tracing/base/base.html">

<!--
@fileoverview Polymer element for various analysis sub-views.
-->
<script>
'use strict';

tr.exportTo('tr.ui.analysis.behaviors', function() {

  var AnalysisSubView = {
    set tabLabel(label) {
      Polymer.dom(this).setAttribute('tab-label', label);
    },

    get tabLabel() {
      return this.getAttribute('tab-label');
    },

    get requiresTallView() {
      return false;
    },

    get relatedEventsToHighlight() {
      return undefined;
    },

    /**
     * Each element extending this one must implement
     * a 'selection' property.
     */
    set selection(selection) {
      throw new Error('Not implemented!');
    },

    get selection() {
      throw new Error('Not implemented!');
    }
  };

  return {
    AnalysisSubView: AnalysisSubView
  };
});

// Dummy element for testing
Polymer({
  is: 'tr-ui-a-sub-view',
  behaviors: [tr.ui.analysis.behaviors.AnalysisSubView]
});
</script>

Remove Polymer.dom() from getAttribute call
[polymer] Remove Polymer.dom() from getAttribute call

Polymer.dom'ing is only necessary/possible before setAttribute

TBR=sullivan@chromium.org
NOPRESUBMIT=true
NOTRY=true
BUG=catapult:#2285

Review-Url: https://codereview.chromium.org/2159353002
