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 3591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3625 break; | 3626 break; |
3626 case blink::WebFrameClient::UnloadHandler: | 3627 case blink::WebFrameClient::UnloadHandler: |
3627 Send(new FrameHostMsg_UnloadHandlersPresent( | 3628 Send(new FrameHostMsg_UnloadHandlersPresent( |
3628 routing_id_, present)); | 3629 routing_id_, present)); |
3629 break; | 3630 break; |
3630 default: | 3631 default: |
3631 NOTREACHED(); | 3632 NOTREACHED(); |
3632 } | 3633 } |
3633 } | 3634 } |
3634 | 3635 |
| 3636 blink::WebPermissionClient* RenderFrameImpl::permissionClient() { |
| 3637 if (!permission_client_) |
| 3638 permission_client_.reset(new PermissionManager(GetServiceRegistry())); |
| 3639 |
| 3640 return permission_client_.get(); |
| 3641 } |
| 3642 |
3635 void RenderFrameImpl::DidPlay(blink::WebMediaPlayer* player) { | 3643 void RenderFrameImpl::DidPlay(blink::WebMediaPlayer* player) { |
3636 Send(new FrameHostMsg_MediaPlayingNotification( | 3644 Send(new FrameHostMsg_MediaPlayingNotification( |
3637 routing_id_, reinterpret_cast<int64>(player), player->hasVideo(), | 3645 routing_id_, reinterpret_cast<int64>(player), player->hasVideo(), |
3638 player->hasAudio(), player->isRemote())); | 3646 player->hasAudio(), player->isRemote())); |
3639 } | 3647 } |
3640 | 3648 |
3641 void RenderFrameImpl::DidPause(blink::WebMediaPlayer* player) { | 3649 void RenderFrameImpl::DidPause(blink::WebMediaPlayer* player) { |
3642 Send(new FrameHostMsg_MediaPausedNotification( | 3650 Send(new FrameHostMsg_MediaPausedNotification( |
3643 routing_id_, reinterpret_cast<int64>(player))); | 3651 routing_id_, reinterpret_cast<int64>(player))); |
3644 } | 3652 } |
(...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4523 | 4531 |
4524 #if defined(ENABLE_BROWSER_CDMS) | 4532 #if defined(ENABLE_BROWSER_CDMS) |
4525 RendererCdmManager* RenderFrameImpl::GetCdmManager() { | 4533 RendererCdmManager* RenderFrameImpl::GetCdmManager() { |
4526 if (!cdm_manager_) | 4534 if (!cdm_manager_) |
4527 cdm_manager_ = new RendererCdmManager(this); | 4535 cdm_manager_ = new RendererCdmManager(this); |
4528 return cdm_manager_; | 4536 return cdm_manager_; |
4529 } | 4537 } |
4530 #endif // defined(ENABLE_BROWSER_CDMS) | 4538 #endif // defined(ENABLE_BROWSER_CDMS) |
4531 | 4539 |
4532 } // namespace content | 4540 } // namespace content |
OLD | NEW |