OLD | NEW |
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 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/debug/alias.h" | 12 #include "base/debug/alias.h" |
13 #include "base/debug/asan_invalid_access.h" | 13 #include "base/debug/asan_invalid_access.h" |
14 #include "base/debug/dump_without_crashing.h" | 14 #include "base/debug/dump_without_crashing.h" |
15 #include "base/i18n/char_iterator.h" | 15 #include "base/i18n/char_iterator.h" |
16 #include "base/metrics/histogram.h" | 16 #include "base/metrics/histogram.h" |
17 #include "base/process/kill.h" | 17 #include "base/process/kill.h" |
18 #include "base/process/process.h" | 18 #include "base/process/process.h" |
19 #include "base/strings/string16.h" | 19 #include "base/strings/string16.h" |
20 #include "base/strings/utf_string_conversions.h" | 20 #include "base/strings/utf_string_conversions.h" |
21 #include "base/time/time.h" | 21 #include "base/time/time.h" |
22 #include "cc/base/switches.h" | 22 #include "cc/base/switches.h" |
23 #include "content/child/appcache/appcache_dispatcher.h" | 23 #include "content/child/appcache/appcache_dispatcher.h" |
| 24 #include "content/child/permissions/permissions_manager.h" |
24 #include "content/child/plugin_messages.h" | 25 #include "content/child/plugin_messages.h" |
25 #include "content/child/quota_dispatcher.h" | 26 #include "content/child/quota_dispatcher.h" |
26 #include "content/child/request_extra_data.h" | 27 #include "content/child/request_extra_data.h" |
27 #include "content/child/service_worker/service_worker_handle_reference.h" | 28 #include "content/child/service_worker/service_worker_handle_reference.h" |
28 #include "content/child/service_worker/service_worker_network_provider.h" | 29 #include "content/child/service_worker/service_worker_network_provider.h" |
29 #include "content/child/service_worker/service_worker_provider_context.h" | 30 #include "content/child/service_worker/service_worker_provider_context.h" |
30 #include "content/child/service_worker/web_service_worker_provider_impl.h" | 31 #include "content/child/service_worker/web_service_worker_provider_impl.h" |
31 #include "content/child/v8_value_converter_impl.h" | 32 #include "content/child/v8_value_converter_impl.h" |
32 #include "content/child/web_url_loader_impl.h" | 33 #include "content/child/web_url_loader_impl.h" |
33 #include "content/child/web_url_request_util.h" | 34 #include "content/child/web_url_request_util.h" |
(...skipping 3569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3603 break; | 3604 break; |
3604 case blink::WebFrameClient::UnloadHandler: | 3605 case blink::WebFrameClient::UnloadHandler: |
3605 Send(new FrameHostMsg_UnloadHandlersPresent( | 3606 Send(new FrameHostMsg_UnloadHandlersPresent( |
3606 routing_id_, present)); | 3607 routing_id_, present)); |
3607 break; | 3608 break; |
3608 default: | 3609 default: |
3609 NOTREACHED(); | 3610 NOTREACHED(); |
3610 } | 3611 } |
3611 } | 3612 } |
3612 | 3613 |
| 3614 blink::WebPermissionClient* RenderFrameImpl::permissionClient() { |
| 3615 if (!permission_client_) |
| 3616 permission_client_.reset(new PermissionsManager(*GetServiceRegistry())); |
| 3617 |
| 3618 return permission_client_.get(); |
| 3619 } |
| 3620 |
3613 void RenderFrameImpl::DidPlay(blink::WebMediaPlayer* player) { | 3621 void RenderFrameImpl::DidPlay(blink::WebMediaPlayer* player) { |
3614 Send(new FrameHostMsg_MediaPlayingNotification( | 3622 Send(new FrameHostMsg_MediaPlayingNotification( |
3615 routing_id_, reinterpret_cast<int64>(player), player->hasVideo(), | 3623 routing_id_, reinterpret_cast<int64>(player), player->hasVideo(), |
3616 player->hasAudio(), player->isRemote())); | 3624 player->hasAudio(), player->isRemote())); |
3617 } | 3625 } |
3618 | 3626 |
3619 void RenderFrameImpl::DidPause(blink::WebMediaPlayer* player) { | 3627 void RenderFrameImpl::DidPause(blink::WebMediaPlayer* player) { |
3620 Send(new FrameHostMsg_MediaPausedNotification( | 3628 Send(new FrameHostMsg_MediaPausedNotification( |
3621 routing_id_, reinterpret_cast<int64>(player))); | 3629 routing_id_, reinterpret_cast<int64>(player))); |
3622 } | 3630 } |
(...skipping 876 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4499 | 4507 |
4500 #if defined(ENABLE_BROWSER_CDMS) | 4508 #if defined(ENABLE_BROWSER_CDMS) |
4501 RendererCdmManager* RenderFrameImpl::GetCdmManager() { | 4509 RendererCdmManager* RenderFrameImpl::GetCdmManager() { |
4502 if (!cdm_manager_) | 4510 if (!cdm_manager_) |
4503 cdm_manager_ = new RendererCdmManager(this); | 4511 cdm_manager_ = new RendererCdmManager(this); |
4504 return cdm_manager_; | 4512 return cdm_manager_; |
4505 } | 4513 } |
4506 #endif // defined(ENABLE_BROWSER_CDMS) | 4514 #endif // defined(ENABLE_BROWSER_CDMS) |
4507 | 4515 |
4508 } // namespace content | 4516 } // namespace content |
OLD | NEW |