Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2307)

Unified Diff: chrome/browser/resources/chromeos/emulator/device_emulator_pages.html

Issue 1999593002: Update chrome://device-emulator with newer Polymer guidelines (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: narrow mode drawer + webui safety Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/chromeos/emulator/device_emulator_pages.html
diff --git a/chrome/browser/resources/chromeos/emulator/device_emulator_pages.html b/chrome/browser/resources/chromeos/emulator/device_emulator_pages.html
new file mode 100644
index 0000000000000000000000000000000000000000..df9dd06952258a1505c335bceb0e3c9130ff222a
--- /dev/null
+++ b/chrome/browser/resources/chromeos/emulator/device_emulator_pages.html
@@ -0,0 +1,97 @@
+<link rel="import" href="chrome://resources/html/cr.html">
+<link rel="import" href="chrome://resources/html/polymer.html">
+<link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/iron-flex-layout-classes.html">
+<link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.html">
+<link rel="import" href="chrome://resources/polymer/v1_0/neon-animation/neon-animated-pages.html">
+<link rel="import" href="chrome://resources/polymer/v1_0/neon-animation/animations/fade-in-animation.html">
+<link rel="import" href="chrome://resources/polymer/v1_0/neon-animation/animations/fade-out-animation.html">
+<link rel="import" href="chrome://resources/polymer/v1_0/paper-drawer-panel/paper-drawer-panel.html">
+<link rel="import" href="chrome://resources/polymer/v1_0/paper-header-panel/paper-header-panel.html">
+<link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper-icon-button.html">
+<link rel="import" href="chrome://resources/polymer/v1_0/paper-item/paper-icon-item.html">
+<link rel="import" href="chrome://resources/polymer/v1_0/paper-listbox/paper-listbox.html">
+<link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/shadow.html">
+<link rel="import" href="chrome://resources/polymer/v1_0/paper-toolbar/paper-toolbar.html">
+<link rel="import" href="audio_settings.html">
+<link rel="import" href="battery_settings.html">
+<link rel="import" href="bluetooth_settings.html">
+<link rel="import" href="icons.html">
+<link rel="import" href="shared_styles.html">
+
+<dom-module id="device-emulator-pages">
+ <template>
+ <!-- TODO(michaelpg): Wrap the line below to fit within the 80-char limit.
+ See https://github.com/Polymer/polymer/pull/3668. -->
+ <style include="device-emulator-shared-styles iron-flex iron-flex-alignment iron-positioning">
+ :host {
+ display: flex;
+ flex-direction: column;
+ }
+
+ paper-drawer-panel {
+ --paper-drawer-panel-main-container: {
+ background-color: #ddd;
+ };
+ }
+
+ paper-drawer-panel header {
+ font-weight: bolder;
+ }
+
+ paper-drawer-panel:not([narrow]) > [main] header {
+ display: none;
+ }
+
+ paper-drawer-panel paper-listbox paper-icon-item {
+ padding: 10px 5px;
+ -webkit-margin-start: 20px;
+ }
+
+ neon-animated-pages > * {
+ @apply(--shadow-elevation-2dp);
+ background-color: white;
+ display: block;
+ margin: 20px;
+ position: relative !important;
+ padding: 0 20px 20px 20px;
+ }
+ </style>
+ <paper-drawer-panel>
+ <paper-header-panel drawer>
+ <paper-toolbar>
+ <header>Chrome OS Device Emulator</header>
+ </paper-toolbar>
+ <paper-listbox class="layout vertical" selected="{{selectedPage}}">
+ <paper-icon-item>
+ <iron-icon icon="device-emulator:volume-up" item-icon></iron-icon>
+ Audio
+ </paper-icon-item>
+ <paper-icon-item>
+ <iron-icon icon="device-emulator:battery-charging-full" item-icon>
+ </iron-icon>
+ Battery/Power
+ </paper-icon-item>
+ <paper-icon-item>
+ <iron-icon icon="device-emulator:bluetooth" item-icon></iron-icon>
+ Bluetooth
+ </paper-icon-item>
+ </paper-listbox>
+ </paper-header-panel>
+ <paper-header-panel main class="flex layout vertical">
+ <paper-toolbar>
+ <paper-icon-button icon="device-emulator:menu" paper-drawer-toggle>
+ </paper-icon-button>
+ <header>Chrome OS Device Emulator</header>
+ </paper-toolbar>
+ <neon-animated-pages class="fit" selected="[[selectedPage]]"
+ entry-animation="fade-in-animation"
+ exit-animation="fade-out-animation">
+ <audio-settings id="audioSettings"></audio-settings>
+ <battery-settings id="batterySettings"></battery-settings>
+ <bluetooth-settings id="bluetoothSettings"></bluetooth-settings>
+ </neon-animated-pages>
+ </paper-header-panel>
+ </paper-drawer-panel>
+ </template>
+ <script src="device_emulator_pages.js"></script>
+</dom-module>

Powered by Google App Engine
This is Rietveld 408576698