OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 bool IsMediaPlayerAvailable(); | 143 bool IsMediaPlayerAvailable(); |
144 | 144 |
145 // This function is called to request a prefetch of the entire URL, loading it | 145 // This function is called to request a prefetch of the entire URL, loading it |
146 // into our cache for (expected) future needs. The given URL may NOT be in | 146 // into our cache for (expected) future needs. The given URL may NOT be in |
147 // canonical form and it will NOT be null-terminated; use the length instead. | 147 // canonical form and it will NOT be null-terminated; use the length instead. |
148 void PrecacheUrl(const char16* url, int url_length); | 148 void PrecacheUrl(const char16* url, int url_length); |
149 | 149 |
150 // This function is called to add a line to the application's log file. | 150 // This function is called to add a line to the application's log file. |
151 void AppendToLog(const char* filename, int line, const char* message); | 151 void AppendToLog(const char* filename, int line, const char* message); |
152 | 152 |
| 153 // Sets a cookie string for the given URL. The policy_url argument indicates |
| 154 // the URL of the topmost frame, which may be useful for determining whether or |
| 155 // not to allow this cookie setting. NOTE: the cookie string is a standard |
| 156 // cookie string of the form "name=value; option1=x; option2=y" |
| 157 void SetCookie(const GURL& url, const GURL& policy_url, |
| 158 const std::string& cookie); |
| 159 |
| 160 // Returns all cookies in the form "a=1; b=2; c=3" for the given URL. NOTE: |
| 161 // this string should not include any options that may have been specified when |
| 162 // the cookie was set. Semicolons delimit individual cookies in this context. |
| 163 std::string GetCookies(const GURL& url, const GURL& policy_url); |
| 164 |
153 // Gather usage statistics from the in-memory cache and inform our host, if | 165 // Gather usage statistics from the in-memory cache and inform our host, if |
154 // applicable. | 166 // applicable. |
155 void NotifyCacheStats(); | 167 void NotifyCacheStats(); |
156 | 168 |
157 // Glue to get resources from the embedder. | 169 // Glue to get resources from the embedder. |
158 | 170 |
159 // Gets a localized string given a message id. Returns an empty string if the | 171 // Gets a localized string given a message id. Returns an empty string if the |
160 // message id is not found. | 172 // message id is not found. |
161 string16 GetLocalizedString(int message_id); | 173 string16 GetLocalizedString(int message_id); |
162 | 174 |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 // Returns whether the given link hash is in the user's history. The hash must | 268 // Returns whether the given link hash is in the user's history. The hash must |
257 // have been generated by calling VisitedLinkHash(). | 269 // have been generated by calling VisitedLinkHash(). |
258 bool IsLinkVisited(uint64 link_hash); | 270 bool IsLinkVisited(uint64 link_hash); |
259 | 271 |
260 // ---- END FUNCTIONS IMPLEMENTED BY EMBEDDER --------------------------------- | 272 // ---- END FUNCTIONS IMPLEMENTED BY EMBEDDER --------------------------------- |
261 | 273 |
262 | 274 |
263 } // namespace webkit_glue | 275 } // namespace webkit_glue |
264 | 276 |
265 #endif // WEBKIT_GLUE_WEBKIT_GLUE_H_ | 277 #endif // WEBKIT_GLUE_WEBKIT_GLUE_H_ |
OLD | NEW |