OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef WEBKIT_GLUE_WEBKIT_GLUE_H_ | 5 #ifndef WEBKIT_GLUE_WEBKIT_GLUE_H_ |
6 #define WEBKIT_GLUE_WEBKIT_GLUE_H_ | 6 #define WEBKIT_GLUE_WEBKIT_GLUE_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 | 9 |
10 #if defined(OS_WIN) | 10 #if defined(OS_WIN) |
(...skipping 18 matching lines...) Expand all Loading... |
29 | 29 |
30 namespace skia { | 30 namespace skia { |
31 class PlatformCanvas; | 31 class PlatformCanvas; |
32 } | 32 } |
33 | 33 |
34 namespace WebKit { | 34 namespace WebKit { |
35 class WebFrame; | 35 class WebFrame; |
36 class WebString; | 36 class WebString; |
37 } | 37 } |
38 | 38 |
39 namespace webkit { | |
40 struct WebPluginInfo; | |
41 } | |
42 | |
43 namespace webkit_glue { | 39 namespace webkit_glue { |
44 | 40 |
45 | |
46 //---- BEGIN FUNCTIONS IMPLEMENTED BY WEBKIT/GLUE ----------------------------- | |
47 | |
48 void SetJavaScriptFlags(const std::string& flags); | 41 void SetJavaScriptFlags(const std::string& flags); |
49 | 42 |
50 // Turn on logging for flags in the provided comma delimited list. | 43 // Turn on logging for flags in the provided comma delimited list. |
51 void EnableWebCoreLogChannels(const std::string& channels); | 44 void EnableWebCoreLogChannels(const std::string& channels); |
52 | 45 |
53 // Returns the text of the document element. | 46 // Returns the text of the document element. |
54 string16 DumpDocumentText(WebKit::WebFrame* web_frame); | 47 string16 DumpDocumentText(WebKit::WebFrame* web_frame); |
55 | 48 |
56 // Returns the text of the document element and optionally its child frames. | 49 // Returns the text of the document element and optionally its child frames. |
57 // If recursive is false, this is equivalent to DumpDocumentText followed by | 50 // If recursive is false, this is equivalent to DumpDocumentText followed by |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 // There can be many such pages (maps of 256 character -> glyph) so this is | 137 // There can be many such pages (maps of 256 character -> glyph) so this is |
145 // used to get memory usage statistics. | 138 // used to get memory usage statistics. |
146 int GetGlyphPageCount(); | 139 int GetGlyphPageCount(); |
147 | 140 |
148 // Returns WebKit Web Inspector protocol version. | 141 // Returns WebKit Web Inspector protocol version. |
149 std::string GetInspectorProtocolVersion(); | 142 std::string GetInspectorProtocolVersion(); |
150 | 143 |
151 // Tells caller whether the given protocol version is supported by the. | 144 // Tells caller whether the given protocol version is supported by the. |
152 bool IsInspectorProtocolVersionSupported(const std::string& version); | 145 bool IsInspectorProtocolVersionSupported(const std::string& version); |
153 | 146 |
154 //---- END FUNCTIONS IMPLEMENTED BY WEBKIT/GLUE ------------------------------- | |
155 | |
156 | |
157 //---- BEGIN FUNCTIONS IMPLEMENTED BY EMBEDDER -------------------------------- | |
158 | |
159 // Glue to get resources from the embedder. | |
160 | |
161 // Gets a localized string given a message id. Returns an empty string if the | |
162 // message id is not found. | |
163 string16 GetLocalizedString(int message_id); | |
164 | |
165 // Returns the raw data for a resource. This resource must have been | |
166 // specified as BINDATA in the relevant .rc file. | |
167 base::StringPiece GetDataResource(int resource_id); | |
168 | |
169 // Embedders implement this function to return the list of plugins to Webkit. | |
170 void GetPlugins(bool refresh, | |
171 std::vector<webkit::WebPluginInfo>* plugins); | |
172 | |
173 // ---- END FUNCTIONS IMPLEMENTED BY EMBEDDER --------------------------------- | |
174 | |
175 | |
176 } // namespace webkit_glue | 147 } // namespace webkit_glue |
177 | 148 |
178 #endif // WEBKIT_GLUE_WEBKIT_GLUE_H_ | 149 #endif // WEBKIT_GLUE_WEBKIT_GLUE_H_ |
OLD | NEW |