| 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 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 namespace skia { | 31 namespace skia { |
| 32 class PlatformCanvas; | 32 class PlatformCanvas; |
| 33 } | 33 } |
| 34 | 34 |
| 35 namespace WebKit { | 35 namespace WebKit { |
| 36 class WebFrame; | 36 class WebFrame; |
| 37 class WebString; | 37 class WebString; |
| 38 } | 38 } |
| 39 | 39 |
| 40 namespace webkit { | |
| 41 struct WebPluginInfo; | |
| 42 } | |
| 43 | |
| 44 namespace webkit_glue { | 40 namespace webkit_glue { |
| 45 | 41 |
| 46 | 42 |
| 47 //---- BEGIN FUNCTIONS IMPLEMENTED BY WEBKIT/GLUE ----------------------------- | 43 //---- BEGIN FUNCTIONS IMPLEMENTED BY WEBKIT/GLUE ----------------------------- |
| 48 | 44 |
| 49 void SetJavaScriptFlags(const std::string& flags); | 45 void SetJavaScriptFlags(const std::string& flags); |
| 50 | 46 |
| 51 // Turn on logging for flags in the provided comma delimited list. | 47 // Turn on logging for flags in the provided comma delimited list. |
| 52 void EnableWebCoreLogChannels(const std::string& channels); | 48 void EnableWebCoreLogChannels(const std::string& channels); |
| 53 | 49 |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 // Tells caller whether the given protocol version is supported by the. | 148 // Tells caller whether the given protocol version is supported by the. |
| 153 bool IsInspectorProtocolVersionSupported(const std::string& version); | 149 bool IsInspectorProtocolVersionSupported(const std::string& version); |
| 154 | 150 |
| 155 //---- END FUNCTIONS IMPLEMENTED BY WEBKIT/GLUE ------------------------------- | 151 //---- END FUNCTIONS IMPLEMENTED BY WEBKIT/GLUE ------------------------------- |
| 156 | 152 |
| 157 | 153 |
| 158 //---- BEGIN FUNCTIONS IMPLEMENTED BY EMBEDDER -------------------------------- | 154 //---- BEGIN FUNCTIONS IMPLEMENTED BY EMBEDDER -------------------------------- |
| 159 | 155 |
| 160 // Glue to get resources from the embedder. | 156 // Glue to get resources from the embedder. |
| 161 | 157 |
| 162 // Gets a localized string given a message id. Returns an empty string if the | |
| 163 // message id is not found. | |
| 164 string16 GetLocalizedString(int message_id); | |
| 165 | |
| 166 // Returns the raw data for a resource. This resource must have been | |
| 167 // specified as BINDATA in the relevant .rc file. | |
| 168 base::StringPiece GetDataResource(int resource_id); | |
| 169 | |
| 170 // Glue to access the clipboard. | 158 // Glue to access the clipboard. |
| 171 | 159 |
| 172 // Get a clipboard that can be used to construct a ScopedClipboardWriterGlue. | 160 // Get a clipboard that can be used to construct a ScopedClipboardWriterGlue. |
| 173 ui::Clipboard* ClipboardGetClipboard(); | 161 ui::Clipboard* ClipboardGetClipboard(); |
| 174 | 162 |
| 175 // Get a sequence number which uniquely identifies clipboard state. | 163 // Get a sequence number which uniquely identifies clipboard state. |
| 176 uint64 ClipboardGetSequenceNumber(ui::Clipboard::Buffer buffer); | 164 uint64 ClipboardGetSequenceNumber(ui::Clipboard::Buffer buffer); |
| 177 | 165 |
| 178 // Tests whether the clipboard contains a certain format | 166 // Tests whether the clipboard contains a certain format |
| 179 bool ClipboardIsFormatAvailable(const ui::Clipboard::FormatType& format, | 167 bool ClipboardIsFormatAvailable(const ui::Clipboard::FormatType& format, |
| (...skipping 10 matching lines...) Expand all Loading... |
| 190 // Reads ASCII text from the clipboard, if available. | 178 // Reads ASCII text from the clipboard, if available. |
| 191 void ClipboardReadAsciiText(ui::Clipboard::Buffer buffer, std::string* result); | 179 void ClipboardReadAsciiText(ui::Clipboard::Buffer buffer, std::string* result); |
| 192 | 180 |
| 193 // Reads HTML from the clipboard, if available. | 181 // Reads HTML from the clipboard, if available. |
| 194 void ClipboardReadHTML(ui::Clipboard::Buffer buffer, string16* markup, | 182 void ClipboardReadHTML(ui::Clipboard::Buffer buffer, string16* markup, |
| 195 GURL* url, uint32* fragment_start, | 183 GURL* url, uint32* fragment_start, |
| 196 uint32* fragment_end); | 184 uint32* fragment_end); |
| 197 | 185 |
| 198 void ClipboardReadImage(ui::Clipboard::Buffer buffer, std::string* data); | 186 void ClipboardReadImage(ui::Clipboard::Buffer buffer, std::string* data); |
| 199 | 187 |
| 200 // Embedders implement this function to return the list of plugins to Webkit. | |
| 201 void GetPlugins(bool refresh, | |
| 202 std::vector<webkit::WebPluginInfo>* plugins); | |
| 203 | |
| 204 // Returns true if the protocol implemented to serve |url| supports features | 188 // Returns true if the protocol implemented to serve |url| supports features |
| 205 // required by the media engine. | 189 // required by the media engine. |
| 206 bool IsProtocolSupportedForMedia(const GURL& url); | 190 bool IsProtocolSupportedForMedia(const GURL& url); |
| 207 | 191 |
| 208 // Returns the locale that this instance of webkit is running as. This is of | 192 // Returns the locale that this instance of webkit is running as. This is of |
| 209 // the form language-country (e.g., en-US or pt-BR). | 193 // the form language-country (e.g., en-US or pt-BR). |
| 210 std::string GetWebKitLocale(); | 194 std::string GetWebKitLocale(); |
| 211 | 195 |
| 212 // Returns true if the embedder is running in single process mode. | 196 // Returns true if the embedder is running in single process mode. |
| 213 bool IsSingleProcess(); | 197 bool IsSingleProcess(); |
| 214 | 198 |
| 215 // ---- END FUNCTIONS IMPLEMENTED BY EMBEDDER --------------------------------- | 199 // ---- END FUNCTIONS IMPLEMENTED BY EMBEDDER --------------------------------- |
| 216 | 200 |
| 217 | 201 |
| 218 } // namespace webkit_glue | 202 } // namespace webkit_glue |
| 219 | 203 |
| 220 #endif // WEBKIT_GLUE_WEBKIT_GLUE_H_ | 204 #endif // WEBKIT_GLUE_WEBKIT_GLUE_H_ |
| OLD | NEW |