| 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 | 18 |
| 18 class CommandLine; | 19 class CommandLine; |
| 19 class GURL; | 20 class GURL; |
| 20 | 21 |
| 21 namespace IPC { | 22 namespace IPC { |
| 22 class Message; | 23 class Message; |
| 23 } | 24 } |
| 24 | 25 |
| 25 namespace sandbox { | 26 namespace sandbox { |
| 26 class TargetPolicy; | 27 class TargetPolicy; |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 // behalf of a swapped out renderer. | 109 // behalf of a swapped out renderer. |
| 109 virtual bool CanHandleWhileSwappedOut(const IPC::Message& msg) = 0; | 110 virtual bool CanHandleWhileSwappedOut(const IPC::Message& msg) = 0; |
| 110 | 111 |
| 111 // Returns the user agent. | 112 // Returns the user agent. |
| 112 virtual std::string GetUserAgent() const = 0; | 113 virtual std::string GetUserAgent() const = 0; |
| 113 | 114 |
| 114 // Returns a string resource given its id. | 115 // Returns a string resource given its id. |
| 115 virtual string16 GetLocalizedString(int message_id) const = 0; | 116 virtual string16 GetLocalizedString(int message_id) const = 0; |
| 116 | 117 |
| 117 // 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. |
| 118 virtual base::StringPiece GetDataResource(int resource_id) const = 0; | 119 virtual base::StringPiece GetDataResource( |
| 119 | 120 int resource_id, |
| 120 // Return the contents of an image resource in a StringPiece given the | 121 ui::ScaleFactor scale_factor) const = 0; |
| 121 // resource id. | |
| 122 virtual base::StringPiece GetImageResource(int resource_id, | |
| 123 float scale_factor) const = 0; | |
| 124 | 122 |
| 125 #if defined(OS_WIN) | 123 #if defined(OS_WIN) |
| 126 // Allows the embedder to sandbox a plugin, and apply a custom policy. | 124 // Allows the embedder to sandbox a plugin, and apply a custom policy. |
| 127 virtual bool SandboxPlugin(CommandLine* command_line, | 125 virtual bool SandboxPlugin(CommandLine* command_line, |
| 128 sandbox::TargetPolicy* policy) = 0; | 126 sandbox::TargetPolicy* policy) = 0; |
| 129 #endif | 127 #endif |
| 130 | 128 |
| 131 #if defined(OS_MACOSX) | 129 #if defined(OS_MACOSX) |
| 132 // Allows the embedder to define a new |sandbox_type| by mapping it to the | 130 // Allows the embedder to define a new |sandbox_type| by mapping it to the |
| 133 // resource ID corresponding to the sandbox profile to use. The legal values | 131 // resource ID corresponding to the sandbox profile to use. The legal values |
| (...skipping 14 matching lines...) Expand all Loading... |
| 148 ContentPluginClient* plugin_; | 146 ContentPluginClient* plugin_; |
| 149 // The embedder API for participating in renderer logic. | 147 // The embedder API for participating in renderer logic. |
| 150 ContentRendererClient* renderer_; | 148 ContentRendererClient* renderer_; |
| 151 // The embedder API for participating in utility logic. | 149 // The embedder API for participating in utility logic. |
| 152 ContentUtilityClient* utility_; | 150 ContentUtilityClient* utility_; |
| 153 }; | 151 }; |
| 154 | 152 |
| 155 } // namespace content | 153 } // namespace content |
| 156 | 154 |
| 157 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ | 155 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ |
| OLD | NEW |