| 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 |
| 68 // Interface that the embedder implements. | 78 // Interface that the embedder implements. |
| 69 class CONTENT_EXPORT ContentClient { | 79 class CONTENT_EXPORT ContentClient { |
| 70 public: | 80 public: |
| 71 ContentClient(); | 81 ContentClient(); |
| 72 virtual ~ContentClient(); | 82 virtual ~ContentClient(); |
| 73 | 83 |
| 74 ContentBrowserClient* browser() { return browser_; } | 84 ContentBrowserClient* browser() { return browser_; } |
| 75 ContentPluginClient* plugin() { return plugin_; } | 85 ContentPluginClient* plugin() { return plugin_; } |
| 76 ContentRendererClient* renderer() { return renderer_; } | 86 ContentRendererClient* renderer() { return renderer_; } |
| 77 ContentUtilityClient* utility() { return utility_; } | 87 ContentUtilityClient* utility() { return utility_; } |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 ContentPluginClient* plugin_; | 163 ContentPluginClient* plugin_; |
| 154 // The embedder API for participating in renderer logic. | 164 // The embedder API for participating in renderer logic. |
| 155 ContentRendererClient* renderer_; | 165 ContentRendererClient* renderer_; |
| 156 // The embedder API for participating in utility logic. | 166 // The embedder API for participating in utility logic. |
| 157 ContentUtilityClient* utility_; | 167 ContentUtilityClient* utility_; |
| 158 }; | 168 }; |
| 159 | 169 |
| 160 } // namespace content | 170 } // namespace content |
| 161 | 171 |
| 162 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ | 172 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ |
| OLD | NEW |