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

Side by Side Diff: ash/wm/custom_frame_view_ash.cc

Issue 9956063: Merge 130064 - Changes the maximize button to only minimize for panels. This resulted (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1084/src/
Patch Set: Created 8 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/ash_strings.grd ('k') | ash/wm/frame_painter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/wm/custom_frame_view_ash.h" 5 #include "ash/wm/custom_frame_view_ash.h"
6 6
7 #include "ash/wm/frame_painter.h" 7 #include "ash/wm/frame_painter.h"
8 #include "ash/wm/workspace/frame_maximize_button.h" 8 #include "ash/wm/workspace/frame_maximize_button.h"
9 #include "grit/ui_resources.h" 9 #include "grit/ui_resources.h"
10 #include "grit/ui_strings.h" // Accessibility names 10 #include "grit/ui_strings.h" // Accessibility names
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 l10n_util::GetStringUTF16(IDS_APP_ACCNAME_CLOSE)); 60 l10n_util::GetStringUTF16(IDS_APP_ACCNAME_CLOSE));
61 AddChildView(close_button_); 61 AddChildView(close_button_);
62 62
63 maximize_button_->SetVisible(frame_->widget_delegate()->CanMaximize()); 63 maximize_button_->SetVisible(frame_->widget_delegate()->CanMaximize());
64 64
65 if (frame_->widget_delegate()->ShouldShowWindowIcon()) { 65 if (frame_->widget_delegate()->ShouldShowWindowIcon()) {
66 window_icon_ = new views::ImageButton(this); 66 window_icon_ = new views::ImageButton(this);
67 AddChildView(window_icon_); 67 AddChildView(window_icon_);
68 } 68 }
69 69
70 frame_painter_->Init(frame_, window_icon_, maximize_button_, close_button_); 70 frame_painter_->Init(frame_, window_icon_, maximize_button_, close_button_,
71 FramePainter::SIZE_BUTTON_MAXIMIZES);
71 } 72 }
72 73
73 //////////////////////////////////////////////////////////////////////////////// 74 ////////////////////////////////////////////////////////////////////////////////
74 // CustomFrameViewAsh, views::NonClientFrameView overrides: 75 // CustomFrameViewAsh, views::NonClientFrameView overrides:
75 gfx::Rect CustomFrameViewAsh::GetBoundsForClientView() const { 76 gfx::Rect CustomFrameViewAsh::GetBoundsForClientView() const {
76 int top_height = NonClientTopBorderHeight(); 77 int top_height = NonClientTopBorderHeight();
77 return frame_painter_->GetBoundsForClientView(top_height, 78 return frame_painter_->GetBoundsForClientView(top_height,
78 bounds()); 79 bounds());
79 } 80 }
80 81
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 // CustomFrameViewAsh, private: 164 // CustomFrameViewAsh, private:
164 165
165 int CustomFrameViewAsh::NonClientTopBorderHeight() const { 166 int CustomFrameViewAsh::NonClientTopBorderHeight() const {
166 // Reserve enough space to see the buttons, including any offset from top and 167 // Reserve enough space to see the buttons, including any offset from top and
167 // reserving space for the separator line. 168 // reserving space for the separator line.
168 return close_button_->bounds().bottom() + 169 return close_button_->bounds().bottom() +
169 frame_painter_->HeaderContentSeparatorSize(); 170 frame_painter_->HeaderContentSeparatorSize();
170 } 171 }
171 172
172 } // namespace ash 173 } // namespace ash
OLDNEW
« no previous file with comments | « ash/ash_strings.grd ('k') | ash/wm/frame_painter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698