1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
8 WebInspector
.OverlayController = function()
10 WebInspector
.moduleSetting("disablePausedStateOverlay").addChangeListener(this._updateOverlayMessage
, this);
11 WebInspector
.targetManager
.addModelListener(WebInspector
.DebuggerModel
, WebInspector
.DebuggerModel
.Events
.DebuggerPaused
, this._updateOverlayMessage
, this);
12 WebInspector
.targetManager
.addModelListener(WebInspector
.DebuggerModel
, WebInspector
.DebuggerModel
.Events
.DebuggerResumed
, this._updateOverlayMessage
, this);
13 WebInspector
.targetManager
.addModelListener(WebInspector
.DebuggerModel
, WebInspector
.DebuggerModel
.Events
.GlobalObjectCleared
, this._updateOverlayMessage
, this);
16 WebInspector
.OverlayController
.prototype = {
19 * @param {!WebInspector.Event} event
21 _updateOverlayMessage: function(event
)
23 var debuggerModel
= /** @type {!WebInspector.DebuggerModel} */ (event
.target
);
24 var message
= debuggerModel
.isPaused() && !WebInspector
.moduleSetting("disablePausedStateOverlay").get() ? WebInspector
.UIString("Paused in debugger") : undefined;
25 debuggerModel
.target().pageAgent().setOverlayMessage(message
);