2
2
// Use of this source code is governed by a BSD-style license that can be
3
3
// found in the LICENSE file.
4
4
5
+ import * as Common from '../common/common.js' ;
6
+ import * as SDK from '../sdk/sdk.js' ;
7
+ import * as UI from '../ui/ui.js' ;
8
+
5
9
/**
6
- * @implements {UI.ToolbarItem .Provider}
10
+ * @implements {UI.Toolbar .Provider}
7
11
* @unrestricted
8
12
*/
9
13
export class WarningErrorCounter {
10
14
constructor ( ) {
11
15
WarningErrorCounter . _instanceForTest = this ;
12
16
13
17
const countersWrapper = createElement ( 'div' ) ;
14
- this . _toolbarItem = new UI . ToolbarItem ( countersWrapper ) ;
18
+ this . _toolbarItem = new UI . Toolbar . ToolbarItem ( countersWrapper ) ;
15
19
16
20
this . _counter = createElement ( 'div' ) ;
17
21
this . _counter . addEventListener ( 'click' , self . Common . console . show . bind ( self . Common . console ) , false ) ;
18
- const shadowRoot = UI . createShadowRootWithCoreStyles ( this . _counter , 'console_counters/errorWarningCounter.css' ) ;
22
+ const shadowRoot =
23
+ UI . Utils . createShadowRootWithCoreStyles ( this . _counter , 'console_counters/errorWarningCounter.css' ) ;
19
24
countersWrapper . appendChild ( this . _counter ) ;
20
25
21
26
this . _violationCounter = createElement ( 'div' ) ;
22
27
this . _violationCounter . addEventListener ( 'click' , ( ) => {
23
28
self . UI . viewManager . showView ( 'audits' ) ;
24
29
} ) ;
25
30
const violationShadowRoot =
26
- UI . createShadowRootWithCoreStyles ( this . _violationCounter , 'console_counters/errorWarningCounter.css' ) ;
31
+ UI . Utils . createShadowRootWithCoreStyles ( this . _violationCounter , 'console_counters/errorWarningCounter.css' ) ;
27
32
if ( Root . Runtime . experiments . isEnabled ( 'spotlight' ) ) {
28
33
countersWrapper . appendChild ( this . _violationCounter ) ;
29
34
}
@@ -38,7 +43,7 @@ export class WarningErrorCounter {
38
43
this . _errorCount = - 1 ;
39
44
this . _warningCount = - 1 ;
40
45
this . _violationCount = - 1 ;
41
- this . _throttler = new Common . Throttler ( 100 ) ;
46
+ this . _throttler = new Common . Throttler . Throttler ( 100 ) ;
42
47
43
48
self . SDK . consoleModel . addEventListener ( SDK . ConsoleModel . Events . ConsoleCleared , this . _update , this ) ;
44
49
self . SDK . consoleModel . addEventListener ( SDK . ConsoleModel . Events . MessageAdded , this . _update , this ) ;
@@ -145,7 +150,7 @@ export class WarningErrorCounter {
145
150
146
151
/**
147
152
* @override
148
- * @return {?UI.ToolbarItem }
153
+ * @return {?UI.Toolbar. ToolbarItem }
149
154
*/
150
155
item ( ) {
151
156
return this . _toolbarItem ;
0 commit comments