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

Side by Side Diff: content/browser/plugin_content_origin_whitelist.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/browser/plugin_content_origin_whitelist.h ('k') | content/common/frame_messages.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/browser/plugin_content_origin_whitelist.h" 5 #include "content/browser/plugin_content_origin_whitelist.h"
6 6
7 #include "content/common/frame_messages.h" 7 #include "content/common/frame_messages.h"
8 #include "content/public/browser/navigation_details.h" 8 #include "content/public/browser/navigation_details.h"
9 #include "content/public/browser/render_frame_host.h" 9 #include "content/public/browser/render_frame_host.h"
10 #include "content/public/browser/web_contents.h" 10 #include "content/public/browser/web_contents.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 void PluginContentOriginWhitelist::DidNavigateMainFrame( 43 void PluginContentOriginWhitelist::DidNavigateMainFrame(
44 const LoadCommittedDetails& details, 44 const LoadCommittedDetails& details,
45 const FrameNavigateParams& params) { 45 const FrameNavigateParams& params) {
46 if (details.is_navigation_to_different_page()) { 46 if (details.is_navigation_to_different_page()) {
47 // We expect RenderFrames to clear their replicated whitelist independently. 47 // We expect RenderFrames to clear their replicated whitelist independently.
48 whitelist_.clear(); 48 whitelist_.clear();
49 } 49 }
50 } 50 }
51 51
52 void PluginContentOriginWhitelist::OnPluginContentOriginAllowed( 52 void PluginContentOriginWhitelist::OnPluginContentOriginAllowed(
53 const GURL& content_origin) { 53 const url::Origin& content_origin) {
54 whitelist_.insert(content_origin); 54 whitelist_.insert(content_origin);
55 55
56 web_contents()->SendToAllFrames( 56 web_contents()->SendToAllFrames(
57 new FrameMsg_UpdatePluginContentOriginWhitelist( 57 new FrameMsg_UpdatePluginContentOriginWhitelist(
58 MSG_ROUTING_NONE, whitelist_)); 58 MSG_ROUTING_NONE, whitelist_));
59 } 59 }
60 60
61 } // namespace content 61 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/plugin_content_origin_whitelist.h ('k') | content/common/frame_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698