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

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

Issue 1341563002: Plugin Power Saver: Improve origin handling esp. with OOPIF. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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') | tools/metrics/histograms/histograms.xml » ('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 697 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 : frame_(NULL), 708 : frame_(NULL),
709 is_subframe_(false), 709 is_subframe_(false),
710 is_local_root_(false), 710 is_local_root_(false),
711 render_view_(params.render_view->AsWeakPtr()), 711 render_view_(params.render_view->AsWeakPtr()),
712 routing_id_(params.routing_id), 712 routing_id_(params.routing_id),
713 is_swapped_out_(false), 713 is_swapped_out_(false),
714 render_frame_proxy_(NULL), 714 render_frame_proxy_(NULL),
715 is_detaching_(false), 715 is_detaching_(false),
716 proxy_routing_id_(MSG_ROUTING_NONE), 716 proxy_routing_id_(MSG_ROUTING_NONE),
717 #if defined(ENABLE_PLUGINS) 717 #if defined(ENABLE_PLUGINS)
718 plugin_power_saver_helper_(NULL), 718 plugin_power_saver_helper_(nullptr),
719 #endif 719 #endif
720 cookie_jar_(this), 720 cookie_jar_(this),
721 selection_text_offset_(0), 721 selection_text_offset_(0),
722 selection_range_(gfx::Range::InvalidRange()), 722 selection_range_(gfx::Range::InvalidRange()),
723 handling_select_range_(false), 723 handling_select_range_(false),
724 notification_permission_dispatcher_(NULL), 724 notification_permission_dispatcher_(NULL),
725 web_user_media_client_(NULL), 725 web_user_media_client_(NULL),
726 media_permission_dispatcher_(NULL), 726 media_permission_dispatcher_(NULL),
727 midi_dispatcher_(NULL), 727 midi_dispatcher_(NULL),
728 #if defined(OS_ANDROID) 728 #if defined(OS_ANDROID)
(...skipping 23 matching lines...) Expand all
752 752
753 render_view_->RegisterRenderFrame(this); 753 render_view_->RegisterRenderFrame(this);
754 754
755 // Everything below subclasses RenderFrameObserver and is automatically 755 // Everything below subclasses RenderFrameObserver and is automatically
756 // deleted when the RenderFrame gets deleted. 756 // deleted when the RenderFrame gets deleted.
757 #if defined(OS_ANDROID) 757 #if defined(OS_ANDROID)
758 new GinJavaBridgeDispatcher(this); 758 new GinJavaBridgeDispatcher(this);
759 #endif 759 #endif
760 760
761 #if defined(ENABLE_PLUGINS) 761 #if defined(ENABLE_PLUGINS)
762 // Manages its own lifetime.
762 plugin_power_saver_helper_ = new PluginPowerSaverHelper(this); 763 plugin_power_saver_helper_ = new PluginPowerSaverHelper(this);
763 #endif 764 #endif
764 765
765 manifest_manager_ = new ManifestManager(this); 766 manifest_manager_ = new ManifestManager(this);
766 767
767 GetServiceRegistry()->ConnectToRemoteService(mojo::GetProxy(&mojo_shell_)); 768 GetServiceRegistry()->ConnectToRemoteService(mojo::GetProxy(&mojo_shell_));
768 } 769 }
769 770
770 RenderFrameImpl::~RenderFrameImpl() { 771 RenderFrameImpl::~RenderFrameImpl() {
771 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, RenderFrameGone()); 772 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, RenderFrameGone());
(...skipping 1177 matching lines...) Expand 10 before | Expand all | Expand 10 after
1949 void RenderFrameImpl::ExecuteJavaScript(const base::string16& javascript) { 1950 void RenderFrameImpl::ExecuteJavaScript(const base::string16& javascript) {
1950 OnJavaScriptExecuteRequest(javascript, 0, false); 1951 OnJavaScriptExecuteRequest(javascript, 0, false);
1951 } 1952 }
1952 1953
1953 ServiceRegistry* RenderFrameImpl::GetServiceRegistry() { 1954 ServiceRegistry* RenderFrameImpl::GetServiceRegistry() {
1954 return &service_registry_; 1955 return &service_registry_;
1955 } 1956 }
1956 1957
1957 #if defined(ENABLE_PLUGINS) 1958 #if defined(ENABLE_PLUGINS)
1958 void RenderFrameImpl::RegisterPeripheralPlugin( 1959 void RenderFrameImpl::RegisterPeripheralPlugin(
1959 const GURL& content_origin, 1960 const url::Origin& content_origin,
1960 const base::Closure& unthrottle_callback) { 1961 const base::Closure& unthrottle_callback) {
1961 return plugin_power_saver_helper_->RegisterPeripheralPlugin( 1962 return plugin_power_saver_helper_->RegisterPeripheralPlugin(
1962 content_origin, unthrottle_callback); 1963 content_origin, unthrottle_callback);
1963 } 1964 }
1964 #endif // defined(ENABLE_PLUGINS) 1965 #endif // defined(ENABLE_PLUGINS)
1965 1966
1966 bool RenderFrameImpl::IsFTPDirectoryListing() { 1967 bool RenderFrameImpl::IsFTPDirectoryListing() {
1967 WebURLResponseExtraDataImpl* extra_data = 1968 WebURLResponseExtraDataImpl* extra_data =
1968 GetExtraDataFromResponse(frame_->dataSource()->response()); 1969 GetExtraDataFromResponse(frame_->dataSource()->response());
1969 return extra_data ? extra_data->is_ftp_directory_listing() : false; 1970 return extra_data ? extra_data->is_ftp_directory_listing() : false;
(...skipping 3142 matching lines...) Expand 10 before | Expand all | Expand 10 after
5112 mojo::ServiceProviderPtr service_provider; 5113 mojo::ServiceProviderPtr service_provider;
5113 mojo::URLRequestPtr request(mojo::URLRequest::New()); 5114 mojo::URLRequestPtr request(mojo::URLRequest::New());
5114 request->url = mojo::String::From(url); 5115 request->url = mojo::String::From(url);
5115 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider), 5116 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider),
5116 nullptr, nullptr, 5117 nullptr, nullptr,
5117 base::Bind(&OnGotContentHandlerID)); 5118 base::Bind(&OnGotContentHandlerID));
5118 return service_provider.Pass(); 5119 return service_provider.Pass();
5119 } 5120 }
5120 5121
5121 } // namespace content 5122 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698