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

Side by Side Diff: Source/devtools/front_end/common/StaticContentProvider.js

Issue 471433004: DevTools: Split out the "workspace" and "bindings" modules from "sdk" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove marker interfaces and WI.SourceMapping Created 6 years, 4 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
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 /**
6 * @constructor
7 * @implements {WebInspector.ContentProvider}
8 * @param {!WebInspector.ResourceType} contentType
9 * @param {string} content
10 */
11 WebInspector.StaticContentProvider = function(contentType, content)
12 {
13 this._content = content;
14 this._contentType = contentType;
15 }
16
17 WebInspector.StaticContentProvider.prototype = {
18 /**
19 * @return {string}
20 */
21 contentURL: function()
22 {
23 return "";
24 },
25
26 /**
27 * @return {!WebInspector.ResourceType}
28 */
29 contentType: function()
30 {
31 return this._contentType;
32 },
33
34 /**
35 * @param {function(?string)} callback
36 */
37 requestContent: function(callback)
38 {
39 callback(this._content);
40 },
41
42 /**
43 * @param {string} query
44 * @param {boolean} caseSensitive
45 * @param {boolean} isRegex
46 * @param {function(!Array.<!WebInspector.ContentProvider.SearchMatch>)} cal lback
47 */
48 searchInContent: function(query, caseSensitive, isRegex, callback)
49 {
50 /**
51 * @this {WebInspector.StaticContentProvider}
52 */
53 function performSearch()
54 {
55 callback(WebInspector.ContentProvider.performSearchInContent(this._c ontent, query, caseSensitive, isRegex));
56 }
57
58 // searchInContent should call back later.
59 self.setTimeout(performSearch.bind(this), 0);
60 }
61 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/common/ResourceType.js ('k') | Source/devtools/front_end/inspector.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698