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

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: mounir's 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 #include "components/cloud_devices/common/cloud_devices_switches.h" 130 #include "components/cloud_devices/common/cloud_devices_switches.h"
131 #include "components/content_settings/core/browser/content_settings_utils.h" 131 #include "components/content_settings/core/browser/content_settings_utils.h"
132 #include "components/content_settings/core/browser/cookie_settings.h" 132 #include "components/content_settings/core/browser/cookie_settings.h"
133 #include "components/content_settings/core/browser/host_content_settings_map.h" 133 #include "components/content_settings/core/browser/host_content_settings_map.h"
134 #include "components/content_settings/core/common/content_settings.h" 134 #include "components/content_settings/core/common/content_settings.h"
135 #include "components/content_settings/core/common/content_settings_types.h" 135 #include "components/content_settings/core/common/content_settings_types.h"
136 #include "components/content_settings/core/common/content_settings_utils.h" 136 #include "components/content_settings/core/common/content_settings_utils.h"
137 #include "components/dom_distiller/core/dom_distiller_switches.h" 137 #include "components/dom_distiller/core/dom_distiller_switches.h"
138 #include "components/dom_distiller/core/url_constants.h" 138 #include "components/dom_distiller/core/url_constants.h"
139 #include "components/error_page/common/error_page_switches.h" 139 #include "components/error_page/common/error_page_switches.h"
140 #include "components/feature_engagement_tracker/public/feature_constants.h"
141 #include "components/feature_engagement_tracker/public/feature_list.h"
140 #include "components/google/core/browser/google_util.h" 142 #include "components/google/core/browser/google_util.h"
141 #include "components/metrics/call_stack_profile_collector.h" 143 #include "components/metrics/call_stack_profile_collector.h"
142 #include "components/metrics/client_info.h" 144 #include "components/metrics/client_info.h"
143 #include "components/nacl/common/nacl_constants.h" 145 #include "components/nacl/common/nacl_constants.h"
144 #include "components/net_log/chrome_net_log.h" 146 #include "components/net_log/chrome_net_log.h"
145 #include "components/password_manager/content/browser/content_password_manager_d river_factory.h" 147 #include "components/password_manager/content/browser/content_password_manager_d river_factory.h"
146 #include "components/pref_registry/pref_registry_syncable.h" 148 #include "components/pref_registry/pref_registry_syncable.h"
147 #include "components/prefs/pref_service.h" 149 #include "components/prefs/pref_service.h"
148 #include "components/prefs/scoped_user_pref_update.h" 150 #include "components/prefs/scoped_user_pref_update.h"
149 #include "components/rappor/public/rappor_utils.h" 151 #include "components/rappor/public/rappor_utils.h"
(...skipping 2459 matching lines...) Expand 10 before | Expand all | Expand 10 after
2609 if (base::FeatureList::IsEnabled( 2611 if (base::FeatureList::IsEnabled(
2610 features::kAllowAutoplayUnmutedInWebappManifestScope)) { 2612 features::kAllowAutoplayUnmutedInWebappManifestScope)) {
2611 web_prefs->media_playback_gesture_whitelist_scope = 2613 web_prefs->media_playback_gesture_whitelist_scope =
2612 tab_android->GetWebappManifestScope(); 2614 tab_android->GetWebappManifestScope();
2613 } 2615 }
2614 } 2616 }
2615 } 2617 }
2616 2618
2617 web_prefs->video_fullscreen_detection_enabled = 2619 web_prefs->video_fullscreen_detection_enabled =
2618 chrome::android::AppHooks::ShouldDetectVideoFullscreen(); 2620 chrome::android::AppHooks::ShouldDetectVideoFullscreen();
2621
2622 web_prefs->enable_media_download_in_product_help =
2623 base::FeatureList::IsEnabled(
2624 feature_engagement_tracker::kIPHMediaDownloadFeature);
2619 #endif // defined(OS_ANDROID) 2625 #endif // defined(OS_ANDROID)
2620 2626
2621 for (size_t i = 0; i < extra_parts_.size(); ++i) 2627 for (size_t i = 0; i < extra_parts_.size(); ++i)
2622 extra_parts_[i]->OverrideWebkitPrefs(rvh, web_prefs); 2628 extra_parts_[i]->OverrideWebkitPrefs(rvh, web_prefs);
2623 } 2629 }
2624 2630
2625 void ChromeContentBrowserClient::BrowserURLHandlerCreated( 2631 void ChromeContentBrowserClient::BrowserURLHandlerCreated(
2626 BrowserURLHandler* handler) { 2632 BrowserURLHandler* handler) {
2627 for (size_t i = 0; i < extra_parts_.size(); ++i) 2633 for (size_t i = 0; i < extra_parts_.size(); ++i)
2628 extra_parts_[i]->BrowserURLHandlerCreated(handler); 2634 extra_parts_[i]->BrowserURLHandlerCreated(handler);
(...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after
3522 // displayed URL when rewriting chrome://help to chrome://settings/help. 3528 // displayed URL when rewriting chrome://help to chrome://settings/help.
3523 return url->SchemeIs(content::kChromeUIScheme) && 3529 return url->SchemeIs(content::kChromeUIScheme) &&
3524 url->host() == chrome::kChromeUISettingsHost; 3530 url->host() == chrome::kChromeUISettingsHost;
3525 } 3531 }
3526 3532
3527 // static 3533 // static
3528 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( 3534 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting(
3529 const storage::QuotaSettings* settings) { 3535 const storage::QuotaSettings* settings) {
3530 g_default_quota_settings = settings; 3536 g_default_quota_settings = settings;
3531 } 3537 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698