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: .. Created 3 years, 4 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 #include "components/cloud_devices/common/cloud_devices_switches.h" 135 #include "components/cloud_devices/common/cloud_devices_switches.h"
136 #include "components/content_settings/core/browser/content_settings_utils.h" 136 #include "components/content_settings/core/browser/content_settings_utils.h"
137 #include "components/content_settings/core/browser/cookie_settings.h" 137 #include "components/content_settings/core/browser/cookie_settings.h"
138 #include "components/content_settings/core/browser/host_content_settings_map.h" 138 #include "components/content_settings/core/browser/host_content_settings_map.h"
139 #include "components/content_settings/core/common/content_settings.h" 139 #include "components/content_settings/core/common/content_settings.h"
140 #include "components/content_settings/core/common/content_settings_types.h" 140 #include "components/content_settings/core/common/content_settings_types.h"
141 #include "components/content_settings/core/common/content_settings_utils.h" 141 #include "components/content_settings/core/common/content_settings_utils.h"
142 #include "components/dom_distiller/core/dom_distiller_switches.h" 142 #include "components/dom_distiller/core/dom_distiller_switches.h"
143 #include "components/dom_distiller/core/url_constants.h" 143 #include "components/dom_distiller/core/url_constants.h"
144 #include "components/error_page/common/error_page_switches.h" 144 #include "components/error_page/common/error_page_switches.h"
145 #include "components/feature_engagement/public/feature_constants.h"
146 #include "components/feature_engagement/public/feature_list.h"
145 #include "components/google/core/browser/google_util.h" 147 #include "components/google/core/browser/google_util.h"
146 #include "components/metrics/call_stack_profile_collector.h" 148 #include "components/metrics/call_stack_profile_collector.h"
147 #include "components/metrics/client_info.h" 149 #include "components/metrics/client_info.h"
148 #include "components/nacl/common/nacl_constants.h" 150 #include "components/nacl/common/nacl_constants.h"
149 #include "components/net_log/chrome_net_log.h" 151 #include "components/net_log/chrome_net_log.h"
150 #include "components/password_manager/content/browser/content_password_manager_d river_factory.h" 152 #include "components/password_manager/content/browser/content_password_manager_d river_factory.h"
151 #include "components/pref_registry/pref_registry_syncable.h" 153 #include "components/pref_registry/pref_registry_syncable.h"
152 #include "components/prefs/pref_service.h" 154 #include "components/prefs/pref_service.h"
153 #include "components/prefs/scoped_user_pref_update.h" 155 #include "components/prefs/scoped_user_pref_update.h"
154 #include "components/rappor/public/rappor_utils.h" 156 #include "components/rappor/public/rappor_utils.h"
(...skipping 2350 matching lines...) Expand 10 before | Expand all | Expand 10 after
2505 if (base::FeatureList::IsEnabled( 2507 if (base::FeatureList::IsEnabled(
2506 features::kAllowAutoplayUnmutedInWebappManifestScope)) { 2508 features::kAllowAutoplayUnmutedInWebappManifestScope)) {
2507 web_prefs->media_playback_gesture_whitelist_scope = 2509 web_prefs->media_playback_gesture_whitelist_scope =
2508 tab_android->GetWebappManifestScope(); 2510 tab_android->GetWebappManifestScope();
2509 } 2511 }
2510 } 2512 }
2511 } 2513 }
2512 2514
2513 web_prefs->video_fullscreen_detection_enabled = 2515 web_prefs->video_fullscreen_detection_enabled =
2514 chrome::android::AppHooks::ShouldDetectVideoFullscreen(); 2516 chrome::android::AppHooks::ShouldDetectVideoFullscreen();
2517
2518 web_prefs->enable_media_download_in_product_help =
2519 base::FeatureList::IsEnabled(
2520 feature_engagement::kIPHMediaDownloadFeature);
2515 #endif // defined(OS_ANDROID) 2521 #endif // defined(OS_ANDROID)
2516 2522
2517 for (size_t i = 0; i < extra_parts_.size(); ++i) 2523 for (size_t i = 0; i < extra_parts_.size(); ++i)
2518 extra_parts_[i]->OverrideWebkitPrefs(rvh, web_prefs); 2524 extra_parts_[i]->OverrideWebkitPrefs(rvh, web_prefs);
2519 } 2525 }
2520 2526
2521 void ChromeContentBrowserClient::BrowserURLHandlerCreated( 2527 void ChromeContentBrowserClient::BrowserURLHandlerCreated(
2522 BrowserURLHandler* handler) { 2528 BrowserURLHandler* handler) {
2523 for (size_t i = 0; i < extra_parts_.size(); ++i) 2529 for (size_t i = 0; i < extra_parts_.size(); ++i)
2524 extra_parts_[i]->BrowserURLHandlerCreated(handler); 2530 extra_parts_[i]->BrowserURLHandlerCreated(handler);
(...skipping 946 matching lines...) Expand 10 before | Expand all | Expand 10 after
3471 // |safe_browsing_service_| may be unavailable in tests. 3477 // |safe_browsing_service_| may be unavailable in tests.
3472 if (safe_browsing_service_ && !safe_browsing_url_checker_delegate_) { 3478 if (safe_browsing_service_ && !safe_browsing_url_checker_delegate_) {
3473 safe_browsing_url_checker_delegate_ = 3479 safe_browsing_url_checker_delegate_ =
3474 new safe_browsing::UrlCheckerDelegateImpl( 3480 new safe_browsing::UrlCheckerDelegateImpl(
3475 safe_browsing_service_->database_manager(), 3481 safe_browsing_service_->database_manager(),
3476 safe_browsing_service_->ui_manager()); 3482 safe_browsing_service_->ui_manager());
3477 } 3483 }
3478 3484
3479 return safe_browsing_url_checker_delegate_.get(); 3485 return safe_browsing_url_checker_delegate_.get();
3480 } 3486 }
OLDNEW
« no previous file with comments | « chrome/browser/android/tab_android.cc ('k') | chrome/browser/chrome_content_browser_manifest_overlay.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698