diff options
author | raymes <raymes@chromium.org> | 2015-02-08 18:36:13 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-09 02:36:36 +0000 |
commit | 8a9c0f30c6a73cc644da0a1a736f6bb0e6fd81b5 (patch) | |
tree | c17e6f8eb2fb851191f1d2e1180565170a183b50 /pdf/instance.cc | |
parent | 8533a5153222d72c6f5485581663db13f285bfaf (diff) | |
download | chromium_src-8a9c0f30c6a73cc644da0a1a736f6bb0e6fd81b5.zip chromium_src-8a9c0f30c6a73cc644da0a1a736f6bb0e6fd81b5.tar.gz chromium_src-8a9c0f30c6a73cc644da0a1a736f6bb0e6fd81b5.tar.bz2 |
Make the PDF viewer background color a property of the instance.
This simplifies how the background color is set and makes it work for
print preview.
BUG= 456621
Review URL: https://codereview.chromium.org/874663006
Cr-Commit-Position: refs/heads/master@{#315256}
Diffstat (limited to 'pdf/instance.cc')
-rw-r--r-- | pdf/instance.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pdf/instance.cc b/pdf/instance.cc index d348717..93daf6f 100644 --- a/pdf/instance.cc +++ b/pdf/instance.cc @@ -367,8 +367,6 @@ bool Instance::Init(uint32_t argc, const char* argn[], const char* argv[]) { CreatePageIndicator(IsPrintPreviewUrl(url)); - engine_->SetBackgroundColor(kBackgroundColor); - if (!full_) { // For PDFs embedded in a frame, we don't get the data automatically like we // do for full-frame loads. Start loading the data manually. @@ -2643,6 +2641,10 @@ bool Instance::IsPrintPreview() { return IsPrintPreviewUrl(url_); } +uint32 Instance::GetBackgroundColor() { + return kBackgroundColor; +} + int Instance::GetPageNumberToDisplay() { int page = engine_->GetMostVisiblePage(); if (IsPrintPreview() && !print_preview_page_numbers_.empty()) { |