diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-25 00:16:21 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-25 00:16:21 +0000 |
commit | c40d623f215385898233dddf830db11783895b64 (patch) | |
tree | 7f06b0d1661e77869e66258b72b95fe2d9e203e4 /content | |
parent | 27543452369d6a2cdcc058cb5f92910d7a47e823 (diff) | |
download | chromium_src-c40d623f215385898233dddf830db11783895b64.zip chromium_src-c40d623f215385898233dddf830db11783895b64.tar.gz chromium_src-c40d623f215385898233dddf830db11783895b64.tar.bz2 |
Cleanup: Remove src/contents dependency on PrintPreviewTabController.
BUG=76795
TEST=none
Review URL: http://codereview.chromium.org/6732016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79350 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/browser/tab_contents/tab_contents.cc | 18 | ||||
-rw-r--r-- | content/browser/tab_contents/tab_contents.h | 1 |
2 files changed, 9 insertions, 10 deletions
diff --git a/content/browser/tab_contents/tab_contents.cc b/content/browser/tab_contents/tab_contents.cc index ee3b627..7b80e6a 100644 --- a/content/browser/tab_contents/tab_contents.cc +++ b/content/browser/tab_contents/tab_contents.cc @@ -40,7 +40,6 @@ #include "chrome/browser/pdf_unsupported_feature.h" #include "chrome/browser/platform_util.h" #include "chrome/browser/plugin_observer.h" -#include "chrome/browser/printing/print_preview_tab_controller.h" #include "chrome/browser/printing/print_view_manager.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/renderer_host/web_cache_manager.h" @@ -1320,6 +1319,11 @@ void TabContents::ViewFrameSource(const GURL& url, delegate_->ViewSourceForFrame(this, url, content_state); } +void TabContents::SetContentRestrictions(int restrictions) { + content_restrictions_ = restrictions; + delegate()->ContentRestrictionsChanged(this); +} + void TabContents::OnDidStartProvisionalLoadForFrame(int64 frame_id, bool is_main_frame, const GURL& url) { @@ -1481,8 +1485,7 @@ void TabContents::OnDidFinishLoad(int64 frame_id) { } void TabContents::OnUpdateContentRestrictions(int restrictions) { - content_restrictions_ = restrictions; - delegate()->ContentRestrictionsChanged(this); + SetContentRestrictions(restrictions); } void TabContents::OnPDFHasUnsupportedFeature() { @@ -2257,14 +2260,9 @@ void TabContents::RequestMove(const gfx::Rect& new_bounds) { void TabContents::DidStartLoading() { SetIsLoading(true, NULL); - if (delegate()) { - bool is_print_preview_tab = - printing::PrintPreviewTabController::IsPrintPreviewTab(this); - if (content_restrictions_ || is_print_preview_tab) { - content_restrictions_= is_print_preview_tab ? - CONTENT_RESTRICTION_PRINT : 0; + if (delegate() && content_restrictions_) { + content_restrictions_ = 0; delegate()->ContentRestrictionsChanged(this); - } } // Notify observers about navigation. diff --git a/content/browser/tab_contents/tab_contents.h b/content/browser/tab_contents/tab_contents.h index d0eb864..255356e 100644 --- a/content/browser/tab_contents/tab_contents.h +++ b/content/browser/tab_contents/tab_contents.h @@ -699,6 +699,7 @@ class TabContents : public PageNavigator, int maximum_zoom_percent() const { return maximum_zoom_percent_; } int content_restrictions() const { return content_restrictions_; } + void SetContentRestrictions(int restrictions); safe_browsing::ClientSideDetectionHost* safebrowsing_detection_host() { return safebrowsing_detection_host_.get(); |