Index: chrome/browser/views/frame/opaque_browser_frame_view.cc |
=================================================================== |
--- chrome/browser/views/frame/opaque_browser_frame_view.cc (revision 53772) |
+++ chrome/browser/views/frame/opaque_browser_frame_view.cc (working copy) |
@@ -957,24 +957,28 @@ |
close_button_size.height()); |
#if defined(OS_CHROMEOS) |
- minimize_button_->SetVisible(!is_maximized); |
- restore_button_->SetVisible(!is_maximized); |
- maximize_button_->SetVisible(!is_maximized); |
+ if (is_maximized) { |
whywhat
2010/07/29 06:13:44
Do we ever have is_maximized set to false in Chrom
Dmitry Polukhin
2010/07/29 06:28:24
It looks like no but I can't be 100% sure.
|
+ minimize_button_->SetVisible(false); |
+ restore_button_->SetVisible(false); |
+ maximize_button_->SetVisible(false); |
- if (browser_view_->browser()->type() == Browser::TYPE_DEVTOOLS) |
- close_button_->SetVisible(true); |
- else |
- close_button_->SetVisible(!is_maximized); |
+ if (browser_view_->browser()->type() == Browser::TYPE_DEVTOOLS) { |
+ close_button_->SetVisible(true); |
+ minimize_button_->SetBounds(close_button_->bounds().x(), 0, 0, 0); |
+ } else { |
+ close_button_->SetVisible(false); |
+ // Set the bounds of the minimize button so that we don't have to change |
+ // other places that rely on the bounds. Put it slightly to the right |
+ // of the edge of the view, so that when we remove the spacing it lines |
+ // up with the edge. |
+ minimize_button_->SetBounds( |
+ width() - FrameBorderThickness() + kNewTabCaptionMaximizedSpacing, |
+ 0, 0, 0); |
+ } |
- if (is_maximized) { |
- // Set the bounds of the minimize button so that we don't have to change |
- // other places that rely on the bounds. Put it slightly to the right |
- // of the edge of the view, so that when we remove the spacing it lines |
- // up with the edge. |
- minimize_button_->SetBounds( |
- width() - FrameBorderThickness() + kNewTabCaptionMaximizedSpacing, 0, 0, |
- 0); |
return; |
+ } else { |
+ close_button_->SetVisible(true); |
whywhat
2010/07/29 06:13:44
Shoudn't we set the rest buttons visible here too?
Dmitry Polukhin
2010/07/29 06:28:24
No, because visibility for all other buttons will
|
} |
#endif |