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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/screencast/InputModel.js

Issue 2851913002: [DevTools] Do not expose agents on Target
Patch Set: storage and tests.js Created 3 years, 7 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
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 Screencast.InputModel = class extends SDK.SDKModel { 5 Screencast.InputModel = class extends SDK.SDKModel {
6 /** 6 /**
7 * @param {!SDK.Target} target 7 * @param {!SDK.Target} target
8 * @param {!Protocol.Dispatcher} dispatcher
8 */ 9 */
9 constructor(target) { 10 constructor(target, dispatcher) {
10 super(target); 11 super(target, dispatcher);
11 this._inputAgent = target.inputAgent(); 12 this._inputAgent = dispatcher.inputAgent();
12 /** @type {?number} */ 13 /** @type {?number} */
13 this._activeTouchOffsetTop = null; 14 this._activeTouchOffsetTop = null;
14 this._activeTouchParams = null; 15 this._activeTouchParams = null;
15 } 16 }
16 17
17 /** 18 /**
18 * @param {!Event} event 19 * @param {!Event} event
19 */ 20 */
20 emitKeyEvent(event) { 21 emitKeyEvent(event) {
21 var type; 22 var type;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 /** 108 /**
108 * @param {!Event} event 109 * @param {!Event} event
109 * @return {number} 110 * @return {number}
110 */ 111 */
111 _modifiersForEvent(event) { 112 _modifiersForEvent(event) {
112 return (event.altKey ? 1 : 0) | (event.ctrlKey ? 2 : 0) | (event.metaKey ? 4 : 0) | (event.shiftKey ? 8 : 0); 113 return (event.altKey ? 1 : 0) | (event.ctrlKey ? 2 : 0) | (event.metaKey ? 4 : 0) | (event.shiftKey ? 8 : 0);
113 } 114 }
114 }; 115 };
115 116
116 SDK.SDKModel.register(Screencast.InputModel, SDK.Target.Capability.Input, false) ; 117 SDK.SDKModel.register(Screencast.InputModel, SDK.Target.Capability.Input, false) ;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698