Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(178)

Side by Side Diff: webkit/glue/webkit_glue.h

Issue 8296011: Make setting the user agent work with the zygote on linux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 string16 DumpFrameScrollPosition(WebKit::WebFrame* web_frame, bool recursive); 84 string16 DumpFrameScrollPosition(WebKit::WebFrame* web_frame, bool recursive);
85 85
86 // Returns a dump of the given history state suitable for implementing the 86 // Returns a dump of the given history state suitable for implementing the
87 // dumpBackForwardList command of the layoutTestController. 87 // dumpBackForwardList command of the layoutTestController.
88 string16 DumpHistoryState(const std::string& history_state, int indent, 88 string16 DumpHistoryState(const std::string& history_state, int indent,
89 bool is_current); 89 bool is_current);
90 90
91 // Sets the user agent. Pass true for overriding if this is a custom 91 // Sets the user agent. Pass true for overriding if this is a custom
92 // user agent instead of the default one (in order to turn off any browser 92 // user agent instead of the default one (in order to turn off any browser
93 // sniffing workarounds). This must be called before GetUserAgent() can 93 // sniffing workarounds). This must be called before GetUserAgent() can
94 // be called. 94 // be called, and must not be called after GetUserAgent() with a different
95 // value (use ResetUserAgent() for that, if necessary).
95 void SetUserAgent(const std::string& user_agent, bool overriding); 96 void SetUserAgent(const std::string& user_agent, bool overriding);
96 97
98 // Like SetUserAgent(), but can be used to forcibly change the user agent
99 // (disabling the checks that ensure that GetUserAgent() hasn't already
100 // been called).
jam 2011/10/15 01:32:04 it seems a little redundant to provide two methods
Dirk Pranke 2011/10/15 02:14:07 Well, Reset() should really only be called in exte
jam 2011/10/17 03:43:23 sure, if you can find one place that calls this an
101 void ResetUserAgent(const std::string& user_agent, bool overriding);
102
97 // Returns the user agent to use for the given URL. SetUserAgent() must 103 // Returns the user agent to use for the given URL. SetUserAgent() must
98 // be called prior to calling this function. 104 // be called prior to calling this function.
99 const std::string& GetUserAgent(const GURL& url); 105 const std::string& GetUserAgent(const GURL& url);
100 106
101 // Creates serialized state for the specified URL. This is a variant of 107 // Creates serialized state for the specified URL. This is a variant of
102 // HistoryItemToString (in glue_serialize) that is used during session restore 108 // HistoryItemToString (in glue_serialize) that is used during session restore
103 // if the saved state is empty. 109 // if the saved state is empty.
104 std::string CreateHistoryStateForURL(const GURL& url); 110 std::string CreateHistoryStateForURL(const GURL& url);
105 111
106 // Removes any form data state from the history state string |content_state|. 112 // Removes any form data state from the history state string |content_state|.
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 bool GetFontTable(int fd, uint32_t table, uint8_t* output, 240 bool GetFontTable(int fd, uint32_t table, uint8_t* output,
235 size_t* output_length); 241 size_t* output_length);
236 #endif 242 #endif
237 243
238 // ---- END FUNCTIONS IMPLEMENTED BY EMBEDDER --------------------------------- 244 // ---- END FUNCTIONS IMPLEMENTED BY EMBEDDER ---------------------------------
239 245
240 246
241 } // namespace webkit_glue 247 } // namespace webkit_glue
242 248
243 #endif // WEBKIT_GLUE_WEBKIT_GLUE_H_ 249 #endif // WEBKIT_GLUE_WEBKIT_GLUE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698