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

Unified Diff: chrome/browser/plugins/flash_permission_context.cc

Issue 2390193002: Automatically refresh the page when the flash permission prompt is allowed (Closed)
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/plugins/flash_permission_context.cc
diff --git a/chrome/browser/plugins/flash_permission_context.cc b/chrome/browser/plugins/flash_permission_context.cc
index 941edbb2d2b36710139fbb330bb3b6594ad963c0..633f159cd8ab239287ea3efb198991f72d1ef877 100644
--- a/chrome/browser/plugins/flash_permission_context.cc
+++ b/chrome/browser/plugins/flash_permission_context.cc
@@ -5,13 +5,13 @@
#include "chrome/browser/plugins/flash_permission_context.h"
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
-#include "chrome/browser/infobars/infobar_service.h"
#include "chrome/browser/permissions/permission_request_id.h"
#include "chrome/browser/plugins/plugin_utils.h"
#include "chrome/browser/plugins/plugins_field_trial.h"
-#include "chrome/browser/ui/website_settings/website_settings_infobar_delegate.h"
#include "components/content_settings/core/browser/host_content_settings_map.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/render_frame_host.h"
+#include "content/public/browser/web_contents.h"
FlashPermissionContext::FlashPermissionContext(Profile* profile)
: PermissionContextBase(profile,
@@ -38,14 +38,12 @@ void FlashPermissionContext::UpdateTabContext(const PermissionRequestID& id,
bool allowed) {
if (!allowed)
return;
+ // Automatically refresh the page.
content::WebContents* web_contents =
content::WebContents::FromRenderFrameHost(
content::RenderFrameHost::FromID(id.render_process_id(),
id.render_frame_id()));
- InfoBarService* infobar_service =
- InfoBarService::FromWebContents(web_contents);
- if (infobar_service)
- WebsiteSettingsInfoBarDelegate::Create(infobar_service);
+ web_contents->GetController().Reload(true /* check_for_repost */);
}
bool FlashPermissionContext::IsRestrictedToSecureOrigins() const {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698