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

Unified Diff: chrome/browser/tab_contents/render_view_context_menu.cc

Issue 19800005: Hide knowledge of webkit::ppapi::PluginDelegate from chrome. This is part of moving ppapi implement… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 5 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
Index: chrome/browser/tab_contents/render_view_context_menu.cc
===================================================================
--- chrome/browser/tab_contents/render_view_context_menu.cc (revision 212906)
+++ chrome/browser/tab_contents/render_view_context_menu.cc (working copy)
@@ -60,6 +60,7 @@
#include "chrome/browser/ui/tab_contents/core_tab_helper.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_switches.h"
+#include "chrome/common/content_restriction.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/net/url_util.h"
#include "chrome/common/pref_names.h"
@@ -78,7 +79,6 @@
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/common/content_restriction.h"
#include "content/public/common/menu_item.h"
#include "content/public/common/ssl_status.h"
#include "content/public/common/url_utils.h"
@@ -1122,15 +1122,18 @@
return observer->IsCommandIdEnabled(id);
}
+ CoreTabHelper* core_tab_helper =
+ CoreTabHelper::FromWebContents(source_web_contents_);
+ int content_restrictions = 0;
+ if (core_tab_helper)
+ content_restrictions = core_tab_helper->content_restrictions();
if (id == IDC_PRINT &&
- (source_web_contents_->GetContentRestrictions() &
- content::CONTENT_RESTRICTION_PRINT)) {
+ (content_restrictions & CONTENT_RESTRICTION_PRINT)) {
return false;
}
if (id == IDC_SAVE_PAGE &&
- (source_web_contents_->GetContentRestrictions() &
- content::CONTENT_RESTRICTION_SAVE)) {
+ (content_restrictions & CONTENT_RESTRICTION_SAVE)) {
return false;
}

Powered by Google App Engine
This is Rietveld 408576698