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

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

Issue 904913003: Plugin Power Saver: Fix implicitly sized and below the fold plugins. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months 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') | no next file » | 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 1747 matching lines...) Expand 10 before | Expand all | Expand 10 after
1758 return &service_registry_; 1758 return &service_registry_;
1759 } 1759 }
1760 1760
1761 #if defined(ENABLE_PLUGINS) 1761 #if defined(ENABLE_PLUGINS)
1762 void RenderFrameImpl::RegisterPeripheralPlugin( 1762 void RenderFrameImpl::RegisterPeripheralPlugin(
1763 const GURL& content_origin, 1763 const GURL& content_origin,
1764 const base::Closure& unthrottle_callback) { 1764 const base::Closure& unthrottle_callback) {
1765 return plugin_power_saver_helper_->RegisterPeripheralPlugin( 1765 return plugin_power_saver_helper_->RegisterPeripheralPlugin(
1766 content_origin, unthrottle_callback); 1766 content_origin, unthrottle_callback);
1767 } 1767 }
1768
1769 bool RenderFrameImpl::ShouldThrottleContent(
1770 const blink::WebPluginParams& params,
1771 const GURL& page_frame_url,
1772 GURL* poster_image,
1773 bool* cross_origin_main_content) const {
1774 return plugin_power_saver_helper_->ShouldThrottleContent(
1775 params, page_frame_url, poster_image, cross_origin_main_content);
1776 }
1777
1778 void RenderFrameImpl::WhitelistContentOrigin(const GURL& content_origin) {
1779 return plugin_power_saver_helper_->WhitelistContentOrigin(content_origin);
1780 }
1781 #endif // defined(ENABLE_PLUGINS) 1768 #endif // defined(ENABLE_PLUGINS)
1782 1769
1783 bool RenderFrameImpl::IsFTPDirectoryListing() { 1770 bool RenderFrameImpl::IsFTPDirectoryListing() {
1784 WebURLResponseExtraDataImpl* extra_data = 1771 WebURLResponseExtraDataImpl* extra_data =
1785 GetExtraDataFromResponse(frame_->dataSource()->response()); 1772 GetExtraDataFromResponse(frame_->dataSource()->response());
1786 return extra_data ? extra_data->is_ftp_directory_listing() : false; 1773 return extra_data ? extra_data->is_ftp_directory_listing() : false;
1787 } 1774 }
1788 1775
1789 void RenderFrameImpl::AttachGuest(int element_instance_id) { 1776 void RenderFrameImpl::AttachGuest(int element_instance_id) {
1790 BrowserPluginManager::Get()->Attach(element_instance_id); 1777 BrowserPluginManager::Get()->Attach(element_instance_id);
(...skipping 2665 matching lines...) Expand 10 before | Expand all | Expand 10 after
4456 4443
4457 #if defined(ENABLE_BROWSER_CDMS) 4444 #if defined(ENABLE_BROWSER_CDMS)
4458 RendererCdmManager* RenderFrameImpl::GetCdmManager() { 4445 RendererCdmManager* RenderFrameImpl::GetCdmManager() {
4459 if (!cdm_manager_) 4446 if (!cdm_manager_)
4460 cdm_manager_ = new RendererCdmManager(this); 4447 cdm_manager_ = new RendererCdmManager(this);
4461 return cdm_manager_; 4448 return cdm_manager_;
4462 } 4449 }
4463 #endif // defined(ENABLE_BROWSER_CDMS) 4450 #endif // defined(ENABLE_BROWSER_CDMS)
4464 4451
4465 } // namespace content 4452 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698