Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(140)

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 1393203004: Reland of Wake Lock API implementation (Chromium part) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix presubmit errors Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | content/renderer/wake_lock/wake_lock_dispatcher.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 #include "content/renderer/render_thread_impl.h" 101 #include "content/renderer/render_thread_impl.h"
102 #include "content/renderer/render_view_impl.h" 102 #include "content/renderer/render_view_impl.h"
103 #include "content/renderer/render_widget_fullscreen_pepper.h" 103 #include "content/renderer/render_widget_fullscreen_pepper.h"
104 #include "content/renderer/renderer_webapplicationcachehost_impl.h" 104 #include "content/renderer/renderer_webapplicationcachehost_impl.h"
105 #include "content/renderer/renderer_webcolorchooser_impl.h" 105 #include "content/renderer/renderer_webcolorchooser_impl.h"
106 #include "content/renderer/savable_resources.h" 106 #include "content/renderer/savable_resources.h"
107 #include "content/renderer/screen_orientation/screen_orientation_dispatcher.h" 107 #include "content/renderer/screen_orientation/screen_orientation_dispatcher.h"
108 #include "content/renderer/shared_worker_repository.h" 108 #include "content/renderer/shared_worker_repository.h"
109 #include "content/renderer/skia_benchmarking_extension.h" 109 #include "content/renderer/skia_benchmarking_extension.h"
110 #include "content/renderer/stats_collection_controller.h" 110 #include "content/renderer/stats_collection_controller.h"
111 #include "content/renderer/wake_lock/wake_lock_dispatcher.h"
111 #include "content/renderer/web_ui_extension.h" 112 #include "content/renderer/web_ui_extension.h"
112 #include "content/renderer/websharedworker_proxy.h" 113 #include "content/renderer/websharedworker_proxy.h"
113 #include "gin/modules/module_registry.h" 114 #include "gin/modules/module_registry.h"
114 #include "media/base/audio_renderer_mixer_input.h" 115 #include "media/base/audio_renderer_mixer_input.h"
115 #include "media/base/media_log.h" 116 #include "media/base/media_log.h"
116 #include "media/blink/webencryptedmediaclient_impl.h" 117 #include "media/blink/webencryptedmediaclient_impl.h"
117 #include "media/blink/webmediaplayer_impl.h" 118 #include "media/blink/webmediaplayer_impl.h"
118 #include "media/renderers/gpu_video_accelerator_factories.h" 119 #include "media/renderers/gpu_video_accelerator_factories.h"
119 #include "mojo/common/url_type_converters.h" 120 #include "mojo/common/url_type_converters.h"
120 #include "net/base/data_url.h" 121 #include "net/base/data_url.h"
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 media_player_manager_(NULL), 718 media_player_manager_(NULL),
718 #endif 719 #endif
719 #if defined(ENABLE_BROWSER_CDMS) 720 #if defined(ENABLE_BROWSER_CDMS)
720 cdm_manager_(NULL), 721 cdm_manager_(NULL),
721 #endif 722 #endif
722 #if defined(VIDEO_HOLE) 723 #if defined(VIDEO_HOLE)
723 contains_media_player_(false), 724 contains_media_player_(false),
724 #endif 725 #endif
725 has_played_media_(false), 726 has_played_media_(false),
726 devtools_agent_(nullptr), 727 devtools_agent_(nullptr),
728 wakelock_dispatcher_(nullptr),
727 geolocation_dispatcher_(NULL), 729 geolocation_dispatcher_(NULL),
728 push_messaging_dispatcher_(NULL), 730 push_messaging_dispatcher_(NULL),
729 presentation_dispatcher_(NULL), 731 presentation_dispatcher_(NULL),
730 screen_orientation_dispatcher_(NULL), 732 screen_orientation_dispatcher_(NULL),
731 manifest_manager_(NULL), 733 manifest_manager_(NULL),
732 accessibility_mode_(AccessibilityModeOff), 734 accessibility_mode_(AccessibilityModeOff),
733 renderer_accessibility_(NULL), 735 renderer_accessibility_(NULL),
734 weak_factory_(this) { 736 weak_factory_(this) {
735 std::pair<RoutingIDFrameMap::iterator, bool> result = 737 std::pair<RoutingIDFrameMap::iterator, bool> result =
736 g_routing_id_frame_map.Get().insert(std::make_pair(routing_id_, this)); 738 g_routing_id_frame_map.Get().insert(std::make_pair(routing_id_, this));
(...skipping 2853 matching lines...) Expand 10 before | Expand all | Expand 10 after
3590 static_cast<storage::StorageType>(type), 3592 static_cast<storage::StorageType>(type),
3591 requested_size, 3593 requested_size,
3592 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); 3594 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks));
3593 } 3595 }
3594 3596
3595 void RenderFrameImpl::willOpenWebSocket(blink::WebSocketHandle* handle) { 3597 void RenderFrameImpl::willOpenWebSocket(blink::WebSocketHandle* handle) {
3596 WebSocketBridge* impl = static_cast<WebSocketBridge*>(handle); 3598 WebSocketBridge* impl = static_cast<WebSocketBridge*>(handle);
3597 impl->set_render_frame_id(routing_id_); 3599 impl->set_render_frame_id(routing_id_);
3598 } 3600 }
3599 3601
3602 blink::WebWakeLockClient* RenderFrameImpl::wakeLockClient() {
3603 if (!wakelock_dispatcher_)
3604 wakelock_dispatcher_ = new WakeLockDispatcher(this);
3605 return wakelock_dispatcher_;
3606 }
3607
3600 blink::WebGeolocationClient* RenderFrameImpl::geolocationClient() { 3608 blink::WebGeolocationClient* RenderFrameImpl::geolocationClient() {
3601 if (!geolocation_dispatcher_) 3609 if (!geolocation_dispatcher_)
3602 geolocation_dispatcher_ = new GeolocationDispatcher(this); 3610 geolocation_dispatcher_ = new GeolocationDispatcher(this);
3603 return geolocation_dispatcher_; 3611 return geolocation_dispatcher_;
3604 } 3612 }
3605 3613
3606 blink::WebPresentationClient* RenderFrameImpl::presentationClient() { 3614 blink::WebPresentationClient* RenderFrameImpl::presentationClient() {
3607 if (!presentation_dispatcher_) 3615 if (!presentation_dispatcher_)
3608 presentation_dispatcher_ = new PresentationDispatcher(this); 3616 presentation_dispatcher_ = new PresentationDispatcher(this);
3609 return presentation_dispatcher_; 3617 return presentation_dispatcher_;
(...skipping 1587 matching lines...) Expand 10 before | Expand all | Expand 10 after
5197 mojo::ServiceProviderPtr service_provider; 5205 mojo::ServiceProviderPtr service_provider;
5198 mojo::URLRequestPtr request(mojo::URLRequest::New()); 5206 mojo::URLRequestPtr request(mojo::URLRequest::New());
5199 request->url = mojo::String::From(url); 5207 request->url = mojo::String::From(url);
5200 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider), 5208 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider),
5201 nullptr, nullptr, 5209 nullptr, nullptr,
5202 base::Bind(&OnGotContentHandlerID)); 5210 base::Bind(&OnGotContentHandlerID));
5203 return service_provider.Pass(); 5211 return service_provider.Pass();
5204 } 5212 }
5205 5213
5206 } // namespace content 5214 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | content/renderer/wake_lock/wake_lock_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698