Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <link rel="import" href="chrome://resources/html/polymer.html"> | 1 <link rel="import" href="chrome://resources/html/polymer.html"> |
| 2 <link rel="import" href="chrome://resources/html/cr/ui.html"> | 2 <link rel="import" href="chrome://resources/html/cr/ui.html"> |
| 3 <link rel="import" href="chrome://resources/html/cr/ui/command.html"> | 3 <link rel="import" href="chrome://resources/html/cr/ui/command.html"> |
| 4 <link rel="import" href="chrome://resources/html/web_ui_listener_behavior.html"> | 4 <link rel="import" href="chrome://resources/html/web_ui_listener_behavior.html"> |
| 5 <link rel="import" href="chrome://resources/polymer/v1_0/iron-media-query/iron-m edia-query.html"> | 5 <link rel="import" href="chrome://resources/polymer/v1_0/iron-media-query/iron-m edia-query.html"> |
| 6 <link rel="import" href="chrome://resources/polymer/v1_0/iron-pages/iron-pages.h tml"> | 6 <link rel="import" href="chrome://resources/polymer/v1_0/iron-pages/iron-pages.h tml"> |
| 7 <link rel="import" href="chrome://resources/polymer/v1_0/iron-scroll-target-beha vior/iron-scroll-target-behavior.html"> | 7 <link rel="import" href="chrome://resources/polymer/v1_0/iron-scroll-target-beha vior/iron-scroll-target-behavior.html"> |
| 8 <link rel="import" href="chrome://history/history_toolbar.html"> | 8 <link rel="import" href="chrome://history/history_toolbar.html"> |
| 9 <link rel="import" href="chrome://history/list_container.html"> | 9 <link rel="import" href="chrome://history/list_container.html"> |
| 10 <link rel="import" href="chrome://history/router.html"> | 10 <link rel="import" href="chrome://history/router.html"> |
| 11 <link rel="import" href="chrome://history/shared_style.html"> | 11 <link rel="import" href="chrome://history/shared_style.html"> |
| 12 <link rel="import" href="chrome://history/side_bar.html"> | 12 <link rel="import" href="chrome://history/side_bar.html"> |
| 13 <link rel="stylesheet" href="chrome://resources/css/md_colors.css"> | 13 <link rel="stylesheet" href="chrome://resources/css/md_colors.css"> |
| 14 | 14 |
| 15 <!-- Lazy loaded: history-synced-device-manager, app-drawer. --> | 15 <!-- Lazy loaded: history-synced-device-manager, app-drawer. --> |
| 16 | 16 |
| 17 <dom-module id="history-app"> | 17 <dom-module id="history-app"> |
| 18 <template> | 18 <template> |
| 19 <style include="shared-style"> | 19 <style include="shared-style"> |
| 20 :host { | 20 :host { |
| 21 display: block; | 21 display: block; |
| 22 height: 100%; | 22 height: 100%; |
| 23 overflow: hidden; | 23 overflow: hidden; |
| 24 z-index: 0; | |
| 24 } | 25 } |
| 25 | 26 |
| 26 history-toolbar { | 27 history-toolbar { |
| 27 background: var(--md-toolbar-color); | 28 background: var(--md-toolbar-color); |
| 29 z-index: 2; | |
| 28 } | 30 } |
| 29 | 31 |
| 30 /* Sizing this with flex causes slow load performance, see | 32 /* Sizing this with flex causes slow load performance, see |
| 31 * crbug.com/618153. TODO(dbeam): is this still an issue? */ | 33 * crbug.com/618153. TODO(dbeam): is this still an issue? */ |
| 32 #main-container { | 34 #main-container { |
| 33 height: calc(100% - var(--toolbar-height)); | 35 height: calc(100% - var(--toolbar-height)); |
| 34 position: relative; | 36 position: relative; |
| 37 z-index: 1; | |
| 35 } | 38 } |
| 36 | 39 |
| 37 :host([grouped_]) #main-container { | 40 :host([grouped_]) #main-container { |
| 38 height: calc(100% - var(--toolbar-grouped-height)); | 41 height: calc(100% - var(--toolbar-grouped-height)); |
| 39 } | 42 } |
| 40 | 43 |
| 41 #content-side-bar { | 44 #content-side-bar { |
| 42 float: left; | 45 float: left; |
| 43 } | 46 } |
| 44 | 47 |
| 45 :host-context([dir='rtl']) #content-side-bar { | 48 :host-context([dir='rtl']) #content-side-bar { |
| 46 float: right; | 49 float: right; |
| 47 } | 50 } |
| 48 | 51 |
| 49 #content, | 52 #content, |
| 50 #content > * { | 53 #content > * { |
| 51 height: 100%; | 54 height: 100%; |
| 52 } | 55 } |
| 53 | 56 |
| 54 #drawer:unresolved { | 57 #drawer:unresolved { |
| 55 display: none; | 58 display: none; |
| 56 } | 59 } |
| 57 | 60 |
| 61 #drawer { | |
| 62 z-index: 3; | |
| 63 } | |
| 64 | |
| 58 #drawer-header { | 65 #drawer-header { |
| 59 align-items: center; | 66 align-items: center; |
| 60 border-bottom: 1px solid rgba(0, 0, 0, 0.08); | 67 border-bottom: 1px solid rgba(0, 0, 0, 0.08); |
| 61 box-sizing: border-box; | 68 box-sizing: border-box; |
| 62 display: flex; | 69 display: flex; |
| 63 height: var(--toolbar-height); | 70 height: var(--toolbar-height); |
| 64 } | 71 } |
| 65 | 72 |
| 66 h1 { | 73 h1 { |
| 67 -webkit-padding-start: 24px; | 74 -webkit-padding-start: 24px; |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 92 <history-toolbar id="toolbar" | 99 <history-toolbar id="toolbar" |
| 93 spinner-active="[[shouldShowSpinner_(queryState_.querying, | 100 spinner-active="[[shouldShowSpinner_(queryState_.querying, |
| 94 queryState_.incremental, | 101 queryState_.incremental, |
| 95 queryState_.searchTerm)]]" | 102 queryState_.searchTerm)]]" |
| 96 is-grouped-mode="{{grouped_}}" | 103 is-grouped-mode="{{grouped_}}" |
| 97 grouped-range="{{queryState_.range}}" | 104 grouped-range="{{queryState_.range}}" |
| 98 search-term="{{queryState_.searchTerm}}" | 105 search-term="{{queryState_.searchTerm}}" |
| 99 query-start-time="[[queryResult_.info.queryStartTime]]" | 106 query-start-time="[[queryResult_.info.queryStartTime]]" |
| 100 query-end-time="[[queryResult_.info.queryEndTime]]" | 107 query-end-time="[[queryResult_.info.queryEndTime]]" |
| 101 has-drawer="[[hasDrawer_]]" | 108 has-drawer="[[hasDrawer_]]" |
| 102 show-sync-notice="[[showSyncNotice_(hasSyncedResults, selectedPage_)]]"> | 109 show-sync-notice="[[showSyncNotice_(hasSyncedResults, selectedPage_)]]" |
| 110 show-menu-promo="[[showMenuPromo_]]" | |
| 111 on-cr-toolbar-promo-close="onCrToolbarPromoClose_"> | |
|
calamity
2016/10/27 03:20:31
nit: The rest of the event listeners are in the js
Dan Beam
2016/10/27 03:42:18
Done.
| |
| 103 </history-toolbar> | 112 </history-toolbar> |
| 104 | 113 |
| 105 <div id="main-container"> | 114 <div id="main-container"> |
| 106 <history-side-bar id="content-side-bar" selected-page="{{selectedPage_}}" | 115 <history-side-bar id="content-side-bar" selected-page="{{selectedPage_}}" |
| 107 show-footer="[[showSidebarFooter]]" | 116 show-footer="[[showSidebarFooter]]" |
| 108 hidden$="[[hasDrawer_]]"> | 117 hidden$="[[hasDrawer_]]"> |
| 109 </history-side-bar> | 118 </history-side-bar> |
| 110 <iron-pages id="content" attr-for-selected="path" | 119 <iron-pages id="content" attr-for-selected="path" |
| 111 fallback-selection="history" | 120 fallback-selection="history" |
| 112 selected="[[getSelectedPage_(selectedPage_, items)]]" | 121 selected="[[getSelectedPage_(selectedPage_, items)]]" |
| 113 items="{{items}}"> | 122 items="{{items}}"> |
| 114 <history-list-container id="history" query-state="{{queryState_}}" | 123 <history-list-container id="history" query-state="{{queryState_}}" |
| 115 query-result="[[queryResult_]]" grouped="[[grouped_]]" | 124 query-result="[[queryResult_]]" grouped="[[grouped_]]" |
| 116 grouped-range="{{queryState_.range}}" path="history"> | 125 grouped-range="{{queryState_.range}}" path="history"> |
| 117 </history-list-container> | 126 </history-list-container> |
| 118 <template is="dom-if" if="[[syncedTabsSelected_(selectedPage_)]]"> | 127 <template is="dom-if" if="[[syncedTabsSelected_(selectedPage_)]]"> |
| 119 <history-synced-device-manager id="synced-devices" | 128 <history-synced-device-manager id="synced-devices" |
| 120 session-list="[[queryResult_.sessionList]]" | 129 session-list="[[queryResult_.sessionList]]" |
| 121 search-term="[[queryState_.searchTerm]]" | 130 search-term="[[queryState_.searchTerm]]" |
| 122 sign-in-state="[[isUserSignedIn_]]" | 131 sign-in-state="[[isUserSignedIn_]]" |
| 123 path="syncedTabs"> | 132 path="syncedTabs"> |
| 124 </history-synced-device-manager> | 133 </history-synced-device-manager> |
| 125 </template> | 134 </template> |
| 126 </iron-pages> | 135 </iron-pages> |
| 127 <div id="drop-shadow"></div> | 136 <div id="drop-shadow"></div> |
| 128 </div> | 137 </div> |
| 129 | 138 |
| 130 <template is="dom-if" if="[[hasDrawer_]]"> | 139 <template is="dom-if" if="[[hasDrawer_]]"> |
| 131 <app-drawer id="drawer" swipe-open align="start" tabindex="0"> | 140 <app-drawer id="drawer" swipe-open align="start" tabindex="0" |
| 141 on-opened-changed="onOpenedChanged_"> | |
| 132 <div id="drawer-header"> | 142 <div id="drawer-header"> |
| 133 <h1>$i18n{title}</h1> | 143 <h1>$i18n{title}</h1> |
| 134 </div> | 144 </div> |
| 135 <history-side-bar id="drawer-side-bar" selected-page="{{selectedPage_}}" | 145 <history-side-bar id="drawer-side-bar" selected-page="{{selectedPage_}}" |
| 136 show-footer="[[showSidebarFooter]]" drawer> | 146 show-footer="[[showSidebarFooter]]" drawer> |
| 137 </history-side-bar> | 147 </history-side-bar> |
| 138 </app-drawer> | 148 </app-drawer> |
| 139 </template> | 149 </template> |
| 140 | 150 |
| 141 <iron-media-query query="(max-width: 1023px)" | 151 <iron-media-query query="(max-width: 1023px)" |
| 142 query-matches="{{hasDrawer_}}"> | 152 query-matches="{{hasDrawer_}}"> |
| 143 </iron-media-query> | 153 </iron-media-query> |
| 144 </template> | 154 </template> |
| 145 <script src="chrome://history/app.js"></script> | 155 <script src="chrome://history/app.js"></script> |
| 146 </dom-module> | 156 </dom-module> |
| OLD | NEW |