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

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: 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 things are
50 // consistent.
Peter Kasting 2011/10/11 20:07:36 Nit: "things are consistent" is pretty vague... it
Dirk Pranke 2011/10/11 23:03:16 Done.
51 CONTENT_EXPORT const std::string& GetUserAgent(const GURL& url);
52
47 // Interface that the embedder implements. 53 // Interface that the embedder implements.
48 class CONTENT_EXPORT ContentClient { 54 class CONTENT_EXPORT ContentClient {
49 public: 55 public:
50 ContentClient(); 56 ContentClient();
51 virtual ~ContentClient(); 57 virtual ~ContentClient();
52 58
53 ContentBrowserClient* browser() { return browser_; } 59 ContentBrowserClient* browser() { return browser_; }
54 void set_browser(ContentBrowserClient* c) { browser_ = c; } 60 void set_browser(ContentBrowserClient* c) { browser_ = c; }
55 ContentPluginClient* plugin() { return plugin_; } 61 ContentPluginClient* plugin() { return plugin_; }
56 void set_plugin(ContentPluginClient* p) { plugin_ = p; } 62 void set_plugin(ContentPluginClient* p) { plugin_ = p; }
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 ContentPluginClient* plugin_; 106 ContentPluginClient* plugin_;
101 // The embedder API for participating in renderer logic. 107 // The embedder API for participating in renderer logic.
102 ContentRendererClient* renderer_; 108 ContentRendererClient* renderer_;
103 // The embedder API for participating in utility logic. 109 // The embedder API for participating in utility logic.
104 ContentUtilityClient* utility_; 110 ContentUtilityClient* utility_;
105 }; 111 };
106 112
107 } // namespace content 113 } // namespace content
108 114
109 #endif // CONTENT_COMMON_CONTENT_CLIENT_H_ 115 #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