Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(183)

Unified Diff: sky/framework/inspector/page-agent.sky

Issue 674823003: Add basic console support to Sky's inspector. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: No need to change abarth.sky now Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sky/framework/inspector/page-agent.sky
diff --git a/sky/framework/inspector/page-agent.sky b/sky/framework/inspector/page-agent.sky
index 053954caaf281662a06c42bfb75fbfdec3b1972d..c0900b7d6d7464d56a44926f40b03fdccf966ac4 100644
--- a/sky/framework/inspector/page-agent.sky
+++ b/sky/framework/inspector/page-agent.sky
@@ -1,21 +1,38 @@
<script>
-function PageAgent() {
+function Page() {
}
-PageAgent.prototype.enable = function() {
+Page.prototype.enable = function() {
};
-PageAgent.prototype.canScreencast = function() {
+Page.prototype.canScreencast = function() {
return {
result: false
};
};
-PageAgent.prototype.canEmulate = function() {
+Page.prototype.canEmulate = function() {
return {
result: false
};
};
-this.exports = PageAgent;
+Page.prototype.getResourceTree = function() {
+ // Unclear if this is all needed, but if we don't return something here
+ // the inspector hits an exception in WebInspector.ResourceTreeModel.
+ return {
+ "frameTree": {
+ "frame": {
+ "id": 1,
+ "loaderId": 1,
+ "url": document.URL,
+ "mimeType": "text/html",
+ "securityOrigin": document.URL,
+ },
+ "resources": [], // FIXME
+ }
+ };
+};
+
+this.exports = Page;
</script>

Powered by Google App Engine
This is Rietveld 408576698