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

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

Issue 2643893002: Skip video overlay surface management when in VR. (Closed)
Patch Set: Removed public API changes and changed references to cast to base instead. 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 2878 matching lines...) Expand 10 before | Expand all | Expand 10 after
2889 #endif 2889 #endif
2890 2890
2891 if (!url_index_.get() || url_index_->frame() != frame_) 2891 if (!url_index_.get() || url_index_->frame() != frame_)
2892 url_index_.reset(new media::UrlIndex(frame_)); 2892 url_index_.reset(new media::UrlIndex(frame_));
2893 2893
2894 media::WebMediaPlayerImpl* media_player = new media::WebMediaPlayerImpl( 2894 media::WebMediaPlayerImpl* media_player = new media::WebMediaPlayerImpl(
2895 frame_, client, encrypted_client, 2895 frame_, client, encrypted_client,
2896 GetWebMediaPlayerDelegate()->AsWeakPtr(), 2896 GetWebMediaPlayerDelegate()->AsWeakPtr(),
2897 std::move(media_renderer_factory), url_index_, params); 2897 std::move(media_renderer_factory), url_index_, params);
2898 2898
2899 // TODO(http://crbug.com/673886): Re-enable overlays with VR shell enabled
2900 // when VR shell's video reprojection surface is enabled. Remove the setter
2901 // and put the overlay feature check back in the constructor at that time.
2902 media_player->SetEnableFullscreenOverlays(
2903 base::FeatureList::IsEnabled(media::kOverlayFullscreenVideo) &&
2904 !base::FeatureList::IsEnabled(features::kVrShell));
2905
2906 #if defined(OS_ANDROID) // WMPI_CAST 2899 #if defined(OS_ANDROID) // WMPI_CAST
2907 media_player->SetMediaPlayerManager(GetMediaPlayerManager()); 2900 media_player->SetMediaPlayerManager(GetMediaPlayerManager());
2908 media_player->SetDeviceScaleFactor(render_view_->GetDeviceScaleFactor()); 2901 media_player->SetDeviceScaleFactor(render_view_->GetDeviceScaleFactor());
2909 media_player->SetUseFallbackPath(use_fallback_path); 2902 media_player->SetUseFallbackPath(use_fallback_path);
2910 #endif // defined(OS_ANDROID) 2903 #endif // defined(OS_ANDROID)
2911 2904
2912 #if BUILDFLAG(ENABLE_MEDIA_REMOTING) 2905 #if BUILDFLAG(ENABLE_MEDIA_REMOTING)
2913 remoting_controller_ptr->SetSwitchRendererCallback(base::Bind( 2906 remoting_controller_ptr->SetSwitchRendererCallback(base::Bind(
2914 &media::WebMediaPlayerImpl::ScheduleRestart, media_player->AsWeakPtr())); 2907 &media::WebMediaPlayerImpl::ScheduleRestart, media_player->AsWeakPtr()));
2915 remoting_controller_ptr->SetRemoteSinkAvailableChangedCallback(base::Bind( 2908 remoting_controller_ptr->SetRemoteSinkAvailableChangedCallback(base::Bind(
(...skipping 3958 matching lines...) Expand 10 before | Expand all | Expand 10 after
6874 // event target. Potentially a Pepper plugin will receive the event. 6867 // event target. Potentially a Pepper plugin will receive the event.
6875 // In order to tell whether a plugin gets the last mouse event and which it 6868 // In order to tell whether a plugin gets the last mouse event and which it
6876 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6869 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6877 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6870 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6878 // |pepper_last_mouse_event_target_|. 6871 // |pepper_last_mouse_event_target_|.
6879 pepper_last_mouse_event_target_ = nullptr; 6872 pepper_last_mouse_event_target_ = nullptr;
6880 #endif 6873 #endif
6881 } 6874 }
6882 6875
6883 } // namespace content 6876 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_base.cc ('k') | media/blink/webmediaplayer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698