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

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

Issue 2943983003: chrome/blink: Add functionality for in-product help for media elements. (Closed)
Patch Set: addressed comments Created 3 years, 5 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/browser/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 #include "components/cdm/browser/cdm_message_filter_android.h" 128 #include "components/cdm/browser/cdm_message_filter_android.h"
129 #include "components/cloud_devices/common/cloud_devices_switches.h" 129 #include "components/cloud_devices/common/cloud_devices_switches.h"
130 #include "components/content_settings/core/browser/content_settings_utils.h" 130 #include "components/content_settings/core/browser/content_settings_utils.h"
131 #include "components/content_settings/core/browser/cookie_settings.h" 131 #include "components/content_settings/core/browser/cookie_settings.h"
132 #include "components/content_settings/core/browser/host_content_settings_map.h" 132 #include "components/content_settings/core/browser/host_content_settings_map.h"
133 #include "components/content_settings/core/common/content_settings.h" 133 #include "components/content_settings/core/common/content_settings.h"
134 #include "components/content_settings/core/common/content_settings_types.h" 134 #include "components/content_settings/core/common/content_settings_types.h"
135 #include "components/dom_distiller/core/dom_distiller_switches.h" 135 #include "components/dom_distiller/core/dom_distiller_switches.h"
136 #include "components/dom_distiller/core/url_constants.h" 136 #include "components/dom_distiller/core/url_constants.h"
137 #include "components/error_page/common/error_page_switches.h" 137 #include "components/error_page/common/error_page_switches.h"
138 #include "components/feature_engagement_tracker/public/feature_constants.h"
139 #include "components/feature_engagement_tracker/public/feature_list.h"
138 #include "components/google/core/browser/google_util.h" 140 #include "components/google/core/browser/google_util.h"
139 #include "components/metrics/call_stack_profile_collector.h" 141 #include "components/metrics/call_stack_profile_collector.h"
140 #include "components/metrics/client_info.h" 142 #include "components/metrics/client_info.h"
141 #include "components/nacl/common/nacl_constants.h" 143 #include "components/nacl/common/nacl_constants.h"
142 #include "components/net_log/chrome_net_log.h" 144 #include "components/net_log/chrome_net_log.h"
143 #include "components/password_manager/content/browser/content_password_manager_d river_factory.h" 145 #include "components/password_manager/content/browser/content_password_manager_d river_factory.h"
144 #include "components/pref_registry/pref_registry_syncable.h" 146 #include "components/pref_registry/pref_registry_syncable.h"
145 #include "components/prefs/pref_service.h" 147 #include "components/prefs/pref_service.h"
146 #include "components/prefs/scoped_user_pref_update.h" 148 #include "components/prefs/scoped_user_pref_update.h"
147 #include "components/rappor/public/rappor_utils.h" 149 #include "components/rappor/public/rappor_utils.h"
(...skipping 2457 matching lines...) Expand 10 before | Expand all | Expand 10 after
2605 if (base::FeatureList::IsEnabled( 2607 if (base::FeatureList::IsEnabled(
2606 features::kAllowAutoplayUnmutedInWebappManifestScope)) { 2608 features::kAllowAutoplayUnmutedInWebappManifestScope)) {
2607 web_prefs->media_playback_gesture_whitelist_scope = 2609 web_prefs->media_playback_gesture_whitelist_scope =
2608 tab_android->GetWebappManifestScope(); 2610 tab_android->GetWebappManifestScope();
2609 } 2611 }
2610 } 2612 }
2611 } 2613 }
2612 2614
2613 web_prefs->video_fullscreen_detection_enabled = 2615 web_prefs->video_fullscreen_detection_enabled =
2614 chrome::android::AppHooks::ShouldDetectVideoFullscreen(); 2616 chrome::android::AppHooks::ShouldDetectVideoFullscreen();
2617
2618 web_prefs->enable_media_in_product_help = base::FeatureList::IsEnabled(
2619 feature_engagement_tracker::kIPHMediaDownloadFeature);
2615 #endif // defined(OS_ANDROID) 2620 #endif // defined(OS_ANDROID)
2616 2621
2617 for (size_t i = 0; i < extra_parts_.size(); ++i) 2622 for (size_t i = 0; i < extra_parts_.size(); ++i)
2618 extra_parts_[i]->OverrideWebkitPrefs(rvh, web_prefs); 2623 extra_parts_[i]->OverrideWebkitPrefs(rvh, web_prefs);
2619 } 2624 }
2620 2625
2621 void ChromeContentBrowserClient::BrowserURLHandlerCreated( 2626 void ChromeContentBrowserClient::BrowserURLHandlerCreated(
2622 BrowserURLHandler* handler) { 2627 BrowserURLHandler* handler) {
2623 for (size_t i = 0; i < extra_parts_.size(); ++i) 2628 for (size_t i = 0; i < extra_parts_.size(); ++i)
2624 extra_parts_[i]->BrowserURLHandlerCreated(handler); 2629 extra_parts_[i]->BrowserURLHandlerCreated(handler);
(...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after
3431 3436
3432 base::FilePath ChromeContentBrowserClient::GetLoggingFileName() { 3437 base::FilePath ChromeContentBrowserClient::GetLoggingFileName() {
3433 return logging::GetLogFileName(); 3438 return logging::GetLogFileName();
3434 } 3439 }
3435 3440
3436 // static 3441 // static
3437 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( 3442 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting(
3438 const storage::QuotaSettings* settings) { 3443 const storage::QuotaSettings* settings) {
3439 g_default_quota_settings = settings; 3444 g_default_quota_settings = settings;
3440 } 3445 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698