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 <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
13 | 13 |
| 14 class CommandLine; |
14 class GURL; | 15 class GURL; |
15 struct GPUInfo; | 16 struct GPUInfo; |
16 struct PepperPluginInfo; | 17 struct PepperPluginInfo; |
17 | 18 |
18 namespace IPC { | 19 namespace IPC { |
19 class Message; | 20 class Message; |
20 } | 21 } |
21 | 22 |
| 23 namespace sandbox { |
| 24 class TargetPolicy; |
| 25 } |
| 26 |
22 namespace content { | 27 namespace content { |
23 | 28 |
24 class ContentBrowserClient; | 29 class ContentBrowserClient; |
25 class ContentClient; | 30 class ContentClient; |
26 class ContentPluginClient; | 31 class ContentPluginClient; |
27 class ContentRendererClient; | 32 class ContentRendererClient; |
28 | 33 |
29 // Setter and getter for the client. The client should be set early, before any | 34 // Setter and getter for the client. The client should be set early, before any |
30 // content code is called. | 35 // content code is called. |
31 void SetContentClient(ContentClient* client); | 36 void SetContentClient(ContentClient* client); |
(...skipping 22 matching lines...) Expand all Loading... |
54 virtual void AddPepperPlugins(std::vector<PepperPluginInfo>* plugins) {} | 59 virtual void AddPepperPlugins(std::vector<PepperPluginInfo>* plugins) {} |
55 | 60 |
56 // Returns whether the given message should be allowed to be sent from a | 61 // Returns whether the given message should be allowed to be sent from a |
57 // swapped out renderer. | 62 // swapped out renderer. |
58 virtual bool CanSendWhileSwappedOut(const IPC::Message* msg); | 63 virtual bool CanSendWhileSwappedOut(const IPC::Message* msg); |
59 | 64 |
60 // Returns whether the given message should be processed in the browser on | 65 // Returns whether the given message should be processed in the browser on |
61 // behalf of a swapped out renderer. | 66 // behalf of a swapped out renderer. |
62 virtual bool CanHandleWhileSwappedOut(const IPC::Message& msg); | 67 virtual bool CanHandleWhileSwappedOut(const IPC::Message& msg); |
63 | 68 |
| 69 #if defined(OS_WIN) |
| 70 // Allows the embedder to sandbox a plugin, and apply a custom policy. |
| 71 virtual bool SandboxPlugin(CommandLine* command_line, |
| 72 sandbox::TargetPolicy* policy); |
| 73 #endif |
| 74 |
64 private: | 75 private: |
65 // The embedder API for participating in browser logic. | 76 // The embedder API for participating in browser logic. |
66 ContentBrowserClient* browser_; | 77 ContentBrowserClient* browser_; |
67 // The embedder API for participating in plugin logic. | 78 // The embedder API for participating in plugin logic. |
68 ContentPluginClient* plugin_; | 79 ContentPluginClient* plugin_; |
69 // The embedder API for participating in renderer logic. | 80 // The embedder API for participating in renderer logic. |
70 ContentRendererClient* renderer_; | 81 ContentRendererClient* renderer_; |
71 }; | 82 }; |
72 | 83 |
73 } // namespace content | 84 } // namespace content |
74 | 85 |
75 #endif // CONTENT_COMMON_CONTENT_CLIENT_H_ | 86 #endif // CONTENT_COMMON_CONTENT_CLIENT_H_ |
OLD | NEW |