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

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

Issue 1884043002: Use black for resize gutter in tab fullscreen mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 1a2bd9d697b56f570817b2d2120190accb7bbb9c..6df1b6d18122352d857c0c238591902347ec92e1 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