| Index: Source/devtools/blink/chromeServerProfile/Default/Cache/f_000069
|
| diff --git a/Source/devtools/front_end/ScreencastView.js b/Source/devtools/blink/chromeServerProfile/Default/Cache/f_000069
|
| similarity index 96%
|
| copy from Source/devtools/front_end/ScreencastView.js
|
| copy to Source/devtools/blink/chromeServerProfile/Default/Cache/f_000069
|
| index cd330635f02e6628c77c8f56205e44021ba6ddc0..69457604318b473fbbf0bd73b3ed9a1eec8bad94 100644
|
| --- a/Source/devtools/front_end/ScreencastView.js
|
| +++ b/Source/devtools/blink/chromeServerProfile/Default/Cache/f_000069
|
| @@ -32,13 +32,10 @@
|
| * @constructor
|
| * @extends {WebInspector.VBox}
|
| * @implements {WebInspector.DOMNodeHighlighter}
|
| - * @param {!WebInspector.Target} target
|
| */
|
| -WebInspector.ScreencastView = function(target)
|
| +WebInspector.ScreencastView = function()
|
| {
|
| WebInspector.VBox.call(this);
|
| - this._target = target;
|
| -
|
| this.setMinimumSize(150, 150);
|
| this.registerRequiredCSS("screencastView.css");
|
| };
|
| @@ -130,8 +127,8 @@ WebInspector.ScreencastView.prototype = {
|
| }
|
| dimensions.width *= WebInspector.zoomManager.zoomFactor();
|
| dimensions.height *= WebInspector.zoomManager.zoomFactor();
|
| - this._target.pageAgent().startScreencast("jpeg", 80, Math.min(maxImageDimension, dimensions.width), Math.min(maxImageDimension, dimensions.height));
|
| - this._target.domModel.setHighlighter(this);
|
| + PageAgent.startScreencast("jpeg", 80, Math.min(maxImageDimension, dimensions.width), Math.min(maxImageDimension, dimensions.height));
|
| + WebInspector.domModel.setHighlighter(this);
|
| },
|
|
|
| _stopCasting: function()
|
| @@ -139,8 +136,8 @@ WebInspector.ScreencastView.prototype = {
|
| if (!this._isCasting)
|
| return;
|
| this._isCasting = false;
|
| - this._target.pageAgent().stopScreencast();
|
| - this._target.domModel.setHighlighter(null);
|
| + PageAgent.stopScreencast();
|
| + WebInspector.domModel.setHighlighter(null);
|
| },
|
|
|
| /**
|
| @@ -171,7 +168,7 @@ WebInspector.ScreencastView.prototype = {
|
| this._resizeViewport(screenWidthDIP, screenHeightDIP);
|
|
|
| this._imageZoom = this._imageElement.naturalWidth ? this._canvasElement.offsetWidth / this._imageElement.naturalWidth : 1;
|
| - this.highlightDOMNode(this._highlightNode, this._highlightConfig);
|
| + this.highlightDOMNode(this._highlightNodeId, this._highlightConfig);
|
| },
|
|
|
| _isGlassPaneActive: function()
|
| @@ -268,20 +265,21 @@ WebInspector.ScreencastView.prototype = {
|
| }
|
|
|
| var position = this._convertIntoScreenSpace(event);
|
| - this._target.domModel.nodeForLocation(position.x / this._pageScaleFactor, position.y / this._pageScaleFactor, callback.bind(this));
|
| + DOMAgent.getNodeForLocation(position.x / this._pageScaleFactor, position.y / this._pageScaleFactor, callback.bind(this));
|
|
|
| /**
|
| - * @param {?WebInspector.DOMNode} node
|
| + * @param {?Protocol.Error} error
|
| + * @param {number} nodeId
|
| * @this {WebInspector.ScreencastView}
|
| */
|
| - function callback(node)
|
| + function callback(error, nodeId)
|
| {
|
| - if (!node)
|
| + if (error)
|
| return;
|
| if (event.type === "mousemove")
|
| - node.highlight(this._inspectModeConfig);
|
| + this.highlightDOMNode(nodeId, this._inspectModeConfig);
|
| else if (event.type === "click")
|
| - node.reveal();
|
| + WebInspector.Revealer.reveal(WebInspector.domModel.nodeForId(nodeId));
|
| }
|
| },
|
|
|
| @@ -439,15 +437,15 @@ WebInspector.ScreencastView.prototype = {
|
| },
|
|
|
| /**
|
| - * @param {?WebInspector.DOMNode} node
|
| + * @param {!DOMAgent.NodeId} nodeId
|
| * @param {?DOMAgent.HighlightConfig} config
|
| * @param {!RuntimeAgent.RemoteObjectId=} objectId
|
| */
|
| - highlightDOMNode: function(node, config, objectId)
|
| + highlightDOMNode: function(nodeId, config, objectId)
|
| {
|
| - this._highlightNode = node;
|
| + this._highlightNodeId = nodeId;
|
| this._highlightConfig = config;
|
| - if (!node) {
|
| + if (!nodeId) {
|
| this._model = null;
|
| this._config = null;
|
| this._node = null;
|
| @@ -456,16 +454,17 @@ WebInspector.ScreencastView.prototype = {
|
| return;
|
| }
|
|
|
| - this._node = node;
|
| - node.boxModel(callback.bind(this));
|
| + this._node = WebInspector.domModel.nodeForId(nodeId);
|
| + DOMAgent.getBoxModel(nodeId, callback.bind(this));
|
|
|
| /**
|
| - * @param {?DOMAgent.BoxModel} model
|
| + * @param {?Protocol.Error} error
|
| + * @param {!DOMAgent.BoxModel} model
|
| * @this {WebInspector.ScreencastView}
|
| */
|
| - function callback(model)
|
| + function callback(error, model)
|
| {
|
| - if (!model) {
|
| + if (error) {
|
| this._repaint();
|
| return;
|
| }
|
| @@ -927,8 +926,7 @@ WebInspector.ScreencastController = function()
|
| this._rootSplitView.show(rootView.element);
|
|
|
| WebInspector.inspectorView.show(this._rootSplitView.sidebarElement());
|
| - var target = /** @type {!WebInspector.Target} */ (WebInspector.targetManager.activeTarget());
|
| - this._screencastView = new WebInspector.ScreencastView(target);
|
| + this._screencastView = new WebInspector.ScreencastView();
|
| this._screencastView.show(this._rootSplitView.mainElement());
|
|
|
| this._onStatusBarButtonStateChanged("disabled");
|
|
|