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

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: Changed the param to milliseconds 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
« no previous file with comments | « content/public/common/web_preferences.cc ('k') | media/blink/webmediaplayer_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2822 matching lines...) Expand 10 before | Expand all | Expand 10 after
2833 media::WebMediaPlayerParams params( 2833 media::WebMediaPlayerParams params(
2834 base::Bind(&ContentRendererClient::DeferMediaLoad, 2834 base::Bind(&ContentRendererClient::DeferMediaLoad,
2835 base::Unretained(GetContentClient()->renderer()), 2835 base::Unretained(GetContentClient()->renderer()),
2836 static_cast<RenderFrame*>(this), 2836 static_cast<RenderFrame*>(this),
2837 GetWebMediaPlayerDelegate()->has_played_media()), 2837 GetWebMediaPlayerDelegate()->has_played_media()),
2838 audio_renderer_sink, media_log, render_thread->GetMediaThreadTaskRunner(), 2838 audio_renderer_sink, media_log, render_thread->GetMediaThreadTaskRunner(),
2839 render_thread->GetWorkerTaskRunner(), 2839 render_thread->GetWorkerTaskRunner(),
2840 render_thread->compositor_task_runner(), context_3d_cb, 2840 render_thread->compositor_task_runner(), context_3d_cb,
2841 base::Bind(&v8::Isolate::AdjustAmountOfExternalAllocatedMemory, 2841 base::Bind(&v8::Isolate::AdjustAmountOfExternalAllocatedMemory,
2842 base::Unretained(blink::mainThreadIsolate())), 2842 base::Unretained(blink::mainThreadIsolate())),
2843 initial_cdm, media_surface_manager_, media_observer); 2843 initial_cdm, media_surface_manager_, media_observer,
2844 // TODO(avayvod, asvitkine): Query the value directly when it is available
2845 // in the renderer process. See https://crbug.com/681160.
2846 GetWebkitPreferences().max_keyframe_distance_to_disable_background_video);
2844 2847
2845 bool use_fallback_path = false; 2848 bool use_fallback_path = false;
2846 #if defined(OS_ANDROID) 2849 #if defined(OS_ANDROID)
2847 use_fallback_path = !UseWebMediaPlayerImpl(url); 2850 use_fallback_path = !UseWebMediaPlayerImpl(url);
2848 2851
2849 if (use_fallback_path && 2852 if (use_fallback_path &&
2850 !base::FeatureList::IsEnabled(media::kAndroidMediaPlayerRenderer)) { 2853 !base::FeatureList::IsEnabled(media::kAndroidMediaPlayerRenderer)) {
2851 return CreateAndroidWebMediaPlayer(client, encrypted_client, params); 2854 return CreateAndroidWebMediaPlayer(client, encrypted_client, params);
2852 } 2855 }
2853 #endif // defined(OS_ANDROID) 2856 #endif // defined(OS_ANDROID)
(...skipping 4012 matching lines...) Expand 10 before | Expand all | Expand 10 after
6866 // event target. Potentially a Pepper plugin will receive the event. 6869 // event target. Potentially a Pepper plugin will receive the event.
6867 // In order to tell whether a plugin gets the last mouse event and which it 6870 // In order to tell whether a plugin gets the last mouse event and which it
6868 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6871 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6869 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6872 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6870 // |pepper_last_mouse_event_target_|. 6873 // |pepper_last_mouse_event_target_|.
6871 pepper_last_mouse_event_target_ = nullptr; 6874 pepper_last_mouse_event_target_ = nullptr;
6872 #endif 6875 #endif
6873 } 6876 }
6874 6877
6875 } // namespace content 6878 } // namespace content
OLDNEW
« no previous file with comments | « content/public/common/web_preferences.cc ('k') | media/blink/webmediaplayer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698