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 #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 "base/string_piece.h" | 14 #include "base/string_piece.h" |
15 #include "build/build_config.h" | 15 #include "build/build_config.h" |
16 #include "content/common/content_export.h" | 16 #include "content/common/content_export.h" |
17 #include "ui/base/layout.h" | 17 #include "ui/base/layout.h" |
18 | 18 |
19 class CommandLine; | 19 class CommandLine; |
20 class GURL; | 20 class GURL; |
21 | 21 |
22 namespace IPC { | 22 namespace IPC { |
23 class Message; | 23 class Message; |
24 } | 24 } |
25 | 25 |
| 26 namespace gfx { |
| 27 class Image; |
| 28 } |
| 29 |
26 namespace sandbox { | 30 namespace sandbox { |
27 class TargetPolicy; | 31 class TargetPolicy; |
28 } | 32 } |
29 | 33 |
30 namespace webkit { | 34 namespace webkit { |
31 namespace npapi { | 35 namespace npapi { |
32 class PluginList; | 36 class PluginList; |
33 } | 37 } |
34 | 38 |
35 namespace ppapi { | 39 namespace ppapi { |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 virtual std::string GetUserAgent() const; | 113 virtual std::string GetUserAgent() const; |
110 | 114 |
111 // Returns a string resource given its id. | 115 // Returns a string resource given its id. |
112 virtual string16 GetLocalizedString(int message_id) const; | 116 virtual string16 GetLocalizedString(int message_id) const; |
113 | 117 |
114 // Return the contents of a resource in a StringPiece given the resource id. | 118 // Return the contents of a resource in a StringPiece given the resource id. |
115 virtual base::StringPiece GetDataResource( | 119 virtual base::StringPiece GetDataResource( |
116 int resource_id, | 120 int resource_id, |
117 ui::ScaleFactor scale_factor) const; | 121 ui::ScaleFactor scale_factor) const; |
118 | 122 |
| 123 // Returns a native image given its id. |
| 124 virtual gfx::Image& GetNativeImageNamed(int resource_id) const; |
| 125 |
119 #if defined(OS_WIN) | 126 #if defined(OS_WIN) |
120 // Allows the embedder to sandbox a plugin, and apply a custom policy. | 127 // Allows the embedder to sandbox a plugin, and apply a custom policy. |
121 virtual bool SandboxPlugin(CommandLine* command_line, | 128 virtual bool SandboxPlugin(CommandLine* command_line, |
122 sandbox::TargetPolicy* policy); | 129 sandbox::TargetPolicy* policy); |
123 #endif | 130 #endif |
124 | 131 |
125 #if defined(OS_MACOSX) | 132 #if defined(OS_MACOSX) |
126 // Allows the embedder to define a new |sandbox_type| by mapping it to the | 133 // Allows the embedder to define a new |sandbox_type| by mapping it to the |
127 // resource ID corresponding to the sandbox profile to use. The legal values | 134 // resource ID corresponding to the sandbox profile to use. The legal values |
128 // for |sandbox_type| are defined by the embedder and should start with | 135 // for |sandbox_type| are defined by the embedder and should start with |
(...skipping 18 matching lines...) Expand all Loading... |
147 ContentPluginClient* plugin_; | 154 ContentPluginClient* plugin_; |
148 // The embedder API for participating in renderer logic. | 155 // The embedder API for participating in renderer logic. |
149 ContentRendererClient* renderer_; | 156 ContentRendererClient* renderer_; |
150 // The embedder API for participating in utility logic. | 157 // The embedder API for participating in utility logic. |
151 ContentUtilityClient* utility_; | 158 ContentUtilityClient* utility_; |
152 }; | 159 }; |
153 | 160 |
154 } // namespace content | 161 } // namespace content |
155 | 162 |
156 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ | 163 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ |
OLD | NEW |