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

Side by Side Diff: content/shell/shell_content_client.cc

Issue 9623027: Move --user-agent overriding logic from chrome into content. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src
Patch Set: replace SetContentClient() with Initialize() 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
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 #include "content/shell/shell_content_client.h" 5 #include "content/shell/shell_content_client.h"
6 6
7 #include "base/string_piece.h" 7 #include "base/string_piece.h"
8 #include "ui/base/resource/resource_bundle.h" 8 #include "ui/base/resource/resource_bundle.h"
9 #include "webkit/glue/user_agent.h"
10 9
11 namespace content { 10 namespace content {
12 11
13 ShellContentClient::~ShellContentClient() { 12 ShellContentClient::~ShellContentClient() {
14 } 13 }
15 14
16 void ShellContentClient::SetActiveURL(const GURL& url) { 15 void ShellContentClient::SetActiveURL(const GURL& url) {
17 } 16 }
18 17
19 void ShellContentClient::SetGpuInfo(const GPUInfo& gpu_info) { 18 void ShellContentClient::SetGpuInfo(const GPUInfo& gpu_info) {
20 } 19 }
21 20
22 void ShellContentClient::AddPepperPlugins( 21 void ShellContentClient::AddPepperPlugins(
23 std::vector<content::PepperPluginInfo>* plugins) { 22 std::vector<content::PepperPluginInfo>* plugins) {
24 } 23 }
25 24
26 void ShellContentClient::AddNPAPIPlugins( 25 void ShellContentClient::AddNPAPIPlugins(
27 webkit::npapi::PluginList* plugin_list) { 26 webkit::npapi::PluginList* plugin_list) {
28 } 27 }
29 28
30 bool ShellContentClient::HasWebUIScheme(const GURL& url) const { 29 bool ShellContentClient::HasWebUIScheme(const GURL& url) const {
31 // There are no WebUI URLs in content_shell. 30 // There are no WebUI URLs in content_shell.
32 return false; 31 return false;
33 } 32 }
34 33
35 bool ShellContentClient::CanHandleWhileSwappedOut(const IPC::Message& msg) { 34 bool ShellContentClient::CanHandleWhileSwappedOut(const IPC::Message& msg) {
36 return false; 35 return false;
37 } 36 }
38 37
39 std::string ShellContentClient::GetUserAgent(bool* overriding) const {
40 *overriding = false;
41 // The "19" is so that sites that sniff for version think that this is
42 // something reasonably current; the "77.34.5" is a hint that this isn't a
43 // standard Chrome.
44 return webkit_glue::BuildUserAgentFromProduct("Chrome/19.77.34.5");
45 }
46
47 string16 ShellContentClient::GetLocalizedString(int message_id) const { 38 string16 ShellContentClient::GetLocalizedString(int message_id) const {
48 return string16(); 39 return string16();
49 } 40 }
50 41
51 base::StringPiece ShellContentClient::GetDataResource(int resource_id) const { 42 base::StringPiece ShellContentClient::GetDataResource(int resource_id) const {
52 return ResourceBundle::GetSharedInstance().GetRawDataResource(resource_id); 43 return ResourceBundle::GetSharedInstance().GetRawDataResource(resource_id);
53 } 44 }
54 45
55 #if defined(OS_WIN) 46 #if defined(OS_WIN)
56 bool ShellContentClient::SandboxPlugin(CommandLine* command_line, 47 bool ShellContentClient::SandboxPlugin(CommandLine* command_line,
57 sandbox::TargetPolicy* policy) { 48 sandbox::TargetPolicy* policy) {
58 return false; 49 return false;
59 } 50 }
60 #endif 51 #endif
61 52
62 #if defined(OS_MACOSX) 53 #if defined(OS_MACOSX)
63 bool ShellContentClient::GetSandboxProfileForSandboxType( 54 bool ShellContentClient::GetSandboxProfileForSandboxType(
64 int sandbox_type, 55 int sandbox_type,
65 int* sandbox_profile_resource_id) const { 56 int* sandbox_profile_resource_id) const {
66 return false; 57 return false;
67 } 58 }
68 #endif 59 #endif
69 60
70 } // namespace content 61 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698