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

Side by Side Diff: webkit/glue/devtools/js/inspector_controller_impl.js

Issue 54002: Make DevTools client survive 'refresh' of the inspectable tab. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/glue/devtools/js/dom_agent.js ('k') | webkit/glue/devtools/tools_agent.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview DevTools' implementation of the InspectorController API. 6 * @fileoverview DevTools' implementation of the InspectorController API.
7 */ 7 */
8 goog.require('devtools.InspectorController'); 8 goog.require('devtools.InspectorController');
9 9
10 goog.provide('devtools.InspectorControllerImpl'); 10 goog.provide('devtools.InspectorControllerImpl');
11 11
12 devtools.InspectorControllerImpl = function() { 12 devtools.InspectorControllerImpl = function() {
13 devtools.InspectorController.call(this); 13 devtools.InspectorController.call(this);
14 this.frame_element_id_ = 1; 14 this.frame_element_id_ = 1;
15 15
16 this.window_ = { 16 this.window_ = {
17 get document() { 17 get document() {
18 return domAgent.document; 18 return devtools.tools.getDomAgent().getDocument();
19 }, 19 },
20 get Node() { 20 get Node() {
21 return devtools.DomNode; 21 return devtools.DomNode;
22 }, 22 },
23 get Element() { 23 get Element() {
24 return devtools.DomNode; 24 return devtools.DomNode;
25 } 25 }
26 }; 26 };
27 }; 27 };
28 goog.inherits(devtools.InspectorControllerImpl, 28 goog.inherits(devtools.InspectorControllerImpl,
(...skipping 20 matching lines...) Expand all
49 return true; 49 return true;
50 }; 50 };
51 51
52 52
53 /** 53 /**
54 * {@inheritDoc}. 54 * {@inheritDoc}.
55 */ 55 */
56 devtools.InspectorController.prototype.addResourceSourceToFrame = 56 devtools.InspectorController.prototype.addResourceSourceToFrame =
57 function(identifier, element) { 57 function(identifier, element) {
58 var self = this; 58 var self = this;
59 netAgent.getResourceContentAsync(identifier, function(source) { 59 tools.getNetAgent().getResourceContentAsync(identifier, function(source) {
60 var resource = netAgent.getResource(identifier); 60 var resource = netAgent.getResource(identifier);
61 self.addSourceToFrame(resource.mimeType, source, element); 61 self.addSourceToFrame(resource.mimeType, source, element);
62 }); 62 });
63 return false; 63 return false;
64 }; 64 };
65 65
66 66
67 /** 67 /**
68 * {@inheritDoc}. 68 * {@inheritDoc}.
69 */ 69 */
(...skipping 12 matching lines...) Expand all
82 82
83 83
84 /** 84 /**
85 * {@inheritDoc}. 85 * {@inheritDoc}.
86 */ 86 */
87 devtools.InspectorControllerImpl.prototype.inspectedWindow = function() { 87 devtools.InspectorControllerImpl.prototype.inspectedWindow = function() {
88 return this.window_; 88 return this.window_;
89 }; 89 };
90 90
91 91
92 /**
93 * {@inheritDoc}.
94 */
95 devtools.InspectorController.prototype.loaded = function() {
96 DevToolsHost.loaded();
97 };
98
99 var InspectorController = new devtools.InspectorControllerImpl(); 92 var InspectorController = new devtools.InspectorControllerImpl();
OLDNEW
« no previous file with comments | « webkit/glue/devtools/js/dom_agent.js ('k') | webkit/glue/devtools/tools_agent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698