Chromium Code Reviews| Index: ash/display/multi_display_manager.cc | 
| diff --git a/ash/display/multi_display_manager.cc b/ash/display/multi_display_manager.cc | 
| index aba85f02e5af38321ebd2485eeec50d0a70b6d03..ef71b50d261a3b56243621cc3f8aee82dd93f160 100644 | 
| --- a/ash/display/multi_display_manager.cc | 
| +++ b/ash/display/multi_display_manager.cc | 
| @@ -148,6 +148,22 @@ const gfx::Display& MultiDisplayManager::FindDisplayContainingPoint( | 
| void MultiDisplayManager::SetOverscanInsets(int64 display_id, | 
| const gfx::Insets& insets_in_dip) { | 
| + std::map<int64, gfx::Insets>::const_iterator old_overscan = | 
| + overscan_mapping_.find(display_id); | 
| + if (old_overscan != overscan_mapping_.end()) { | 
| + gfx::Insets old_insets = old_overscan->second; | 
| + for (DisplayList::iterator iter = displays_.begin(); | 
| 
 
oshima
2012/10/16 23:54:17
FindDisplayForId
 
Jun Mukai
2012/10/17 00:07:49
Thanks.  But as far as I see, it returns a const r
 
oshima
2012/10/17 01:09:40
FindDisplayId returns non const reference. GetDisp
 
Jun Mukai
2012/10/17 15:45:46
Done.
 
 | 
| + iter != displays_.end(); ++iter) { | 
| + if (iter->id() == display_id) { | 
| + // Reimburse the existing insets before applying the new insets. | 
| + gfx::Rect bounds = iter->bounds_in_pixel(); | 
| + gfx::Insets negated_insets = old_insets.Scale(-1); | 
| + bounds.Inset(negated_insets.Scale(iter->device_scale_factor())); | 
| 
 
oshima
2012/10/16 23:54:17
Scale(- iter->device_scale_factor()); (or -1 *)
 
Jun Mukai
2012/10/17 00:07:49
Done.
 
 | 
| + iter->SetScaleAndBounds(iter->device_scale_factor(), bounds); | 
| + break; | 
| + } | 
| + } | 
| + } | 
| overscan_mapping_[display_id] = insets_in_dip; | 
| OnNativeDisplaysChanged(displays_); | 
| } |