| OLD | NEW |
| 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/common/chrome_content_client.h" | 5 #include "chrome/common/chrome_content_client.h" |
| 6 | 6 |
| 7 #if defined(OS_LINUX) | 7 #if defined(OS_LINUX) |
| 8 #include <fcntl.h> | 8 #include <fcntl.h> |
| 9 #endif // defined(OS_LINUX) | 9 #endif // defined(OS_LINUX) |
| 10 | 10 |
| (...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 501 flash_versions.push_back(system_flash.release()); | 501 flash_versions.push_back(system_flash.release()); |
| 502 | 502 |
| 503 // This function will return only the most recent version of the flash plugin. | 503 // This function will return only the most recent version of the flash plugin. |
| 504 content::PepperPluginInfo* max_flash = | 504 content::PepperPluginInfo* max_flash = |
| 505 FindMostRecentPlugin(flash_versions.get()); | 505 FindMostRecentPlugin(flash_versions.get()); |
| 506 if (max_flash != nullptr) | 506 if (max_flash != nullptr) |
| 507 plugins->push_back(*max_flash); | 507 plugins->push_back(*max_flash); |
| 508 #endif // defined(ENABLE_PLUGINS) | 508 #endif // defined(ENABLE_PLUGINS) |
| 509 } | 509 } |
| 510 | 510 |
| 511 void ChromeContentClient::AddAdditionalSchemes( |
| 512 std::vector<std::string>* standard_schemes, |
| 513 std::vector<std::string>* savable_schemes) { |
| 514 standard_schemes->push_back(extensions::kExtensionScheme); |
| 515 savable_schemes->push_back(extensions::kExtensionScheme); |
| 516 standard_schemes->push_back(chrome::kChromeNativeScheme); |
| 517 standard_schemes->push_back(extensions::kExtensionResourceScheme); |
| 518 savable_schemes->push_back(extensions::kExtensionResourceScheme); |
| 519 standard_schemes->push_back(chrome::kChromeSearchScheme); |
| 520 savable_schemes->push_back(chrome::kChromeSearchScheme); |
| 521 standard_schemes->push_back(dom_distiller::kDomDistillerScheme); |
| 522 savable_schemes->push_back(dom_distiller::kDomDistillerScheme); |
| 511 #if defined(OS_CHROMEOS) | 523 #if defined(OS_CHROMEOS) |
| 512 static const int kNumChromeStandardURLSchemes = 6; | 524 standard_schemes->push_back(chrome::kCrosScheme); |
| 513 #else | |
| 514 static const int kNumChromeStandardURLSchemes = 5; | |
| 515 #endif | 525 #endif |
| 516 static const url::SchemeWithType kChromeStandardURLSchemes[ | |
| 517 kNumChromeStandardURLSchemes] = { | |
| 518 {extensions::kExtensionScheme, url::SCHEME_WITHOUT_PORT}, | |
| 519 {chrome::kChromeNativeScheme, url::SCHEME_WITHOUT_PORT}, | |
| 520 {extensions::kExtensionResourceScheme, url::SCHEME_WITHOUT_PORT}, | |
| 521 {chrome::kChromeSearchScheme, url::SCHEME_WITHOUT_PORT}, | |
| 522 {dom_distiller::kDomDistillerScheme, url::SCHEME_WITHOUT_PORT}, | |
| 523 #if defined(OS_CHROMEOS) | |
| 524 {chrome::kCrosScheme, url::SCHEME_WITHOUT_PORT}, | |
| 525 #endif | |
| 526 }; | |
| 527 | |
| 528 void ChromeContentClient::AddAdditionalSchemes( | |
| 529 std::vector<url::SchemeWithType>* standard_schemes, | |
| 530 std::vector<std::string>* savable_schemes) { | |
| 531 for (int i = 0; i < kNumChromeStandardURLSchemes; i++) | |
| 532 standard_schemes->push_back(kChromeStandardURLSchemes[i]); | |
| 533 | |
| 534 savable_schemes->push_back(extensions::kExtensionScheme); | |
| 535 savable_schemes->push_back(extensions::kExtensionResourceScheme); | |
| 536 savable_schemes->push_back(chrome::kChromeSearchScheme); | |
| 537 savable_schemes->push_back(dom_distiller::kDomDistillerScheme); | |
| 538 } | 526 } |
| 539 | 527 |
| 540 std::string ChromeContentClient::GetProduct() const { | 528 std::string ChromeContentClient::GetProduct() const { |
| 541 return ::GetProduct(); | 529 return ::GetProduct(); |
| 542 } | 530 } |
| 543 | 531 |
| 544 std::string ChromeContentClient::GetUserAgent() const { | 532 std::string ChromeContentClient::GetUserAgent() const { |
| 545 return ::GetUserAgent(); | 533 return ::GetUserAgent(); |
| 546 } | 534 } |
| 547 | 535 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 601 schemes->insert(content::kChromeUIScheme); | 589 schemes->insert(content::kChromeUIScheme); |
| 602 schemes->insert(extensions::kExtensionScheme); | 590 schemes->insert(extensions::kExtensionScheme); |
| 603 schemes->insert(extensions::kExtensionResourceScheme); | 591 schemes->insert(extensions::kExtensionResourceScheme); |
| 604 GetSecureOriginWhitelist(origins); | 592 GetSecureOriginWhitelist(origins); |
| 605 } | 593 } |
| 606 | 594 |
| 607 void ChromeContentClient::AddServiceWorkerSchemes( | 595 void ChromeContentClient::AddServiceWorkerSchemes( |
| 608 std::set<std::string>* schemes) { | 596 std::set<std::string>* schemes) { |
| 609 schemes->insert(extensions::kExtensionScheme); | 597 schemes->insert(extensions::kExtensionScheme); |
| 610 } | 598 } |
| OLD | NEW |