var context = {};
(function () {
Preferences.ignoreWhitespace = false;
Preferences.samplingCPUProfiler = true;
Preferences.heapProfilerPresent = true;
Preferences.detailedHeapProfiles = false;
Preferences.debuggerAlwaysEnabled = true;
Preferences.profilerAlwaysEnabled = true;
Preferences.canEditScriptSource = true;
Preferences.onlineDetectionEnabled = false;
Preferences.nativeInstrumentationEnabled = true;
Preferences.fileSystemEnabled = false;
Preferences.showTimingTab = true;
Preferences.showCookiesTab = true;
Preferences.saveAsAvailable = true;
Preferences.useLowerCaseMenuTitlesOnWindows = true;
})();
WebInspector.MIMETypes["image/webp"] = {2: true};
var devtools = devtools || {};
devtools.domContentLoaded = function()
{
WebInspector.setAttachedWindow(WebInspector.queryParamsObject.docked === "true");
if (WebInspector.queryParamsObject.toolbar_color && WebInspector.queryParamsObject.text_color)
WebInspector.setToolbarColors(WebInspector.queryParamsObject.toolbar_color, WebInspector.queryParamsObject.text_color);
}
document.addEventListener("DOMContentLoaded", devtools.domContentLoaded, false);
(function InterceptProfilesPanelEvents()
{
var oldShow = WebInspector.ProfilesPanel.prototype.show;
WebInspector.ProfilesPanel.prototype.show = function()
{
this.enableToggleButton.visible = false;
oldShow.call(this);
WebInspector.ProfilesPanel.prototype.show = oldShow;
};
})();
WebInspector.UIString = function(string)
{
return String.vsprintf(string, Array.prototype.slice.call(arguments, 1));
};
(function()
{
var originalDragStart = WebInspector.elementDragStart;
WebInspector.elementDragStart = function(element)
{
if (element) {
var glassPane = document.createElement("div");
glassPane.style.cssText = "position:absolute;width:100%;height:100%;opacity:0;z-index:1";
glassPane.id = "glass-pane-for-drag";
element.parentElement.appendChild(glassPane);
}
originalDragStart.apply(this, arguments);
};
var originalDragEnd = WebInspector.elementDragEnd;
WebInspector.elementDragEnd = function()
{
originalDragEnd.apply(this, arguments);
var glassPane = document.getElementById("glass-pane-for-drag");
if (glassPane)
glassPane.parentElement.removeChild(glassPane);
};
})();
WebInspector.setToolbarColors = function(backgroundColor, color)
{
if (!WebInspector._themeStyleElement) {
WebInspector._themeStyleElement = document.createElement("style");
document.head.appendChild(WebInspector._themeStyleElement);
}
WebInspector._themeStyleElement.textContent =
"#toolbar {\
background-image: none !important;\
background-color: " + backgroundColor + " !important;\
}\
\
.toolbar-label {\
color: " + color + " !important;\
text-shadow: none;\
}";
}
WebInspector.resetToolbarColors = function()
{
if (WebInspector._themeStyleElement)
WebInspector._themeStyleElement.textContent = "";
}
WebInspector.platformExtensionAPI = function(tabId)
{
function getTabId()
{
return tabId;
}
webInspector.inspectedWindow.__proto__.__defineGetter__("tabId", getTabId);
chrome = window.chrome || {};
chrome.experimental = chrome.experimental || {};
chrome.experimental.devtools = chrome.experimental.devtools || {};
for (var property in webInspector)
chrome.experimental.devtools[property] = webInspector[property];
}
WebInspector.buildPlatformExtensionAPI = function()
{
return "(" + WebInspector.platformExtensionAPI + ")(" + WebInspector._inspectedTabId + ");";
}
WebInspector.setInspectedTabId = function(tabId)
{
WebInspector._inspectedTabId = tabId;
}
if (WebInspector.InspectorFrontendHostStub) {
WebInspector.InspectorFrontendHostStub.prototype.inspectedURLChanged = function(url)
{
document.title = "Developer Tools - " + url;
}
}