Chromium Code Reviews| Index: content/browser/renderer_host/delegated_frame_host.cc |
| diff --git a/content/browser/renderer_host/delegated_frame_host.cc b/content/browser/renderer_host/delegated_frame_host.cc |
| index cef537d39b0e64fd7b7137667b296338eaa1b043..109c4a0ca59f183a1c14ec4f123687d65f47177c 100644 |
| --- a/content/browser/renderer_host/delegated_frame_host.cc |
| +++ b/content/browser/renderer_host/delegated_frame_host.cc |
| @@ -256,16 +256,26 @@ void DelegatedFrameHost::WasResized() { |
| UpdateGutters(); |
| } |
| +SkColor DelegatedFrameHost::GetGutterColor() const { |
| + // In fullscreen mode resizing is uncommon, so it makes more sense to |
| + // make the initial switch to fullscreen mode look better by using black as |
| + // the gutter color. |
| + SkColor color = background_color_; |
| + client_->DelegatedFrameHostOverrideGutterColor(&color); |
|
danakj
2016/04/25 22:17:58
nit: i think maybe passing the color and returning
|
| + return color; |
| +} |
| + |
| void DelegatedFrameHost::UpdateGutters() { |
| if (surface_id_.is_null()) { |
| right_gutter_.reset(); |
| bottom_gutter_.reset(); |
| return; |
| } |
| + |
| if (current_frame_size_in_dip_.width() < |
| client_->DelegatedFrameHostDesiredSizeInDIP().width()) { |
| right_gutter_.reset(new ui::Layer(ui::LAYER_SOLID_COLOR)); |
| - right_gutter_->SetColor(background_color_); |
| + right_gutter_->SetColor(GetGutterColor()); |
| int width = client_->DelegatedFrameHostDesiredSizeInDIP().width() - |
| current_frame_size_in_dip_.width(); |
| // The right gutter also includes the bottom-right corner, if necessary. |
| @@ -281,7 +291,7 @@ void DelegatedFrameHost::UpdateGutters() { |
| if (current_frame_size_in_dip_.height() < |
| client_->DelegatedFrameHostDesiredSizeInDIP().height()) { |
| bottom_gutter_.reset(new ui::Layer(ui::LAYER_SOLID_COLOR)); |
| - bottom_gutter_->SetColor(background_color_); |
| + bottom_gutter_->SetColor(GetGutterColor()); |
| int width = current_frame_size_in_dip_.width(); |
| int height = client_->DelegatedFrameHostDesiredSizeInDIP().height() - |
| current_frame_size_in_dip_.height(); |