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

Side by Side Diff: chrome/common/chrome_content_client.h

Issue 1272113002: Allow url::SchemeHostPort to hold non-file scheme without port (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing copy assignment 2 Created 5 years, 4 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
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 CHROME_COMMON_CHROME_CONTENT_CLIENT_H_ 5 #ifndef CHROME_COMMON_CHROME_CONTENT_CLIENT_H_
6 #define CHROME_COMMON_CHROME_CONTENT_CLIENT_H_ 6 #define CHROME_COMMON_CHROME_CONTENT_CLIENT_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
13 #include "content/public/common/content_client.h" 13 #include "content/public/common/content_client.h"
14 14
15 #if defined(ENABLE_PLUGINS) 15 #if defined(ENABLE_PLUGINS)
16 #include "content/public/common/pepper_plugin_info.h" 16 #include "content/public/common/pepper_plugin_info.h"
17 #endif 17 #endif
18 18
19 #include "url/url_util.h"
20
19 // Returns the user agent of Chrome. 21 // Returns the user agent of Chrome.
20 std::string GetUserAgent(); 22 std::string GetUserAgent();
21 23
22 class ChromeContentClient : public content::ContentClient { 24 class ChromeContentClient : public content::ContentClient {
23 public: 25 public:
24 static const char kPDFPluginName[]; 26 static const char kPDFPluginName[];
25 static const char kPDFPluginPath[]; 27 static const char kPDFPluginPath[];
26 static const char kRemotingViewerPluginPath[]; 28 static const char kRemotingViewerPluginPath[];
27 29
28 // The methods below are called by child processes to set the function 30 // The methods below are called by child processes to set the function
(...skipping 11 matching lines...) Expand all
40 static void SetPDFEntryFunctions( 42 static void SetPDFEntryFunctions(
41 content::PepperPluginInfo::GetInterfaceFunc get_interface, 43 content::PepperPluginInfo::GetInterfaceFunc get_interface,
42 content::PepperPluginInfo::PPP_InitializeModuleFunc initialize_module, 44 content::PepperPluginInfo::PPP_InitializeModuleFunc initialize_module,
43 content::PepperPluginInfo::PPP_ShutdownModuleFunc shutdown_module); 45 content::PepperPluginInfo::PPP_ShutdownModuleFunc shutdown_module);
44 #endif 46 #endif
45 47
46 void SetActiveURL(const GURL& url) override; 48 void SetActiveURL(const GURL& url) override;
47 void SetGpuInfo(const gpu::GPUInfo& gpu_info) override; 49 void SetGpuInfo(const gpu::GPUInfo& gpu_info) override;
48 void AddPepperPlugins( 50 void AddPepperPlugins(
49 std::vector<content::PepperPluginInfo>* plugins) override; 51 std::vector<content::PepperPluginInfo>* plugins) override;
50 void AddAdditionalSchemes(std::vector<std::string>* standard_schemes, 52 void AddAdditionalSchemes(std::vector<url::SchemeWithType>* standard_schemes,
51 std::vector<std::string>* saveable_shemes) override; 53 std::vector<std::string>* saveable_shemes) override;
52 std::string GetProduct() const override; 54 std::string GetProduct() const override;
53 std::string GetUserAgent() const override; 55 std::string GetUserAgent() const override;
54 base::string16 GetLocalizedString(int message_id) const override; 56 base::string16 GetLocalizedString(int message_id) const override;
55 base::StringPiece GetDataResource( 57 base::StringPiece GetDataResource(
56 int resource_id, 58 int resource_id,
57 ui::ScaleFactor scale_factor) const override; 59 ui::ScaleFactor scale_factor) const override;
58 base::RefCountedStaticMemory* GetDataResourceBytes( 60 base::RefCountedStaticMemory* GetDataResourceBytes(
59 int resource_id) const override; 61 int resource_id) const override;
60 gfx::Image& GetNativeImageNamed(int resource_id) const override; 62 gfx::Image& GetNativeImageNamed(int resource_id) const override;
61 std::string GetProcessTypeNameInEnglish(int type) override; 63 std::string GetProcessTypeNameInEnglish(int type) override;
62 64
63 #if defined(OS_MACOSX) && !defined(OS_IOS) 65 #if defined(OS_MACOSX) && !defined(OS_IOS)
64 bool GetSandboxProfileForSandboxType( 66 bool GetSandboxProfileForSandboxType(
65 int sandbox_type, 67 int sandbox_type,
66 int* sandbox_profile_resource_id) const override; 68 int* sandbox_profile_resource_id) const override;
67 #endif 69 #endif
68 70
69 void AddSecureSchemesAndOrigins(std::set<std::string>* schemes, 71 void AddSecureSchemesAndOrigins(std::set<std::string>* schemes,
70 std::set<GURL>* origins) override; 72 std::set<GURL>* origins) override;
71 73
72 void AddServiceWorkerSchemes(std::set<std::string>* schemes) override; 74 void AddServiceWorkerSchemes(std::set<std::string>* schemes) override;
73 }; 75 };
74 76
75 #endif // CHROME_COMMON_CHROME_CONTENT_CLIENT_H_ 77 #endif // CHROME_COMMON_CHROME_CONTENT_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698