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

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

Issue 9623027: Move --user-agent overriding logic from chrome into content. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src
Patch Set: rebase Created 8 years, 8 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
« no previous file with comments | « content/app/content_main_runner.cc ('k') | content/public/common/content_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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>
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 webkit::npapi::PluginList* plugin_list) = 0; 95 webkit::npapi::PluginList* plugin_list) = 0;
96 96
97 // Returns true if the url has a scheme for WebUI. See also 97 // Returns true if the url has a scheme for WebUI. See also
98 // WebUIControllerFactory::UseWebUIForURL in the browser process. 98 // WebUIControllerFactory::UseWebUIForURL in the browser process.
99 virtual bool HasWebUIScheme(const GURL& url) const = 0; 99 virtual bool HasWebUIScheme(const GURL& url) const = 0;
100 100
101 // Returns whether the given message should be processed in the browser on 101 // Returns whether the given message should be processed in the browser on
102 // behalf of a swapped out renderer. 102 // behalf of a swapped out renderer.
103 virtual bool CanHandleWhileSwappedOut(const IPC::Message& msg) = 0; 103 virtual bool CanHandleWhileSwappedOut(const IPC::Message& msg) = 0;
104 104
105 // Returns the user agent and a flag indicating whether the returned 105 // Returns the user agent.
106 // string should always be used (if false, callers may override the 106 virtual std::string GetUserAgent() const = 0;
107 // value as needed to work around various user agent sniffing bugs).
108 virtual std::string GetUserAgent(bool *overriding) const = 0;
109 107
110 // Returns a string resource given its id. 108 // Returns a string resource given its id.
111 virtual string16 GetLocalizedString(int message_id) const = 0; 109 virtual string16 GetLocalizedString(int message_id) const = 0;
112 110
113 // Return the contents of a resource in a StringPiece given the resource id. 111 // Return the contents of a resource in a StringPiece given the resource id.
114 virtual base::StringPiece GetDataResource(int resource_id) const = 0; 112 virtual base::StringPiece GetDataResource(int resource_id) const = 0;
115 113
116 #if defined(OS_WIN) 114 #if defined(OS_WIN)
117 // Allows the embedder to sandbox a plugin, and apply a custom policy. 115 // Allows the embedder to sandbox a plugin, and apply a custom policy.
118 virtual bool SandboxPlugin(CommandLine* command_line, 116 virtual bool SandboxPlugin(CommandLine* command_line,
(...skipping 20 matching lines...) Expand all
139 ContentPluginClient* plugin_; 137 ContentPluginClient* plugin_;
140 // The embedder API for participating in renderer logic. 138 // The embedder API for participating in renderer logic.
141 ContentRendererClient* renderer_; 139 ContentRendererClient* renderer_;
142 // The embedder API for participating in utility logic. 140 // The embedder API for participating in utility logic.
143 ContentUtilityClient* utility_; 141 ContentUtilityClient* utility_;
144 }; 142 };
145 143
146 } // namespace content 144 } // namespace content
147 145
148 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ 146 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_
OLDNEW
« no previous file with comments | « content/app/content_main_runner.cc ('k') | content/public/common/content_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698