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

Side by Side Diff: content/common/content_client.h

Issue 8234013: Add a content::GetUserAgent() to wrap webkit_glue::GetUserAgent() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: clarify requirements around GetUserAgent 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 CONTENT_COMMON_CONTENT_CLIENT_H_ 5 #ifndef CONTENT_COMMON_CONTENT_CLIENT_H_
6 #define CONTENT_COMMON_CONTENT_CLIENT_H_ 6 #define CONTENT_COMMON_CONTENT_CLIENT_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 26 matching lines...) Expand all
37 class ContentClient; 37 class ContentClient;
38 class ContentPluginClient; 38 class ContentPluginClient;
39 class ContentRendererClient; 39 class ContentRendererClient;
40 class ContentUtilityClient; 40 class ContentUtilityClient;
41 41
42 // Setter and getter for the client. The client should be set early, before any 42 // Setter and getter for the client. The client should be set early, before any
43 // content code is called. 43 // content code is called.
44 CONTENT_EXPORT void SetContentClient(ContentClient* client); 44 CONTENT_EXPORT void SetContentClient(ContentClient* client);
45 CONTENT_EXPORT ContentClient* GetContentClient(); 45 CONTENT_EXPORT ContentClient* GetContentClient();
46 46
47 // Returns the user agent string being used by the browser. SetContentClient()
48 // must be called prior to calling this, and this routine must be used
49 // instead of webkit_glue::GetUserAgent() in order to ensure that we use
50 // the same user agent string everywhere.
51 // TODO(dpranke): This is caused by webkit_glue being a library that can
52 // get linked into multiple linkable objects, causing us to have multiple
53 // static values of the user agent. This will be fixed when we clean up
54 // webkit_glue.
55 CONTENT_EXPORT const std::string& GetUserAgent(const GURL& url);
56
47 // Interface that the embedder implements. 57 // Interface that the embedder implements.
48 class CONTENT_EXPORT ContentClient { 58 class CONTENT_EXPORT ContentClient {
49 public: 59 public:
50 ContentClient(); 60 ContentClient();
51 virtual ~ContentClient(); 61 virtual ~ContentClient();
52 62
53 ContentBrowserClient* browser() { return browser_; } 63 ContentBrowserClient* browser() { return browser_; }
54 void set_browser(ContentBrowserClient* c) { browser_ = c; } 64 void set_browser(ContentBrowserClient* c) { browser_ = c; }
55 ContentPluginClient* plugin() { return plugin_; } 65 ContentPluginClient* plugin() { return plugin_; }
56 void set_plugin(ContentPluginClient* p) { plugin_ = p; } 66 void set_plugin(ContentPluginClient* p) { plugin_ = p; }
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 ContentPluginClient* plugin_; 110 ContentPluginClient* plugin_;
101 // The embedder API for participating in renderer logic. 111 // The embedder API for participating in renderer logic.
102 ContentRendererClient* renderer_; 112 ContentRendererClient* renderer_;
103 // The embedder API for participating in utility logic. 113 // The embedder API for participating in utility logic.
104 ContentUtilityClient* utility_; 114 ContentUtilityClient* utility_;
105 }; 115 };
106 116
107 } // namespace content 117 } // namespace content
108 118
109 #endif // CONTENT_COMMON_CONTENT_CLIENT_H_ 119 #endif // CONTENT_COMMON_CONTENT_CLIENT_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/chromeos/about_page_handler.cc ('k') | content/common/content_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698