| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "content/browser/content_browser_client.h" | |
| 6 | |
| 7 #include "base/memory/singleton.h" | |
| 8 #include "content/browser/renderer_host/resource_dispatcher_host.h" | |
| 9 #include "content/browser/ssl/ssl_client_auth_handler.h" | |
| 10 #include "content/browser/webui/empty_web_ui_factory.h" | |
| 11 #include "googleurl/src/gurl.h" | |
| 12 #include "third_party/skia/include/core/SkBitmap.h" | |
| 13 #include "ui/base/clipboard/clipboard.h" | |
| 14 | |
| 15 namespace content { | |
| 16 | |
| 17 void ContentBrowserClient::RenderViewHostCreated( | |
| 18 RenderViewHost* render_view_host) { | |
| 19 } | |
| 20 | |
| 21 void ContentBrowserClient::BrowserRenderProcessHostCreated( | |
| 22 BrowserRenderProcessHost* host) { | |
| 23 } | |
| 24 | |
| 25 void ContentBrowserClient::PluginProcessHostCreated(PluginProcessHost* host) { | |
| 26 } | |
| 27 | |
| 28 void ContentBrowserClient::WorkerProcessHostCreated(WorkerProcessHost* host) { | |
| 29 } | |
| 30 | |
| 31 WebUIFactory* ContentBrowserClient::GetWebUIFactory() { | |
| 32 // Return an empty factory so callsites don't have to check for NULL. | |
| 33 return EmptyWebUIFactory::Get(); | |
| 34 } | |
| 35 | |
| 36 GURL ContentBrowserClient::GetEffectiveURL(Profile* profile, const GURL& url) { | |
| 37 return url; | |
| 38 } | |
| 39 | |
| 40 bool ContentBrowserClient::IsURLSameAsAnySiteInstance(const GURL& url) { | |
| 41 return false; | |
| 42 } | |
| 43 | |
| 44 std::string ContentBrowserClient::GetCanonicalEncodingNameByAliasName( | |
| 45 const std::string& alias_name) { | |
| 46 return alias_name; | |
| 47 } | |
| 48 | |
| 49 void ContentBrowserClient::AppendExtraCommandLineSwitches( | |
| 50 CommandLine* command_line, int child_process_id) { | |
| 51 } | |
| 52 | |
| 53 std::string ContentBrowserClient::GetApplicationLocale() { | |
| 54 return std::string(); | |
| 55 } | |
| 56 | |
| 57 std::string ContentBrowserClient::GetAcceptLangs(const TabContents* tab) { | |
| 58 return std::string(); | |
| 59 } | |
| 60 | |
| 61 SkBitmap* ContentBrowserClient::GetDefaultFavicon() { | |
| 62 static SkBitmap empty; | |
| 63 return ∅ | |
| 64 } | |
| 65 | |
| 66 bool ContentBrowserClient::AllowAppCache( | |
| 67 const GURL& manifest_url, const content::ResourceContext& context) { | |
| 68 return true; | |
| 69 } | |
| 70 | |
| 71 bool ContentBrowserClient::AllowGetCookie( | |
| 72 const GURL& url, | |
| 73 const GURL& first_party, | |
| 74 const net::CookieList& cookie_list, | |
| 75 const content::ResourceContext& context, | |
| 76 int render_process_id, | |
| 77 int render_view_id) { | |
| 78 return true; | |
| 79 } | |
| 80 | |
| 81 bool ContentBrowserClient::AllowSetCookie( | |
| 82 const GURL& url, | |
| 83 const GURL& first_party, | |
| 84 const std::string& cookie_line, | |
| 85 const content::ResourceContext& context, | |
| 86 int render_process_id, | |
| 87 int render_view_id, | |
| 88 net::CookieOptions* options) { | |
| 89 return true; | |
| 90 } | |
| 91 | |
| 92 QuotaPermissionContext* ContentBrowserClient::CreateQuotaPermissionContext() { | |
| 93 return NULL; | |
| 94 } | |
| 95 | |
| 96 void ContentBrowserClient::RevealFolderInOS(const FilePath& path) { | |
| 97 } | |
| 98 | |
| 99 void ContentBrowserClient::AllowCertificateError( | |
| 100 SSLCertErrorHandler* handler, | |
| 101 bool overridable, | |
| 102 Callback2<SSLCertErrorHandler*, bool>::Type* callback) { | |
| 103 callback->Run(handler, overridable); | |
| 104 delete callback; | |
| 105 } | |
| 106 | |
| 107 void ContentBrowserClient::ShowClientCertificateRequestDialog( | |
| 108 int render_process_id, | |
| 109 int render_view_id, | |
| 110 SSLClientAuthHandler* handler) { | |
| 111 handler->CertificateSelected(NULL); | |
| 112 } | |
| 113 | |
| 114 void ContentBrowserClient::AddNewCertificate( | |
| 115 net::URLRequest* request, | |
| 116 net::X509Certificate* cert, | |
| 117 int render_process_id, | |
| 118 int render_view_id) { | |
| 119 } | |
| 120 | |
| 121 void ContentBrowserClient::RequestDesktopNotificationPermission( | |
| 122 const GURL& source_origin, | |
| 123 int callback_context, | |
| 124 int render_process_id, | |
| 125 int render_view_id) { | |
| 126 } | |
| 127 | |
| 128 WebKit::WebNotificationPresenter::Permission | |
| 129 ContentBrowserClient::CheckDesktopNotificationPermission( | |
| 130 const GURL& source_url, | |
| 131 const content::ResourceContext& context) { | |
| 132 return WebKit::WebNotificationPresenter::PermissionAllowed; | |
| 133 } | |
| 134 | |
| 135 void ContentBrowserClient::ShowDesktopNotification( | |
| 136 const DesktopNotificationHostMsg_Show_Params& params, | |
| 137 int render_process_id, | |
| 138 int render_view_id, | |
| 139 bool worker) { | |
| 140 } | |
| 141 | |
| 142 void ContentBrowserClient::CancelDesktopNotification( | |
| 143 int render_process_id, | |
| 144 int render_view_id, | |
| 145 int notification_id) { | |
| 146 } | |
| 147 | |
| 148 bool ContentBrowserClient::CanCreateWindow( | |
| 149 const GURL& source_url, | |
| 150 WindowContainerType container_type, | |
| 151 const content::ResourceContext& context) { | |
| 152 return false; | |
| 153 } | |
| 154 | |
| 155 std::string ContentBrowserClient::GetWorkerProcessTitle( | |
| 156 const GURL& url, const content::ResourceContext& context) { | |
| 157 return std::string(); | |
| 158 } | |
| 159 | |
| 160 ResourceDispatcherHost* ContentBrowserClient::GetResourceDispatcherHost() { | |
| 161 static ResourceQueue::DelegateSet temp; | |
| 162 static ResourceDispatcherHost rdh(temp); | |
| 163 return &rdh; | |
| 164 } | |
| 165 | |
| 166 ui::Clipboard* ContentBrowserClient::GetClipboard() { | |
| 167 static ui::Clipboard clipboard; | |
| 168 return &clipboard; | |
| 169 } | |
| 170 | |
| 171 #if defined(OS_POSIX) && !defined(OS_MACOSX) | |
| 172 int ContentBrowserClient::GetCrashSignalFD(const std::string& process_type) { | |
| 173 return -1; | |
| 174 } | |
| 175 #endif | |
| 176 | |
| 177 #if defined(USE_NSS) | |
| 178 crypto::CryptoModuleBlockingPasswordDelegate* | |
| 179 ContentBrowserClient::GetCryptoPasswordDelegate(const GURL& url) { | |
| 180 return NULL; | |
| 181 } | |
| 182 #endif | |
| 183 | |
| 184 } // namespace content | |
| OLD | NEW |