OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PUBLIC_COMMON_CONTENT_CLIENT_H_ | 5 #ifndef CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ |
6 #define CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ | 6 #define CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
60 // returns the old value. | 60 // returns the old value. |
61 CONTENT_EXPORT ContentBrowserClient* SetBrowserClientForTesting( | 61 CONTENT_EXPORT ContentBrowserClient* SetBrowserClientForTesting( |
62 ContentBrowserClient* b); | 62 ContentBrowserClient* b); |
63 CONTENT_EXPORT ContentRendererClient* SetRendererClientForTesting( | 63 CONTENT_EXPORT ContentRendererClient* SetRendererClientForTesting( |
64 ContentRendererClient* r); | 64 ContentRendererClient* r); |
65 CONTENT_EXPORT ContentUtilityClient* SetUtilityClientForTesting( | 65 CONTENT_EXPORT ContentUtilityClient* SetUtilityClientForTesting( |
66 ContentUtilityClient* u); | 66 ContentUtilityClient* u); |
67 | 67 |
68 // Returns the user agent string being used by the browser. SetContentClient() | 68 // Returns the user agent string being used by the browser. SetContentClient() |
69 // must be called prior to calling this, and this routine must be used | 69 // must be called prior to calling this, and this routine must be used |
70 // instead of webkit_glue::GetUserAgent() in order to ensure that we use | 70 // instead of GetUserAgent() in order to ensure that we use the same user agent |
71 // the same user agent string everywhere. | 71 // string everywhere. |
72 // TODO(dpranke): This is caused by webkit_glue being a library that can | 72 // TODO(dpranke): This is caused by webkit_glue being a library that can |
73 // get linked into multiple linkable objects, causing us to have multiple | 73 // get linked into multiple linkable objects, causing us to have multiple |
74 // static values of the user agent. This will be fixed when we clean up | 74 // static values of the user agent. This will be fixed when we clean up |
75 // webkit_glue. | 75 // webkit_glue. |
76 CONTENT_EXPORT const std::string& GetUserAgent(const GURL& url); | 76 CONTENT_EXPORT const std::string& GetUserAgent(const GURL& url); |
jam
2014/03/04 20:49:45
we actually don't need this wrapper anymore, it wa
tfarina
2014/03/04 21:49:38
What we do about the overrides? shell_content_clie
| |
77 | 77 |
78 // Interface that the embedder implements. | 78 // Interface that the embedder implements. |
79 class CONTENT_EXPORT ContentClient { | 79 class CONTENT_EXPORT ContentClient { |
80 public: | 80 public: |
81 ContentClient(); | 81 ContentClient(); |
82 virtual ~ContentClient(); | 82 virtual ~ContentClient(); |
83 | 83 |
84 ContentBrowserClient* browser() { return browser_; } | 84 ContentBrowserClient* browser() { return browser_; } |
85 ContentPluginClient* plugin() { return plugin_; } | 85 ContentPluginClient* plugin() { return plugin_; } |
86 ContentRendererClient* renderer() { return renderer_; } | 86 ContentRendererClient* renderer() { return renderer_; } |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
163 ContentPluginClient* plugin_; | 163 ContentPluginClient* plugin_; |
164 // The embedder API for participating in renderer logic. | 164 // The embedder API for participating in renderer logic. |
165 ContentRendererClient* renderer_; | 165 ContentRendererClient* renderer_; |
166 // The embedder API for participating in utility logic. | 166 // The embedder API for participating in utility logic. |
167 ContentUtilityClient* utility_; | 167 ContentUtilityClient* utility_; |
168 }; | 168 }; |
169 | 169 |
170 } // namespace content | 170 } // namespace content |
171 | 171 |
172 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ | 172 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ |
OLD | NEW |