| 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_H__ | 5 #ifndef WEBKIT_GLUE_H__ |
| 6 #define WEBKIT_GLUE_H__ | 6 #define WEBKIT_GLUE_H__ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 #ifdef _WIN32 | 10 #ifdef _WIN32 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 void ResetBeforeTestRun(WebView* view); | 86 void ResetBeforeTestRun(WebView* view); |
| 87 | 87 |
| 88 // Returns the WebKit version (major.minor). | 88 // Returns the WebKit version (major.minor). |
| 89 std::string GetWebKitVersion(); | 89 std::string GetWebKitVersion(); |
| 90 | 90 |
| 91 // Called to override the default user agent with a custom one. Call this | 91 // Called to override the default user agent with a custom one. Call this |
| 92 // before anyone actually asks for the user agent in order to prevent | 92 // before anyone actually asks for the user agent in order to prevent |
| 93 // inconsistent behavior. | 93 // inconsistent behavior. |
| 94 void SetUserAgent(const std::string& new_user_agent); | 94 void SetUserAgent(const std::string& new_user_agent); |
| 95 | 95 |
| 96 // Returns the user agent, which is usually the default user agent but may be | 96 // Returns the user agent to use for the given URL, which is usually the |
| 97 // overriden by a call to SetUserAgent() (which should be done at startup). | 97 // default user agent but may be overriden by a call to SetUserAgent() (which |
| 98 const std::string& GetUserAgent(); | 98 // should be done at startup). |
| 99 const std::string& GetUserAgent(const GURL& url); |
| 99 | 100 |
| 100 // Creates serialized state for the specified URL. This is a variant of | 101 // Creates serialized state for the specified URL. This is a variant of |
| 101 // HistoryItemToString (in glue_serialize) that is used during session restore | 102 // HistoryItemToString (in glue_serialize) that is used during session restore |
| 102 // if the saved state is empty. | 103 // if the saved state is empty. |
| 103 std::string CreateHistoryStateForURL(const GURL& url); | 104 std::string CreateHistoryStateForURL(const GURL& url); |
| 104 | 105 |
| 105 #ifndef NDEBUG | 106 #ifndef NDEBUG |
| 106 // Checks various important objects to see if there are any in memory, and | 107 // Checks various important objects to see if there are any in memory, and |
| 107 // calls AppendToLog with any leaked objects. Designed to be called on shutdown | 108 // calls AppendToLog with any leaked objects. Designed to be called on shutdown |
| 108 void CheckForLeaks(); | 109 void CheckForLeaks(); |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 // exiting cleanly. | 287 // exiting cleanly. |
| 287 void SetForcefullyTerminatePluginProcess(bool value); | 288 void SetForcefullyTerminatePluginProcess(bool value); |
| 288 | 289 |
| 289 // Returns true if the plugin thread should terminate the process forcefully | 290 // Returns true if the plugin thread should terminate the process forcefully |
| 290 // instead of exiting cleanly. | 291 // instead of exiting cleanly. |
| 291 bool ShouldForcefullyTerminatePluginProcess(); | 292 bool ShouldForcefullyTerminatePluginProcess(); |
| 292 | 293 |
| 293 } // namespace webkit_glue | 294 } // namespace webkit_glue |
| 294 | 295 |
| 295 #endif // WEBKIT_GLUE_H__ | 296 #endif // WEBKIT_GLUE_H__ |
| OLD | NEW |