From 8a9c0f30c6a73cc644da0a1a736f6bb0e6fd81b5 Mon Sep 17 00:00:00 2001
From: raymes <raymes@chromium.org>
Date: Sun, 8 Feb 2015 18:36:13 -0800
Subject: 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}
---
 pdf/instance.cc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'pdf/instance.cc')

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()) {
-- 
cgit v1.1