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

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

Issue 1421693002: Plugin Power Saver: Do not always throttle plugins with posters. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@0025-pps-poster-pixel-tests
Patch Set: Created 5 years, 2 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 1964 matching lines...) Expand 10 before | Expand all | Expand 10 after
1975 return &service_registry_; 1975 return &service_registry_;
1976 } 1976 }
1977 1977
1978 #if defined(ENABLE_PLUGINS) 1978 #if defined(ENABLE_PLUGINS)
1979 void RenderFrameImpl::RegisterPeripheralPlugin( 1979 void RenderFrameImpl::RegisterPeripheralPlugin(
1980 const url::Origin& content_origin, 1980 const url::Origin& content_origin,
1981 const base::Closure& unthrottle_callback) { 1981 const base::Closure& unthrottle_callback) {
1982 return plugin_power_saver_helper_->RegisterPeripheralPlugin( 1982 return plugin_power_saver_helper_->RegisterPeripheralPlugin(
1983 content_origin, unthrottle_callback); 1983 content_origin, unthrottle_callback);
1984 } 1984 }
1985
1986 bool RenderFrameImpl::ShouldThrottleContent(
1987 const url::Origin& main_frame_origin,
1988 const url::Origin& content_origin,
1989 const std::string& plugin_module_name,
1990 int width,
1991 int height,
1992 bool* cross_origin_main_content) const {
1993 return plugin_power_saver_helper_->ShouldThrottleContent(
1994 main_frame_origin, content_origin, plugin_module_name, width, height,
1995 cross_origin_main_content);
1996 }
1997
1998 void RenderFrameImpl::WhitelistContentOrigin(
1999 const url::Origin& content_origin) {
2000 return plugin_power_saver_helper_->WhitelistContentOrigin(content_origin);
2001 }
1985 #endif // defined(ENABLE_PLUGINS) 2002 #endif // defined(ENABLE_PLUGINS)
1986 2003
1987 bool RenderFrameImpl::IsFTPDirectoryListing() { 2004 bool RenderFrameImpl::IsFTPDirectoryListing() {
1988 WebURLResponseExtraDataImpl* extra_data = 2005 WebURLResponseExtraDataImpl* extra_data =
1989 GetExtraDataFromResponse(frame_->dataSource()->response()); 2006 GetExtraDataFromResponse(frame_->dataSource()->response());
1990 return extra_data ? extra_data->is_ftp_directory_listing() : false; 2007 return extra_data ? extra_data->is_ftp_directory_listing() : false;
1991 } 2008 }
1992 2009
1993 void RenderFrameImpl::AttachGuest(int element_instance_id) { 2010 void RenderFrameImpl::AttachGuest(int element_instance_id) {
1994 BrowserPluginManager::Get()->Attach(element_instance_id); 2011 BrowserPluginManager::Get()->Attach(element_instance_id);
(...skipping 3213 matching lines...) Expand 10 before | Expand all | Expand 10 after
5208 mojo::ServiceProviderPtr service_provider; 5225 mojo::ServiceProviderPtr service_provider;
5209 mojo::URLRequestPtr request(mojo::URLRequest::New()); 5226 mojo::URLRequestPtr request(mojo::URLRequest::New());
5210 request->url = mojo::String::From(url); 5227 request->url = mojo::String::From(url);
5211 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider), 5228 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider),
5212 nullptr, nullptr, 5229 nullptr, nullptr,
5213 base::Bind(&OnGotContentHandlerID)); 5230 base::Bind(&OnGotContentHandlerID));
5214 return service_provider.Pass(); 5231 return service_provider.Pass();
5215 } 5232 }
5216 5233
5217 } // namespace content 5234 } // 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