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

Unified Diff: content/public/browser/content_browser_client.h

Issue 11896113: Add chrome-search: access from Instant overlay (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Yet another rebase Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/webui/url_data_manager_backend.cc ('k') | content/public/browser/content_browser_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/content_browser_client.h
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index af10346b14b42ac5bdff3fd5032e4bbf772b6171..5f8ffa3eeefd5428c7d8c9e5bb6aa2cae0a539f3 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -5,11 +5,13 @@
#ifndef CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_
#define CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_
+#include <map>
#include <string>
#include <utility>
#include <vector>
#include "base/callback_forward.h"
+#include "base/memory/linked_ptr.h"
#include "base/memory/scoped_ptr.h"
#include "content/public/browser/file_descriptor_info.h"
#include "content/public/common/socket_permission_request.h"
@@ -82,6 +84,12 @@ class WebContentsViewPort;
struct MainFunctionParams;
struct ShowDesktopNotificationHostMsgParams;
+// A mapping from the scheme name to the protocol handler that services its
+// content.
+typedef std::map<
+ std::string, linked_ptr<net::URLRequestJobFactory::ProtocolHandler> >
+ ProtocolHandlerMap;
+
// Embedder API (or SPI) for participating in browser logic, to be implemented
// by the client of the content browser. See ChromeContentBrowserClient for the
// principal implementation. The methods are assumed to be called on the UI
@@ -139,21 +147,18 @@ class CONTENT_EXPORT ContentBrowserClient {
virtual bool ShouldUseProcessPerSite(BrowserContext* browser_context,
const GURL& effective_url);
+ // Returns a list additional WebUI schemes, if any. These additional schemes
+ // act as aliases to the chrome: scheme. The additional schemes may or may
+ // not serve specific WebUI pages depending on the particular URLDataSource
+ // and its override of URLDataSource::ShouldServiceRequest.
+ virtual std::vector<std::string> GetAdditionalWebUISchemes();
+
// Creates the main net::URLRequestContextGetter. Should only be called once
// per ContentBrowserClient object.
// TODO(ajwong): Remove once http://crbug.com/159193 is resolved.
virtual net::URLRequestContextGetter* CreateRequestContext(
BrowserContext* browser_context,
- scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
- blob_protocol_handler,
- scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
- file_system_protocol_handler,
- scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
- developer_protocol_handler,
- scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
- chrome_protocol_handler,
- scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
- chrome_devtools_protocol_handler);
+ ProtocolHandlerMap* protocol_handlers);
// Creates the net::URLRequestContextGetter for a StoragePartition. Should
// only be called once per partition_path per ContentBrowserClient object.
@@ -162,16 +167,7 @@ class CONTENT_EXPORT ContentBrowserClient {
BrowserContext* browser_context,
const base::FilePath& partition_path,
bool in_memory,
- scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
- blob_protocol_handler,
- scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
- file_system_protocol_handler,
- scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
- developer_protocol_handler,
- scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
- chrome_protocol_handler,
- scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
- chrome_devtools_protocol_handler);
+ ProtocolHandlerMap* protocol_handlers);
// Returns whether a specified URL is handled by the embedder's internal
// protocol handlers.
« no previous file with comments | « content/browser/webui/url_data_manager_backend.cc ('k') | content/public/browser/content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698