OLD | NEW |
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 "content/browser/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 | 109 |
110 #if defined(ENABLE_BROWSER_CDMS) | 110 #if defined(ENABLE_BROWSER_CDMS) |
111 #include "content/browser/media/media_web_contents_observer.h" | 111 #include "content/browser/media/media_web_contents_observer.h" |
112 #endif | 112 #endif |
113 | 113 |
114 #if defined(OS_ANDROID) | 114 #if defined(OS_ANDROID) |
115 #include "content/browser/android/content_video_view.h" | 115 #include "content/browser/android/content_video_view.h" |
116 #include "content/browser/android/date_time_chooser_android.h" | 116 #include "content/browser/android/date_time_chooser_android.h" |
117 #include "content/browser/android/media_players_observer.h" | 117 #include "content/browser/android/media_players_observer.h" |
118 #include "content/browser/media/android/browser_media_player_manager.h" | 118 #include "content/browser/media/android/browser_media_player_manager.h" |
| 119 #include "content/browser/media/android/media_session.h" |
119 #include "content/browser/web_contents/web_contents_android.h" | 120 #include "content/browser/web_contents/web_contents_android.h" |
120 #endif | 121 #endif |
121 | 122 |
122 #if defined(OS_MACOSX) | 123 #if defined(OS_MACOSX) |
123 #include "base/mac/foundation_util.h" | 124 #include "base/mac/foundation_util.h" |
124 #endif | 125 #endif |
125 | 126 |
126 namespace content { | 127 namespace content { |
127 namespace { | 128 namespace { |
128 | 129 |
(...skipping 4095 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4224 } | 4225 } |
4225 return web_contents_android; | 4226 return web_contents_android; |
4226 } | 4227 } |
4227 | 4228 |
4228 bool WebContentsImpl::CreateRenderViewForInitialEmptyDocument() { | 4229 bool WebContentsImpl::CreateRenderViewForInitialEmptyDocument() { |
4229 return CreateRenderViewForRenderManager( | 4230 return CreateRenderViewForRenderManager( |
4230 GetRenderViewHost(), MSG_ROUTING_NONE, MSG_ROUTING_NONE, | 4231 GetRenderViewHost(), MSG_ROUTING_NONE, MSG_ROUTING_NONE, |
4231 frame_tree_.root()->current_replication_state(), true); | 4232 frame_tree_.root()->current_replication_state(), true); |
4232 } | 4233 } |
4233 | 4234 |
| 4235 MediaControlsDelegate* WebContentsImpl::GetMediaControlsDelegate() { |
| 4236 return MediaSession::Get(this); |
| 4237 } |
| 4238 |
4234 #elif defined(OS_MACOSX) | 4239 #elif defined(OS_MACOSX) |
4235 | 4240 |
4236 void WebContentsImpl::SetAllowOtherViews(bool allow) { | 4241 void WebContentsImpl::SetAllowOtherViews(bool allow) { |
4237 view_->SetAllowOtherViews(allow); | 4242 view_->SetAllowOtherViews(allow); |
4238 } | 4243 } |
4239 | 4244 |
4240 bool WebContentsImpl::GetAllowOtherViews() { | 4245 bool WebContentsImpl::GetAllowOtherViews() { |
4241 return view_->GetAllowOtherViews(); | 4246 return view_->GetAllowOtherViews(); |
4242 } | 4247 } |
4243 | 4248 |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4391 player_map->erase(it); | 4396 player_map->erase(it); |
4392 } | 4397 } |
4393 | 4398 |
4394 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { | 4399 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { |
4395 force_disable_overscroll_content_ = force_disable; | 4400 force_disable_overscroll_content_ = force_disable; |
4396 if (view_) | 4401 if (view_) |
4397 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); | 4402 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); |
4398 } | 4403 } |
4399 | 4404 |
4400 } // namespace content | 4405 } // namespace content |
OLD | NEW |