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

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 2628313002: [Media] Plumb a feature parameter for the background video keyframe distance. (Closed)
Patch Set: Created 3 years, 11 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/renderer/render_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 2889 matching lines...) Expand 10 before | Expand all | Expand 10 after
2900 GetWebMediaPlayerDelegate()->AsWeakPtr(), 2900 GetWebMediaPlayerDelegate()->AsWeakPtr(),
2901 std::move(media_renderer_factory), url_index_, params); 2901 std::move(media_renderer_factory), url_index_, params);
2902 2902
2903 // TODO(http://crbug.com/673886): Re-enable overlays with VR shell enabled 2903 // TODO(http://crbug.com/673886): Re-enable overlays with VR shell enabled
2904 // when VR shell's video reprojection surface is enabled. Remove the setter 2904 // when VR shell's video reprojection surface is enabled. Remove the setter
2905 // and put the overlay feature check back in the constructor at that time. 2905 // and put the overlay feature check back in the constructor at that time.
2906 media_player->SetEnableFullscreenOverlays( 2906 media_player->SetEnableFullscreenOverlays(
2907 base::FeatureList::IsEnabled(media::kOverlayFullscreenVideo) && 2907 base::FeatureList::IsEnabled(media::kOverlayFullscreenVideo) &&
2908 !base::FeatureList::IsEnabled(features::kVrShell)); 2908 !base::FeatureList::IsEnabled(features::kVrShell));
2909 2909
2910 media_player->SetMaxKeyframeDistanceToDisableBackgroundVideo(
DaleCurtis 2017/01/13 20:34:13 Should this instead be part of WebMediaPlayerParam
whywhat 2017/01/13 21:10:54 That seemed like a smaller change, given the tempo
DaleCurtis 2017/01/14 00:28:04 It should always be used for one time values that
whywhat 2017/01/18 19:42:31 Ok, let me see how bigger the change will be due t
2911 base::TimeDelta::FromSeconds(GetWebkitPreferences()
2912 .max_keyframe_distance_to_disable_background_video_sec));
2913
2910 #if defined(OS_ANDROID) // WMPI_CAST 2914 #if defined(OS_ANDROID) // WMPI_CAST
2911 media_player->SetMediaPlayerManager(GetMediaPlayerManager()); 2915 media_player->SetMediaPlayerManager(GetMediaPlayerManager());
2912 media_player->SetDeviceScaleFactor(render_view_->GetDeviceScaleFactor()); 2916 media_player->SetDeviceScaleFactor(render_view_->GetDeviceScaleFactor());
2913 media_player->SetUseFallbackPath(use_fallback_path); 2917 media_player->SetUseFallbackPath(use_fallback_path);
2914 #endif // defined(OS_ANDROID) 2918 #endif // defined(OS_ANDROID)
2915 2919
2916 #if BUILDFLAG(ENABLE_MEDIA_REMOTING) 2920 #if BUILDFLAG(ENABLE_MEDIA_REMOTING)
2917 remoting_controller_ptr->SetSwitchRendererCallback(base::Bind( 2921 remoting_controller_ptr->SetSwitchRendererCallback(base::Bind(
2918 &media::WebMediaPlayerImpl::ScheduleRestart, media_player->AsWeakPtr())); 2922 &media::WebMediaPlayerImpl::ScheduleRestart, media_player->AsWeakPtr()));
2919 remoting_controller_ptr->SetRemoteSinkAvailableChangedCallback(base::Bind( 2923 remoting_controller_ptr->SetRemoteSinkAvailableChangedCallback(base::Bind(
(...skipping 3960 matching lines...) Expand 10 before | Expand all | Expand 10 after
6880 // event target. Potentially a Pepper plugin will receive the event. 6884 // event target. Potentially a Pepper plugin will receive the event.
6881 // In order to tell whether a plugin gets the last mouse event and which it 6885 // In order to tell whether a plugin gets the last mouse event and which it
6882 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6886 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6883 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6887 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6884 // |pepper_last_mouse_event_target_|. 6888 // |pepper_last_mouse_event_target_|.
6885 pepper_last_mouse_event_target_ = nullptr; 6889 pepper_last_mouse_event_target_ = nullptr;
6886 #endif 6890 #endif
6887 } 6891 }
6888 6892
6889 } // namespace content 6893 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698