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 #include "content/common/content_export.h" |
16 | 16 |
17 class CommandLine; | 17 class CommandLine; |
18 class GURL; | 18 class GURL; |
19 struct GPUInfo; | 19 struct GPUInfo; |
20 struct PepperPluginInfo; | |
21 | 20 |
22 namespace IPC { | 21 namespace IPC { |
23 class Message; | 22 class Message; |
24 } | 23 } |
25 | 24 |
26 namespace base { | 25 namespace base { |
27 class StringPiece; | 26 class StringPiece; |
28 } | 27 } |
29 | 28 |
30 namespace sandbox { | 29 namespace sandbox { |
31 class TargetPolicy; | 30 class TargetPolicy; |
32 } | 31 } |
33 | 32 |
| 33 namespace webkit { |
| 34 namespace ppapi { |
| 35 struct PluginInfo; |
| 36 } |
| 37 } |
| 38 |
34 namespace content { | 39 namespace content { |
35 | 40 |
36 class ContentBrowserClient; | 41 class ContentBrowserClient; |
37 class ContentClient; | 42 class ContentClient; |
38 class ContentPluginClient; | 43 class ContentPluginClient; |
39 class ContentRendererClient; | 44 class ContentRendererClient; |
40 class ContentUtilityClient; | 45 class ContentUtilityClient; |
41 | 46 |
42 // Setter and getter for the client. The client should be set early, before any | 47 // Setter and getter for the client. The client should be set early, before any |
43 // content code is called. | 48 // content code is called. |
(...skipping 15 matching lines...) Expand all Loading... |
59 ContentUtilityClient* utility() { return utility_; } | 64 ContentUtilityClient* utility() { return utility_; } |
60 void set_utility(ContentUtilityClient* u) { utility_ = u; } | 65 void set_utility(ContentUtilityClient* u) { utility_ = u; } |
61 | 66 |
62 // Sets the currently active URL. Use GURL() to clear the URL. | 67 // Sets the currently active URL. Use GURL() to clear the URL. |
63 virtual void SetActiveURL(const GURL& url) = 0; | 68 virtual void SetActiveURL(const GURL& url) = 0; |
64 | 69 |
65 // Sets the data on the current gpu. | 70 // Sets the data on the current gpu. |
66 virtual void SetGpuInfo(const GPUInfo& gpu_info) = 0; | 71 virtual void SetGpuInfo(const GPUInfo& gpu_info) = 0; |
67 | 72 |
68 // Gives the embedder a chance to register its own pepper plugins. | 73 // Gives the embedder a chance to register its own pepper plugins. |
69 virtual void AddPepperPlugins(std::vector<PepperPluginInfo>* plugins) = 0; | 74 virtual void AddPepperPlugins( |
| 75 std::vector<webkit::ppapi::PluginInfo>* plugins) = 0; |
70 | 76 |
71 // Returns whether the given message should be allowed to be sent from a | 77 // Returns whether the given message should be allowed to be sent from a |
72 // swapped out renderer. | 78 // swapped out renderer. |
73 virtual bool CanSendWhileSwappedOut(const IPC::Message* msg) = 0; | 79 virtual bool CanSendWhileSwappedOut(const IPC::Message* msg) = 0; |
74 | 80 |
75 // Returns whether the given message should be processed in the browser on | 81 // Returns whether the given message should be processed in the browser on |
76 // behalf of a swapped out renderer. | 82 // behalf of a swapped out renderer. |
77 virtual bool CanHandleWhileSwappedOut(const IPC::Message& msg) = 0; | 83 virtual bool CanHandleWhileSwappedOut(const IPC::Message& msg) = 0; |
78 | 84 |
79 // Returns the user agent. If mimic_windows is true then the embedder can | 85 // Returns the user agent. If mimic_windows is true then the embedder can |
(...skipping 20 matching lines...) Expand all Loading... |
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_ |
OLD | NEW |