Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(418)

Unified Diff: content/browser/renderer_host/delegated_frame_host.cc

Issue 1980163002: Use black for resize gutter in tab fullscreen mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 e103e320e66f7419de686cfe8c13eaa08899594e..0d68e86d69001a1262d98ab6a0df7bfbb84452fa 100644
--- a/content/browser/renderer_host/delegated_frame_host.cc
+++ b/content/browser/renderer_host/delegated_frame_host.cc
@@ -255,16 +255,24 @@ 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.
+ return client_->DelegatedFrameHostGetGutterColor(background_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.
@@ -280,7 +288,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();
« no previous file with comments | « content/browser/renderer_host/delegated_frame_host.h ('k') | content/browser/renderer_host/render_widget_host_view_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698