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" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 #include "content/renderer/render_process.h" | 99 #include "content/renderer/render_process.h" |
100 #include "content/renderer/render_thread_impl.h" | 100 #include "content/renderer/render_thread_impl.h" |
101 #include "content/renderer/render_view_impl.h" | 101 #include "content/renderer/render_view_impl.h" |
102 #include "content/renderer/render_widget_fullscreen_pepper.h" | 102 #include "content/renderer/render_widget_fullscreen_pepper.h" |
103 #include "content/renderer/renderer_webapplicationcachehost_impl.h" | 103 #include "content/renderer/renderer_webapplicationcachehost_impl.h" |
104 #include "content/renderer/renderer_webcolorchooser_impl.h" | 104 #include "content/renderer/renderer_webcolorchooser_impl.h" |
105 #include "content/renderer/screen_orientation/screen_orientation_dispatcher.h" | 105 #include "content/renderer/screen_orientation/screen_orientation_dispatcher.h" |
106 #include "content/renderer/shared_worker_repository.h" | 106 #include "content/renderer/shared_worker_repository.h" |
107 #include "content/renderer/skia_benchmarking_extension.h" | 107 #include "content/renderer/skia_benchmarking_extension.h" |
108 #include "content/renderer/stats_collection_controller.h" | 108 #include "content/renderer/stats_collection_controller.h" |
| 109 #include "content/renderer/wake_lock/wake_lock_dispatcher.h" |
109 #include "content/renderer/web_ui_extension.h" | 110 #include "content/renderer/web_ui_extension.h" |
110 #include "content/renderer/websharedworker_proxy.h" | 111 #include "content/renderer/websharedworker_proxy.h" |
111 #include "gin/modules/module_registry.h" | 112 #include "gin/modules/module_registry.h" |
112 #include "media/base/audio_renderer_mixer_input.h" | 113 #include "media/base/audio_renderer_mixer_input.h" |
113 #include "media/base/media_log.h" | 114 #include "media/base/media_log.h" |
114 #include "media/blink/webencryptedmediaclient_impl.h" | 115 #include "media/blink/webencryptedmediaclient_impl.h" |
115 #include "media/blink/webmediaplayer_impl.h" | 116 #include "media/blink/webmediaplayer_impl.h" |
116 #include "media/renderers/gpu_video_accelerator_factories.h" | 117 #include "media/renderers/gpu_video_accelerator_factories.h" |
117 #include "mojo/common/url_type_converters.h" | 118 #include "mojo/common/url_type_converters.h" |
118 #include "net/base/data_url.h" | 119 #include "net/base/data_url.h" |
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
729 media_player_manager_(NULL), | 730 media_player_manager_(NULL), |
730 #endif | 731 #endif |
731 #if defined(ENABLE_BROWSER_CDMS) | 732 #if defined(ENABLE_BROWSER_CDMS) |
732 cdm_manager_(NULL), | 733 cdm_manager_(NULL), |
733 #endif | 734 #endif |
734 #if defined(VIDEO_HOLE) | 735 #if defined(VIDEO_HOLE) |
735 contains_media_player_(false), | 736 contains_media_player_(false), |
736 #endif | 737 #endif |
737 has_played_media_(false), | 738 has_played_media_(false), |
738 devtools_agent_(nullptr), | 739 devtools_agent_(nullptr), |
| 740 wakelock_dispatcher_(nullptr), |
739 geolocation_dispatcher_(NULL), | 741 geolocation_dispatcher_(NULL), |
740 push_messaging_dispatcher_(NULL), | 742 push_messaging_dispatcher_(NULL), |
741 presentation_dispatcher_(NULL), | 743 presentation_dispatcher_(NULL), |
742 screen_orientation_dispatcher_(NULL), | 744 screen_orientation_dispatcher_(NULL), |
743 manifest_manager_(NULL), | 745 manifest_manager_(NULL), |
744 accessibility_mode_(AccessibilityModeOff), | 746 accessibility_mode_(AccessibilityModeOff), |
745 renderer_accessibility_(NULL), | 747 renderer_accessibility_(NULL), |
746 weak_factory_(this) { | 748 weak_factory_(this) { |
747 std::pair<RoutingIDFrameMap::iterator, bool> result = | 749 std::pair<RoutingIDFrameMap::iterator, bool> result = |
748 g_routing_id_frame_map.Get().insert(std::make_pair(routing_id_, this)); | 750 g_routing_id_frame_map.Get().insert(std::make_pair(routing_id_, this)); |
(...skipping 2819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3568 static_cast<storage::StorageType>(type), | 3570 static_cast<storage::StorageType>(type), |
3569 requested_size, | 3571 requested_size, |
3570 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); | 3572 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); |
3571 } | 3573 } |
3572 | 3574 |
3573 void RenderFrameImpl::willOpenWebSocket(blink::WebSocketHandle* handle) { | 3575 void RenderFrameImpl::willOpenWebSocket(blink::WebSocketHandle* handle) { |
3574 WebSocketBridge* impl = static_cast<WebSocketBridge*>(handle); | 3576 WebSocketBridge* impl = static_cast<WebSocketBridge*>(handle); |
3575 impl->set_render_frame_id(routing_id_); | 3577 impl->set_render_frame_id(routing_id_); |
3576 } | 3578 } |
3577 | 3579 |
| 3580 blink::WebWakeLockClient* RenderFrameImpl::wakeLockClient() { |
| 3581 if (!wakelock_dispatcher_) |
| 3582 wakelock_dispatcher_ = new WakeLockDispatcher(this); |
| 3583 return wakelock_dispatcher_; |
| 3584 } |
| 3585 |
3578 blink::WebGeolocationClient* RenderFrameImpl::geolocationClient() { | 3586 blink::WebGeolocationClient* RenderFrameImpl::geolocationClient() { |
3579 if (!geolocation_dispatcher_) | 3587 if (!geolocation_dispatcher_) |
3580 geolocation_dispatcher_ = new GeolocationDispatcher(this); | 3588 geolocation_dispatcher_ = new GeolocationDispatcher(this); |
3581 return geolocation_dispatcher_; | 3589 return geolocation_dispatcher_; |
3582 } | 3590 } |
3583 | 3591 |
3584 blink::WebPresentationClient* RenderFrameImpl::presentationClient() { | 3592 blink::WebPresentationClient* RenderFrameImpl::presentationClient() { |
3585 if (!presentation_dispatcher_) | 3593 if (!presentation_dispatcher_) |
3586 presentation_dispatcher_ = new PresentationDispatcher(this); | 3594 presentation_dispatcher_ = new PresentationDispatcher(this); |
3587 return presentation_dispatcher_; | 3595 return presentation_dispatcher_; |
(...skipping 1512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5100 mojo::ServiceProviderPtr service_provider; | 5108 mojo::ServiceProviderPtr service_provider; |
5101 mojo::URLRequestPtr request(mojo::URLRequest::New()); | 5109 mojo::URLRequestPtr request(mojo::URLRequest::New()); |
5102 request->url = mojo::String::From(url); | 5110 request->url = mojo::String::From(url); |
5103 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider), | 5111 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider), |
5104 nullptr, nullptr, | 5112 nullptr, nullptr, |
5105 base::Bind(&OnGotContentHandlerID)); | 5113 base::Bind(&OnGotContentHandlerID)); |
5106 return service_provider.Pass(); | 5114 return service_provider.Pass(); |
5107 } | 5115 } |
5108 | 5116 |
5109 } // namespace content | 5117 } // namespace content |
OLD | NEW |