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

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: tests 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 2436 matching lines...) Expand 10 before | Expand all | Expand 10 after
2586 if (base::FeatureList::IsEnabled( 2588 if (base::FeatureList::IsEnabled(
2587 features::kAllowAutoplayUnmutedInWebappManifestScope)) { 2589 features::kAllowAutoplayUnmutedInWebappManifestScope)) {
2588 web_prefs->media_playback_gesture_whitelist_scope = 2590 web_prefs->media_playback_gesture_whitelist_scope =
2589 tab_android->GetWebappManifestScope(); 2591 tab_android->GetWebappManifestScope();
2590 } 2592 }
2591 } 2593 }
2592 } 2594 }
2593 2595
2594 web_prefs->video_fullscreen_detection_enabled = 2596 web_prefs->video_fullscreen_detection_enabled =
2595 chrome::android::AppHooks::ShouldDetectVideoFullscreen(); 2597 chrome::android::AppHooks::ShouldDetectVideoFullscreen();
2598
2599 web_prefs->enable_media_in_product_help = base::FeatureList::IsEnabled(
2600 feature_engagement_tracker::kIPHMediaDownloadFeature);
2596 #endif // defined(OS_ANDROID) 2601 #endif // defined(OS_ANDROID)
2597 2602
2598 for (size_t i = 0; i < extra_parts_.size(); ++i) 2603 for (size_t i = 0; i < extra_parts_.size(); ++i)
2599 extra_parts_[i]->OverrideWebkitPrefs(rvh, web_prefs); 2604 extra_parts_[i]->OverrideWebkitPrefs(rvh, web_prefs);
2600 } 2605 }
2601 2606
2602 void ChromeContentBrowserClient::BrowserURLHandlerCreated( 2607 void ChromeContentBrowserClient::BrowserURLHandlerCreated(
2603 BrowserURLHandler* handler) { 2608 BrowserURLHandler* handler) {
2604 for (size_t i = 0; i < extra_parts_.size(); ++i) 2609 for (size_t i = 0; i < extra_parts_.size(); ++i)
2605 extra_parts_[i]->BrowserURLHandlerCreated(handler); 2610 extra_parts_[i]->BrowserURLHandlerCreated(handler);
(...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after
3479 // displayed URL when rewriting chrome://help to chrome://settings/help. 3484 // displayed URL when rewriting chrome://help to chrome://settings/help.
3480 return url->SchemeIs(content::kChromeUIScheme) && 3485 return url->SchemeIs(content::kChromeUIScheme) &&
3481 url->host() == chrome::kChromeUISettingsHost; 3486 url->host() == chrome::kChromeUISettingsHost;
3482 } 3487 }
3483 3488
3484 // static 3489 // static
3485 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( 3490 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting(
3486 const storage::QuotaSettings* settings) { 3491 const storage::QuotaSettings* settings) {
3487 g_default_quota_settings = settings; 3492 g_default_quota_settings = settings;
3488 } 3493 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698