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

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

Issue 2063683002: Migrate components/data_reduction_proxy to Mojo interfaces. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and move AddService call into RegisterRenderProcessMojoServices() Created 4 years, 6 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 #include "chrome/common/chrome_content_client.h" 5 #include "chrome/common/chrome_content_client.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <tuple> 10 #include <tuple>
(...skipping 14 matching lines...) Expand all
25 #include "build/build_config.h" 25 #include "build/build_config.h"
26 #include "chrome/common/child_process_logging.h" 26 #include "chrome/common/child_process_logging.h"
27 #include "chrome/common/chrome_constants.h" 27 #include "chrome/common/chrome_constants.h"
28 #include "chrome/common/chrome_paths.h" 28 #include "chrome/common/chrome_paths.h"
29 #include "chrome/common/chrome_switches.h" 29 #include "chrome/common/chrome_switches.h"
30 #include "chrome/common/crash_keys.h" 30 #include "chrome/common/crash_keys.h"
31 #include "chrome/common/pepper_flash.h" 31 #include "chrome/common/pepper_flash.h"
32 #include "chrome/common/secure_origin_whitelist.h" 32 #include "chrome/common/secure_origin_whitelist.h"
33 #include "chrome/common/url_constants.h" 33 #include "chrome/common/url_constants.h"
34 #include "chrome/grit/common_resources.h" 34 #include "chrome/grit/common_resources.h"
35 #include "components/data_reduction_proxy/content/common/data_reduction_proxy_me ssages.h"
36 #include "components/dom_distiller/core/url_constants.h" 35 #include "components/dom_distiller/core/url_constants.h"
37 #include "components/version_info/version_info.h" 36 #include "components/version_info/version_info.h"
38 #include "content/public/common/cdm_info.h" 37 #include "content/public/common/cdm_info.h"
39 #include "content/public/common/content_constants.h" 38 #include "content/public/common/content_constants.h"
40 #include "content/public/common/content_switches.h" 39 #include "content/public/common/content_switches.h"
41 #include "content/public/common/url_constants.h" 40 #include "content/public/common/url_constants.h"
42 #include "content/public/common/user_agent.h" 41 #include "content/public/common/user_agent.h"
43 #include "extensions/common/constants.h" 42 #include "extensions/common/constants.h"
44 #include "gpu/config/gpu_info.h" 43 #include "gpu/config/gpu_info.h"
45 #include "net/http/http_util.h" 44 #include "net/http/http_util.h"
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 referrer_schemes->push_back( 594 referrer_schemes->push_back(
596 {chrome::kAndroidAppScheme, url::SCHEME_WITHOUT_PORT}); 595 {chrome::kAndroidAppScheme, url::SCHEME_WITHOUT_PORT});
597 #endif 596 #endif
598 597
599 savable_schemes->push_back(extensions::kExtensionScheme); 598 savable_schemes->push_back(extensions::kExtensionScheme);
600 savable_schemes->push_back(extensions::kExtensionResourceScheme); 599 savable_schemes->push_back(extensions::kExtensionResourceScheme);
601 savable_schemes->push_back(chrome::kChromeSearchScheme); 600 savable_schemes->push_back(chrome::kChromeSearchScheme);
602 savable_schemes->push_back(dom_distiller::kDomDistillerScheme); 601 savable_schemes->push_back(dom_distiller::kDomDistillerScheme);
603 } 602 }
604 603
605 bool ChromeContentClient::CanSendWhileSwappedOut(const IPC::Message* message) {
606 return message->type() ==
607 DataReductionProxyViewHostMsg_IsDataReductionProxy::ID;
608 }
609
610 std::string ChromeContentClient::GetProduct() const { 604 std::string ChromeContentClient::GetProduct() const {
611 return ::GetProduct(); 605 return ::GetProduct();
612 } 606 }
613 607
614 std::string ChromeContentClient::GetUserAgent() const { 608 std::string ChromeContentClient::GetUserAgent() const {
615 return ::GetUserAgent(); 609 return ::GetUserAgent();
616 } 610 }
617 611
618 base::string16 ChromeContentClient::GetLocalizedString(int message_id) const { 612 base::string16 ChromeContentClient::GetLocalizedString(int message_id) const {
619 return l10n_util::GetStringUTF16(message_id); 613 return l10n_util::GetStringUTF16(message_id);
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 696
703 base::StringPiece ChromeContentClient::GetOriginTrialPublicKey() { 697 base::StringPiece ChromeContentClient::GetOriginTrialPublicKey() {
704 return origin_trial_key_manager_.GetPublicKey(); 698 return origin_trial_key_manager_.GetPublicKey();
705 } 699 }
706 700
707 #if defined(OS_ANDROID) 701 #if defined(OS_ANDROID)
708 media::MediaClientAndroid* ChromeContentClient::GetMediaClientAndroid() { 702 media::MediaClientAndroid* ChromeContentClient::GetMediaClientAndroid() {
709 return new ChromeMediaClientAndroid(); 703 return new ChromeMediaClientAndroid();
710 } 704 }
711 #endif // OS_ANDROID 705 #endif // OS_ANDROID
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698