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/permission_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 3616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3650 break; | 3651 break; |
3651 case blink::WebFrameClient::UnloadHandler: | 3652 case blink::WebFrameClient::UnloadHandler: |
3652 Send(new FrameHostMsg_UnloadHandlersPresent( | 3653 Send(new FrameHostMsg_UnloadHandlersPresent( |
3653 routing_id_, present)); | 3654 routing_id_, present)); |
3654 break; | 3655 break; |
3655 default: | 3656 default: |
3656 NOTREACHED(); | 3657 NOTREACHED(); |
3657 } | 3658 } |
3658 } | 3659 } |
3659 | 3660 |
| 3661 blink::WebPermissionClient* RenderFrameImpl::permissionClient() { |
| 3662 if (!permission_client_) |
| 3663 permission_client_.reset(new PermissionManager(*GetServiceRegistry())); |
| 3664 |
| 3665 return permission_client_.get(); |
| 3666 } |
| 3667 |
3660 void RenderFrameImpl::DidPlay(blink::WebMediaPlayer* player) { | 3668 void RenderFrameImpl::DidPlay(blink::WebMediaPlayer* player) { |
3661 Send(new FrameHostMsg_MediaPlayingNotification( | 3669 Send(new FrameHostMsg_MediaPlayingNotification( |
3662 routing_id_, reinterpret_cast<int64>(player), player->hasVideo(), | 3670 routing_id_, reinterpret_cast<int64>(player), player->hasVideo(), |
3663 player->hasAudio(), player->isRemote())); | 3671 player->hasAudio(), player->isRemote())); |
3664 } | 3672 } |
3665 | 3673 |
3666 void RenderFrameImpl::DidPause(blink::WebMediaPlayer* player) { | 3674 void RenderFrameImpl::DidPause(blink::WebMediaPlayer* player) { |
3667 Send(new FrameHostMsg_MediaPausedNotification( | 3675 Send(new FrameHostMsg_MediaPausedNotification( |
3668 routing_id_, reinterpret_cast<int64>(player))); | 3676 routing_id_, reinterpret_cast<int64>(player))); |
3669 } | 3677 } |
(...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4548 | 4556 |
4549 #if defined(ENABLE_BROWSER_CDMS) | 4557 #if defined(ENABLE_BROWSER_CDMS) |
4550 RendererCdmManager* RenderFrameImpl::GetCdmManager() { | 4558 RendererCdmManager* RenderFrameImpl::GetCdmManager() { |
4551 if (!cdm_manager_) | 4559 if (!cdm_manager_) |
4552 cdm_manager_ = new RendererCdmManager(this); | 4560 cdm_manager_ = new RendererCdmManager(this); |
4553 return cdm_manager_; | 4561 return cdm_manager_; |
4554 } | 4562 } |
4555 #endif // defined(ENABLE_BROWSER_CDMS) | 4563 #endif // defined(ENABLE_BROWSER_CDMS) |
4556 | 4564 |
4557 } // namespace content | 4565 } // namespace content |
OLD | NEW |