Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(309)

Side by Side Diff: content/common/content_client.h

Issue 7922023: Remove webkit_glue::BuildUserAgent(), remove windows spoofing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge to r102225 Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 a flag indicating whether the returned
80 // return a fake Windows user agent. This is a workaround for broken 80 // string should always be used (if false, callers may override the
81 // websites. 81 // value as needed to work around various user agent sniffing bugs).
82 virtual std::string GetUserAgent(bool mimic_windows) const = 0; 82 virtual std::string GetUserAgent(bool *overriding) const = 0;
83 83
84 // Returns a string resource given its id. 84 // Returns a string resource given its id.
85 virtual string16 GetLocalizedString(int message_id) const = 0; 85 virtual string16 GetLocalizedString(int message_id) const = 0;
86 86
87 // Return the contents of a resource in a StringPiece given the resource id. 87 // Return the contents of a resource in a StringPiece given the resource id.
88 virtual base::StringPiece GetDataResource(int resource_id) const = 0; 88 virtual base::StringPiece GetDataResource(int resource_id) const = 0;
89 89
90 #if defined(OS_WIN) 90 #if defined(OS_WIN)
91 // Allows the embedder to sandbox a plugin, and apply a custom policy. 91 // Allows the embedder to sandbox a plugin, and apply a custom policy.
92 virtual bool SandboxPlugin(CommandLine* command_line, 92 virtual bool SandboxPlugin(CommandLine* command_line,
93 sandbox::TargetPolicy* policy) = 0; 93 sandbox::TargetPolicy* policy) = 0;
94 #endif 94 #endif
95 95
96 private: 96 private:
97 // The embedder API for participating in browser logic. 97 // The embedder API for participating in browser logic.
98 ContentBrowserClient* browser_; 98 ContentBrowserClient* browser_;
99 // The embedder API for participating in plugin logic. 99 // The embedder API for participating in plugin logic.
100 ContentPluginClient* plugin_; 100 ContentPluginClient* plugin_;
101 // The embedder API for participating in renderer logic. 101 // The embedder API for participating in renderer logic.
102 ContentRendererClient* renderer_; 102 ContentRendererClient* renderer_;
103 // The embedder API for participating in utility logic. 103 // The embedder API for participating in utility logic.
104 ContentUtilityClient* utility_; 104 ContentUtilityClient* utility_;
105 }; 105 };
106 106
107 } // namespace content 107 } // namespace content
108 108
109 #endif // CONTENT_COMMON_CONTENT_CLIENT_H_ 109 #endif // CONTENT_COMMON_CONTENT_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698