Index: pdf/out_of_process_instance.cc |
diff --git a/pdf/out_of_process_instance.cc b/pdf/out_of_process_instance.cc |
index 0ccfa36b5db64281b17a92f000f21c6d206e77f7..a071ef363f66104e5c0d1483936230ec7cc6c4f4 100644 |
--- a/pdf/out_of_process_instance.cc |
+++ b/pdf/out_of_process_instance.cc |
@@ -348,10 +348,9 @@ bool OutOfProcessInstance::Init(uint32_t argc, |
} |
if (is_material) |
- engine_->SetBackgroundColor(kBackgroundColorMaterial); |
+ background_color_ = kBackgroundColorMaterial; |
else |
- engine_->SetBackgroundColor(kBackgroundColor); |
- |
+ background_color_ = kBackgroundColor; |
Sam McNally
2015/02/09 01:35:47
Initialize background_color_ to kBackgroundColor.
raymes
2015/02/09 01:45:57
Done.
|
// TODO(raymes): This is a hack to ensure that if no headers are passed in |
// then we get the right MIME type. When the in process plugin is removed we |
@@ -675,7 +674,7 @@ void OutOfProcessInstance::OnPaint( |
if (first_paint_) { |
first_paint_ = false; |
pp::Rect rect = pp::Rect(pp::Point(), image_data_.size()); |
- FillRect(rect, engine_->GetBackgroundColor()); |
+ FillRect(rect, background_color_); |
ready->push_back(PaintManager::ReadyRect(rect, image_data_, true)); |
} |
@@ -768,7 +767,7 @@ void OutOfProcessInstance::CalculateBackgroundParts() { |
// horizontal centering. |
BackgroundPart part = { |
pp::Rect(0, 0, left_width, bottom), |
- engine_->GetBackgroundColor() |
+ background_color_ |
}; |
if (!part.location.IsEmpty()) |
background_parts_.push_back(part); |
@@ -1347,6 +1346,10 @@ bool OutOfProcessInstance::IsPrintPreview() { |
return IsPrintPreviewUrl(url_); |
} |
+uint32 OutOfProcessInstance::GetBackgroundColor() { |
+ return background_color_; |
+} |
+ |
void OutOfProcessInstance::ProcessPreviewPageInfo(const std::string& url, |
int dst_page_index) { |
if (!IsPrintPreview()) |