Index: content/renderer/pepper/plugin_instance_throttler_impl.cc |
diff --git a/content/renderer/pepper/plugin_instance_throttler_impl.cc b/content/renderer/pepper/plugin_instance_throttler_impl.cc |
index 00eecbb80dc94f9a8ba0b3b53f54bb5d2b5f3471..2b836ccb1085da79624443dd8a7b7106addeecec 100644 |
--- a/content/renderer/pepper/plugin_instance_throttler_impl.cc |
+++ b/content/renderer/pepper/plugin_instance_throttler_impl.cc |
@@ -15,10 +15,12 @@ |
#include "ppapi/shared_impl/ppapi_constants.h" |
#include "third_party/WebKit/public/platform/WebRect.h" |
#include "third_party/WebKit/public/web/WebInputEvent.h" |
+#include "third_party/WebKit/public/web/WebLocalFrame.h" |
#include "third_party/WebKit/public/web/WebPluginContainer.h" |
#include "third_party/WebKit/public/web/WebPluginParams.h" |
+#include "third_party/WebKit/public/web/WebView.h" |
#include "ui/gfx/color_utils.h" |
-#include "url/gurl.h" |
+#include "url/origin.h" |
namespace content { |
@@ -158,7 +160,7 @@ void PluginInstanceThrottlerImpl::SetWebPlugin( |
void PluginInstanceThrottlerImpl::Initialize( |
RenderFrameImpl* frame, |
- const GURL& content_origin, |
+ const url::Origin& content_origin, |
const std::string& plugin_module_name, |
const gfx::Size& unobscured_size) { |
DCHECK(unobscured_size_.IsEmpty()); |
@@ -170,8 +172,8 @@ void PluginInstanceThrottlerImpl::Initialize( |
bool cross_origin_main_content = false; |
float zoom_factor = GetWebPlugin()->container()->pageZoomFactor(); |
if (!helper->ShouldThrottleContent( |
- content_origin, plugin_module_name, |
- roundf(unobscured_size.width() / zoom_factor), |
+ frame->GetWebFrame()->top()->securityOrigin(), content_origin, |
+ plugin_module_name, roundf(unobscured_size.width() / zoom_factor), |
roundf(unobscured_size.height() / zoom_factor), |
&cross_origin_main_content)) { |
DCHECK_NE(THROTTLER_STATE_MARKED_ESSENTIAL, state_); |