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

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

Issue 2439543003: Do not use overlays when VR shell is enabled. (Closed)
Patch Set: Minor style adjustments Created 4 years 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 2841 matching lines...) Expand 10 before | Expand all | Expand 10 after
2852 #endif 2852 #endif
2853 2853
2854 if (!url_index_.get() || url_index_->frame() != frame_) 2854 if (!url_index_.get() || url_index_->frame() != frame_)
2855 url_index_.reset(new media::UrlIndex(frame_)); 2855 url_index_.reset(new media::UrlIndex(frame_));
2856 2856
2857 media::WebMediaPlayerImpl* media_player = new media::WebMediaPlayerImpl( 2857 media::WebMediaPlayerImpl* media_player = new media::WebMediaPlayerImpl(
2858 frame_, client, encrypted_client, 2858 frame_, client, encrypted_client,
2859 GetWebMediaPlayerDelegate()->AsWeakPtr(), 2859 GetWebMediaPlayerDelegate()->AsWeakPtr(),
2860 std::move(media_renderer_factory), url_index_, params); 2860 std::move(media_renderer_factory), url_index_, params);
2861 2861
2862 // TODO(amp): Update media player dynamically if it was started before
2863 // entering VR (in which case is_virtual will be false).
2864 media_player->SetInVr(render_view_->screen_info().is_virtual);
2865
2862 #if defined(OS_ANDROID) // WMPI_CAST 2866 #if defined(OS_ANDROID) // WMPI_CAST
2863 media_player->SetMediaPlayerManager(GetMediaPlayerManager()); 2867 media_player->SetMediaPlayerManager(GetMediaPlayerManager());
2864 media_player->SetDeviceScaleFactor(render_view_->GetDeviceScaleFactor()); 2868 media_player->SetDeviceScaleFactor(render_view_->GetDeviceScaleFactor());
2865 media_player->SetUseFallbackPath(use_fallback_path); 2869 media_player->SetUseFallbackPath(use_fallback_path);
2866 #endif // defined(OS_ANDROID) 2870 #endif // defined(OS_ANDROID)
2867 2871
2868 #if BUILDFLAG(ENABLE_MEDIA_REMOTING) 2872 #if BUILDFLAG(ENABLE_MEDIA_REMOTING)
2869 remoting_controller_ptr->SetSwitchRendererCallback(base::Bind( 2873 remoting_controller_ptr->SetSwitchRendererCallback(base::Bind(
2870 &media::WebMediaPlayerImpl::ScheduleRestart, media_player->AsWeakPtr())); 2874 &media::WebMediaPlayerImpl::ScheduleRestart, media_player->AsWeakPtr()));
2871 #endif 2875 #endif
(...skipping 3799 matching lines...) Expand 10 before | Expand all | Expand 10 after
6671 // event target. Potentially a Pepper plugin will receive the event. 6675 // event target. Potentially a Pepper plugin will receive the event.
6672 // In order to tell whether a plugin gets the last mouse event and which it 6676 // In order to tell whether a plugin gets the last mouse event and which it
6673 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6677 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6674 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6678 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6675 // |pepper_last_mouse_event_target_|. 6679 // |pepper_last_mouse_event_target_|.
6676 pepper_last_mouse_event_target_ = nullptr; 6680 pepper_last_mouse_event_target_ = nullptr;
6677 #endif 6681 #endif
6678 } 6682 }
6679 6683
6680 } // namespace content 6684 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698