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

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 105723002: Add the scheme chrome-distiller:// and hook up data source. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments from jam@ Created 6 years, 11 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 | « no previous file | chrome/browser/dom_distiller/dom_distiller_service_factory.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 #include "chrome/browser/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after
1037 return false; 1037 return false;
1038 } 1038 }
1039 } 1039 }
1040 1040
1041 // Hosted apps that have script access to their background page must use 1041 // Hosted apps that have script access to their background page must use
1042 // process per site, since all instances can make synchronous calls to the 1042 // process per site, since all instances can make synchronous calls to the
1043 // background window. Other extensions should use process per site as well. 1043 // background window. Other extensions should use process per site as well.
1044 return true; 1044 return true;
1045 } 1045 }
1046 1046
1047 // These are treated as WebUI schemes but do not get WebUI bindings. 1047 // These are treated as WebUI schemes but do not get WebUI bindings. Also,
1048 // view-source is allowed for these schemes.
1048 void ChromeContentBrowserClient::GetAdditionalWebUISchemes( 1049 void ChromeContentBrowserClient::GetAdditionalWebUISchemes(
1049 std::vector<std::string>* additional_schemes) { 1050 std::vector<std::string>* additional_schemes) {
1050 additional_schemes->push_back(chrome::kChromeSearchScheme); 1051 additional_schemes->push_back(chrome::kChromeSearchScheme);
1052 additional_schemes->push_back(chrome::kDomDistillerScheme);
1051 } 1053 }
1052 1054
1053 net::URLRequestContextGetter* 1055 net::URLRequestContextGetter*
1054 ChromeContentBrowserClient::CreateRequestContext( 1056 ChromeContentBrowserClient::CreateRequestContext(
1055 content::BrowserContext* browser_context, 1057 content::BrowserContext* browser_context,
1056 content::ProtocolHandlerMap* protocol_handlers) { 1058 content::ProtocolHandlerMap* protocol_handlers) {
1057 Profile* profile = Profile::FromBrowserContext(browser_context); 1059 Profile* profile = Profile::FromBrowserContext(browser_context);
1058 return profile->CreateRequestContext(protocol_handlers); 1060 return profile->CreateRequestContext(protocol_handlers);
1059 } 1061 }
1060 1062
(...skipping 1604 matching lines...) Expand 10 before | Expand all | Expand 10 after
2665 // releases of Chrome. Permitting "Unknown" allows these APIs to be used on 2667 // releases of Chrome. Permitting "Unknown" allows these APIs to be used on
2666 // Chromium builds as well. 2668 // Chromium builds as well.
2667 return channel <= chrome::VersionInfo::CHANNEL_DEV; 2669 return channel <= chrome::VersionInfo::CHANNEL_DEV;
2668 #else 2670 #else
2669 return false; 2671 return false;
2670 #endif 2672 #endif
2671 } 2673 }
2672 2674
2673 2675
2674 } // namespace chrome 2676 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/dom_distiller/dom_distiller_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698