summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webscriptsource.h
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-13 23:26:13 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-13 23:26:13 +0000
commitbad146c5b3b1a7d0368320fecdbd5b50dbe97501 (patch)
tree8d5aad70f51fcfba24ccebd3359b7d33209370d7 /webkit/glue/webscriptsource.h
parentccef48cca72fbc8905a643759092ee0d913aca9c (diff)
downloadchromium_src-bad146c5b3b1a7d0368320fecdbd5b50dbe97501.zip
chromium_src-bad146c5b3b1a7d0368320fecdbd5b50dbe97501.tar.gz
chromium_src-bad146c5b3b1a7d0368320fecdbd5b50dbe97501.tar.bz2
Commit 40144. I had to move to to a separate CL to use gcl's
"try multiple commits" feature. Review URL: http://codereview.chromium.org/46062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11683 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webscriptsource.h')
-rw-r--r--webkit/glue/webscriptsource.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/webkit/glue/webscriptsource.h b/webkit/glue/webscriptsource.h
new file mode 100644
index 0000000..5f9fd23
--- /dev/null
+++ b/webkit/glue/webscriptsource.h
@@ -0,0 +1,29 @@
+// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WEBKIT_GLUE_WEBSCRIPT_SOURCE_H_
+#define WEBKIT_GLUE_WEBSCRIPT_SOURCE_H_
+
+namespace webkit_glue {
+
+// Describes some script that can be executed within a frame.
+// NOTE: start_line is 1-based (like the corresponding object in WebCore).
+// TODO(aa): Allow clients to specify external data intead of strings to avoid
+// copies.
+struct WebScriptSource {
+ WebScriptSource(const std::string& source)
+ : source(source), start_line(1) {}
+ WebScriptSource(const std::string& source, const GURL& url)
+ : source(source), url(url), start_line(1) {}
+ WebScriptSource(const std::string& source, const GURL& url, int start_line)
+ : source(source), url(url), start_line(start_line) {}
+
+ std::string source;
+ GURL url;
+ int start_line;
+};
+
+} // namespace webkit_glue
+
+#endif // WEBKIT_GLUE_WEBSCRIPT_SOURCE_H_