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

Unified Diff: ash/display/display_manager.cc

Issue 2335963002: Refactor: remove SetDisplayWorkAreaInsets calls. (Closed)
Patch Set: Created 4 years, 3 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: ash/display/display_manager.cc
diff --git a/ash/display/display_manager.cc b/ash/display/display_manager.cc
index 1bc2c479befce37f27d6a9f0d2bb3fc177e126f8..0b01abd27313677355625dcef53d84c00d380424 100644
--- a/ash/display/display_manager.cc
+++ b/ash/display/display_manager.cc
@@ -289,7 +289,12 @@ bool DisplayManager::UpdateWorkAreaOfDisplay(int64_t display_id,
DCHECK(display);
gfx::Rect old_work_area = display->work_area();
display->UpdateWorkAreaFromInsets(insets);
- return old_work_area != display->work_area();
+ bool workarea_changed = old_work_area != display->work_area();
+ if (workarea_changed) {
+ screen_->NotifyMetricsChanged(
+ *display, display::DisplayObserver::DISPLAY_METRIC_WORK_AREA);
+ }
+ return workarea_changed;
}
void DisplayManager::SetOverscanInsets(int64_t display_id,
« no previous file with comments | « ash/common/system/web_notification/ash_popup_alignment_delegate.cc ('k') | ash/display/display_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698