| OLD | NEW |
| 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> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/string16.h" | 13 #include "base/string16.h" |
| 14 #include "build/build_config.h" | 14 #include "build/build_config.h" |
| 15 #include "content/common/content_export.h" |
| 15 | 16 |
| 16 class CommandLine; | 17 class CommandLine; |
| 17 class GURL; | 18 class GURL; |
| 18 struct GPUInfo; | 19 struct GPUInfo; |
| 19 struct PepperPluginInfo; | 20 struct PepperPluginInfo; |
| 20 | 21 |
| 21 namespace IPC { | 22 namespace IPC { |
| 22 class Message; | 23 class Message; |
| 23 } | 24 } |
| 24 | 25 |
| 25 namespace base { | 26 namespace base { |
| 26 class StringPiece; | 27 class StringPiece; |
| 27 } | 28 } |
| 28 | 29 |
| 29 namespace sandbox { | 30 namespace sandbox { |
| 30 class TargetPolicy; | 31 class TargetPolicy; |
| 31 } | 32 } |
| 32 | 33 |
| 33 namespace content { | 34 namespace content { |
| 34 | 35 |
| 35 class ContentBrowserClient; | 36 class ContentBrowserClient; |
| 36 class ContentClient; | 37 class ContentClient; |
| 37 class ContentPluginClient; | 38 class ContentPluginClient; |
| 38 class ContentRendererClient; | 39 class ContentRendererClient; |
| 39 class ContentUtilityClient; | 40 class ContentUtilityClient; |
| 40 | 41 |
| 41 // 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 |
| 42 // content code is called. | 43 // content code is called. |
| 43 void SetContentClient(ContentClient* client); | 44 CONTENT_EXPORT void SetContentClient(ContentClient* client); |
| 44 ContentClient* GetContentClient(); | 45 CONTENT_EXPORT ContentClient* GetContentClient(); |
| 45 | 46 |
| 46 // Interface that the embedder implements. | 47 // Interface that the embedder implements. |
| 47 class ContentClient { | 48 class CONTENT_EXPORT ContentClient { |
| 48 public: | 49 public: |
| 49 ContentClient(); | 50 ContentClient(); |
| 50 virtual ~ContentClient(); | 51 virtual ~ContentClient(); |
| 51 | 52 |
| 52 ContentBrowserClient* browser() { return browser_; } | 53 ContentBrowserClient* browser() { return browser_; } |
| 53 void set_browser(ContentBrowserClient* c) { browser_ = c; } | 54 void set_browser(ContentBrowserClient* c) { browser_ = c; } |
| 54 ContentPluginClient* plugin() { return plugin_; } | 55 ContentPluginClient* plugin() { return plugin_; } |
| 55 void set_plugin(ContentPluginClient* p) { plugin_ = p; } | 56 void set_plugin(ContentPluginClient* p) { plugin_ = p; } |
| 56 ContentRendererClient* renderer() { return renderer_; } | 57 ContentRendererClient* renderer() { return renderer_; } |
| 57 void set_renderer(ContentRendererClient* r) { renderer_ = r; } | 58 void set_renderer(ContentRendererClient* r) { renderer_ = r; } |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 ContentPluginClient* plugin_; | 100 ContentPluginClient* plugin_; |
| 100 // The embedder API for participating in renderer logic. | 101 // The embedder API for participating in renderer logic. |
| 101 ContentRendererClient* renderer_; | 102 ContentRendererClient* renderer_; |
| 102 // The embedder API for participating in utility logic. | 103 // The embedder API for participating in utility logic. |
| 103 ContentUtilityClient* utility_; | 104 ContentUtilityClient* utility_; |
| 104 }; | 105 }; |
| 105 | 106 |
| 106 } // namespace content | 107 } // namespace content |
| 107 | 108 |
| 108 #endif // CONTENT_COMMON_CONTENT_CLIENT_H_ | 109 #endif // CONTENT_COMMON_CONTENT_CLIENT_H_ |
| OLD | NEW |