@@ -58,7 +58,7 @@ cls.NetworkLogView = function(id, name, container_class, html, default_handler,
5858 else
5959 this . text_search . set_query_selector ( "[handler='select-network-request']" ) ;
6060
61- var ctx = this . _service . get_request_context ( this . _service . CONTEXT_TYPE_LOGGER ) ;
61+ var ctx = this . _service . get_logger_context ( ) ;
6262 if ( ctx )
6363 {
6464 if ( this . _type_filters )
@@ -120,7 +120,7 @@ cls.NetworkLogView = function(id, name, container_class, html, default_handler,
120120 this . _render_main_view = function ( container )
121121 {
122122 var selected_viewmode = settings . network_logger . get ( "selected-viewmode" ) ;
123- var ctx = this . _service . get_request_context ( this . _service . CONTEXT_TYPE_LOGGER ) ;
123+ var ctx = this . _service . get_logger_context ( ) ;
124124 var entries = ctx . get_entries_filtered ( ) ;
125125 var table_template ;
126126 if ( selected_viewmode === "data" )
@@ -149,7 +149,7 @@ cls.NetworkLogView = function(id, name, container_class, html, default_handler,
149149 {
150150 var table_template = after_render_object && after_render_object . template ;
151151 var is_data_mode = Boolean ( table_template ) ;
152- var ctx = this . _service . get_request_context ( this . _service . CONTEXT_TYPE_LOGGER ) ;
152+ var ctx = this . _service . get_logger_context ( ) ;
153153
154154 // In is_data_mode, the entries have to be retrieved from the table
155155 // to be in the correct order.
@@ -369,7 +369,7 @@ cls.NetworkLogView = function(id, name, container_class, html, default_handler,
369369 this . _resize_detail_evt = null ;
370370 } . bind ( this ) ;
371371
372- var _make_selection_func = function ( accessor )
372+ this . _move_selection = function ( accessor )
373373 {
374374 if ( this . _selected )
375375 {
@@ -454,7 +454,7 @@ cls.NetworkLogView = function(id, name, container_class, html, default_handler,
454454
455455 this . _on_graph_tooltip_bound = function ( evt , target )
456456 {
457- var ctx = this . _service . get_request_context ( this . _service . CONTEXT_TYPE_LOGGER ) ;
457+ var ctx = this . _service . get_logger_context ( ) ;
458458 this . _graph_tooltip_id = target . get_attr ( "parent-node-chain" , "data-object-id" ) ;
459459 var entry = ctx . get_entry ( this . _graph_tooltip_id ) ;
460460 if ( ! this . mono_lineheight )
@@ -489,7 +489,7 @@ cls.NetworkLogView = function(id, name, container_class, html, default_handler,
489489
490490 this . _on_url_tooltip_bound = function ( evt , target )
491491 {
492- var ctx = this . _service . get_request_context ( this . _service . CONTEXT_TYPE_LOGGER ) ;
492+ var ctx = this . _service . get_logger_context ( ) ;
493493 if ( ctx )
494494 {
495495 var entry_id = target . get_attr ( "parent-node-chain" , "data-object-id" ) ;
@@ -517,13 +517,13 @@ cls.NetworkLogView = function(id, name, container_class, html, default_handler,
517517
518518 this . _on_clear_log_bound = function ( evt , target )
519519 {
520- this . _service . remove_request_context ( ) ;
520+ this . _service . remove_logger_request_context ( ) ;
521521 this . needs_instant_update = true ;
522522 } . bind ( this ) ;
523523
524524 this . _on_close_incomplete_warning_bound = function ( evt , target )
525525 {
526- var ctx = this . _service . get_request_context ( this . _service . CONTEXT_TYPE_LOGGER ) ;
526+ var ctx = this . _service . get_logger_context ( ) ;
527527 var window_id = Number ( target . get_attr ( "parent-node-chain" , "data-reload-window-id" ) ) ;
528528 var window_context = ctx . get_window_context ( window_id ) ;
529529 if ( window_context )
@@ -545,13 +545,16 @@ cls.NetworkLogView = function(id, name, container_class, html, default_handler,
545545 {
546546 if ( message . key === "pause" )
547547 {
548- var ctx = this . _service . get_request_context ( this . _service . CONTEXT_TYPE_LOGGER ) ;
549- var is_paused = ctx . is_paused ;
550- var pause = settings . network_logger . get ( message . key ) ;
551- if ( is_paused && ! pause )
552- ctx . unpause ( ) ;
553- else if ( ! is_paused && pause )
554- ctx . pause ( ) ;
548+ var ctx = this . _service . get_logger_context ( ) ;
549+ if ( ctx )
550+ {
551+ var is_paused = ctx . is_paused ;
552+ var pause = settings . network_logger . get ( message . key ) ;
553+ if ( is_paused && ! pause )
554+ ctx . unpause ( ) ;
555+ else if ( ! is_paused && pause )
556+ ctx . pause ( ) ;
557+ }
555558 }
556559 else if ( message . key === "network-profiler-mode" )
557560 {
@@ -656,7 +659,7 @@ cls.NetworkLogView = function(id, name, container_class, html, default_handler,
656659 {
657660 if ( message . context_type === this . _service . CONTEXT_TYPE_LOGGER )
658661 {
659- var ctx = this . _service . get_request_context ( message . context_type ) ;
662+ var ctx = this . _service . get_logger_context ( ) ;
660663 if ( this . _type_filters )
661664 ctx . set_filters ( this . _type_filters ) ;
662665
@@ -702,10 +705,9 @@ cls.NetworkLogView = function(id, name, container_class, html, default_handler,
702705 this . _service . addListener ( "context-removed" , this . _on_context_removed_bound ) ;
703706 this . _service . addListener ( "resource-update" , this . update . bind ( this ) ) ;
704707
705- ActionHandlerInterface . apply ( this ) ;
706708 this . _handlers = {
707- "select-next-entry" : _make_selection_func . bind ( this , "nextElementSibling" ) ,
708- "select-previous-entry" : _make_selection_func . bind ( this , "previousElementSibling" ) ,
709+ "select-next-entry" : this . _move_selection . bind ( this , "nextElementSibling" ) ,
710+ "select-previous-entry" : this . _move_selection . bind ( this , "previousElementSibling" ) ,
709711 "close-details" : this . _on_clicked_close_bound
710712 } ;
711713 ActionBroker . get_instance ( ) . register_handler ( this ) ;
@@ -720,6 +722,7 @@ cls.NetworkLogView = function(id, name, container_class, html, default_handler,
720722 this . init ( id , name , container_class , html , default_handler ) ;
721723 } ;
722724
725+ ActionHandlerInterface . apply ( this ) ;
723726 this . _init ( id , name , container_class , html , default_handler ) ;
724727} ;
725728cls . NetworkLogView . prototype = ViewBase ;
0 commit comments