Chromium Code Reviews| Index: pdf/out_of_process_instance.cc |
| diff --git a/pdf/out_of_process_instance.cc b/pdf/out_of_process_instance.cc |
| index d6ad71adb6724a9ac7ac9a622c22e612de183aff..cf50ff9a68860aab77375513807cc861a73f8282 100644 |
| --- a/pdf/out_of_process_instance.cc |
| +++ b/pdf/out_of_process_instance.cc |
| @@ -331,6 +331,7 @@ bool OutOfProcessInstance::Init(uint32_t argc, |
| const char* stream_url = NULL; |
| const char* original_url = NULL; |
| const char* headers = NULL; |
| + const char* isMaterial = NULL; |
|
raymes
2015/01/29 05:26:32
is_material
Alexandre Carlton
2015/01/29 06:05:17
Done.
|
| for (uint32_t i = 0; i < argc; ++i) { |
| if (strcmp(argn[i], "src") == 0) |
| original_url = argv[i]; |
| @@ -338,8 +339,13 @@ bool OutOfProcessInstance::Init(uint32_t argc, |
| stream_url = argv[i]; |
| else if (strcmp(argn[i], "headers") == 0) |
| headers = argv[i]; |
| + else if (strcmp(argn[i], "is-material") == 0) |
| + isMaterial = argv[i]; |
|
raymes
2015/01/29 05:26:32
Can we just have a bool here? is_material = true
Alexandre Carlton
2015/01/29 06:05:17
Done.
|
| } |
| + if (strcmp(isMaterial, "true") == 0) |
|
raymes
2015/01/29 05:26:32
if (is_material)
Alexandre Carlton
2015/01/29 06:05:17
Done.
|
| + engine_->SetBackgroundColor(kBackgroundColorMaterial); |
| + |
| // 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 |
| // can fix the document loader properly and remove this hack. |
| @@ -662,7 +668,7 @@ void OutOfProcessInstance::OnPaint( |
| if (first_paint_) { |
| first_paint_ = false; |
| pp::Rect rect = pp::Rect(pp::Point(), image_data_.size()); |
| - FillRect(rect, kBackgroundColor); |
| + FillRect(rect, engine_->GetBackgroundColor()); |
| ready->push_back(PaintManager::ReadyRect(rect, image_data_, true)); |
| } |
| @@ -755,7 +761,7 @@ void OutOfProcessInstance::CalculateBackgroundParts() { |
| // horizontal centering. |
| BackgroundPart part = { |
| pp::Rect(0, 0, left_width, bottom), |
| - kBackgroundColor |
| + engine_->GetBackgroundColor() |
| }; |
| if (!part.location.IsEmpty()) |
| background_parts_.push_back(part); |