| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 | 58 |
| 59 // Used for tests to override the relevant embedder interfaces. Each method | 59 // Used for tests to override the relevant embedder interfaces. Each method |
| 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() | |
| 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 | |
| 71 // the same user agent string everywhere. | |
| 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 | |
| 74 // static values of the user agent. This will be fixed when we clean up | |
| 75 // webkit_glue. | |
| 76 CONTENT_EXPORT const std::string& GetUserAgent(const GURL& url); | |
| 77 | |
| 78 // Interface that the embedder implements. | 68 // Interface that the embedder implements. |
| 79 class CONTENT_EXPORT ContentClient { | 69 class CONTENT_EXPORT ContentClient { |
| 80 public: | 70 public: |
| 81 ContentClient(); | 71 ContentClient(); |
| 82 virtual ~ContentClient(); | 72 virtual ~ContentClient(); |
| 83 | 73 |
| 84 ContentBrowserClient* browser() { return browser_; } | 74 ContentBrowserClient* browser() { return browser_; } |
| 85 ContentPluginClient* plugin() { return plugin_; } | 75 ContentPluginClient* plugin() { return plugin_; } |
| 86 ContentRendererClient* renderer() { return renderer_; } | 76 ContentRendererClient* renderer() { return renderer_; } |
| 87 ContentUtilityClient* utility() { return utility_; } | 77 ContentUtilityClient* utility() { return utility_; } |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 ContentPluginClient* plugin_; | 153 ContentPluginClient* plugin_; |
| 164 // The embedder API for participating in renderer logic. | 154 // The embedder API for participating in renderer logic. |
| 165 ContentRendererClient* renderer_; | 155 ContentRendererClient* renderer_; |
| 166 // The embedder API for participating in utility logic. | 156 // The embedder API for participating in utility logic. |
| 167 ContentUtilityClient* utility_; | 157 ContentUtilityClient* utility_; |
| 168 }; | 158 }; |
| 169 | 159 |
| 170 } // namespace content | 160 } // namespace content |
| 171 | 161 |
| 172 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ | 162 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ |
| OLD | NEW |