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> |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
69 virtual void AddPepperPlugins(std::vector<PepperPluginInfo>* plugins) = 0; | 69 virtual void AddPepperPlugins(std::vector<PepperPluginInfo>* plugins) = 0; |
70 | 70 |
71 // Returns whether the given message should be allowed to be sent from a | 71 // Returns whether the given message should be allowed to be sent from a |
72 // swapped out renderer. | 72 // swapped out renderer. |
73 virtual bool CanSendWhileSwappedOut(const IPC::Message* msg) = 0; | 73 virtual bool CanSendWhileSwappedOut(const IPC::Message* msg) = 0; |
74 | 74 |
75 // Returns whether the given message should be processed in the browser on | 75 // Returns whether the given message should be processed in the browser on |
76 // behalf of a swapped out renderer. | 76 // behalf of a swapped out renderer. |
77 virtual bool CanHandleWhileSwappedOut(const IPC::Message& msg) = 0; | 77 virtual bool CanHandleWhileSwappedOut(const IPC::Message& msg) = 0; |
78 | 78 |
79 // Returns the user agent. If mimic_windows is true then the embedder can | 79 // Returns the user agent and indicates whether this string should |
80 // return a fake Windows user agent. This is a workaround for broken | 80 // always be used (overriding any hacks to work around browser sniffing). |
81 // websites. | 81 virtual std::string GetUserAgent(bool *overriding) const = 0; |
Evan Martin
2011/09/21 20:27:24
star on the left
I don't quite get the doc: when
Dirk Pranke
2011/09/21 21:02:35
That is correct. I will attempt to make it clearer
| |
82 virtual std::string GetUserAgent(bool mimic_windows) const = 0; | |
83 | 82 |
84 // Returns a string resource given its id. | 83 // Returns a string resource given its id. |
85 virtual string16 GetLocalizedString(int message_id) const = 0; | 84 virtual string16 GetLocalizedString(int message_id) const = 0; |
86 | 85 |
87 // Return the contents of a resource in a StringPiece given the resource id. | 86 // Return the contents of a resource in a StringPiece given the resource id. |
88 virtual base::StringPiece GetDataResource(int resource_id) const = 0; | 87 virtual base::StringPiece GetDataResource(int resource_id) const = 0; |
89 | 88 |
90 #if defined(OS_WIN) | 89 #if defined(OS_WIN) |
91 // Allows the embedder to sandbox a plugin, and apply a custom policy. | 90 // Allows the embedder to sandbox a plugin, and apply a custom policy. |
92 virtual bool SandboxPlugin(CommandLine* command_line, | 91 virtual bool SandboxPlugin(CommandLine* command_line, |
93 sandbox::TargetPolicy* policy) = 0; | 92 sandbox::TargetPolicy* policy) = 0; |
94 #endif | 93 #endif |
95 | 94 |
96 private: | 95 private: |
97 // The embedder API for participating in browser logic. | 96 // The embedder API for participating in browser logic. |
98 ContentBrowserClient* browser_; | 97 ContentBrowserClient* browser_; |
99 // The embedder API for participating in plugin logic. | 98 // The embedder API for participating in plugin logic. |
100 ContentPluginClient* plugin_; | 99 ContentPluginClient* plugin_; |
101 // The embedder API for participating in renderer logic. | 100 // The embedder API for participating in renderer logic. |
102 ContentRendererClient* renderer_; | 101 ContentRendererClient* renderer_; |
103 // The embedder API for participating in utility logic. | 102 // The embedder API for participating in utility logic. |
104 ContentUtilityClient* utility_; | 103 ContentUtilityClient* utility_; |
105 }; | 104 }; |
106 | 105 |
107 } // namespace content | 106 } // namespace content |
108 | 107 |
109 #endif // CONTENT_COMMON_CONTENT_CLIENT_H_ | 108 #endif // CONTENT_COMMON_CONTENT_CLIENT_H_ |
OLD | NEW |