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

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

Issue 11366215: Prevents windows in chromeos from resizing bigger than their maximum size. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix DesktopNativeWidgetAura Created 8 years 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/wm/custom_frame_view_ash.h ('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/ash_resources.h" 9 #include "grit/ash_resources.h"
10 #include "grit/ui_strings.h" // Accessibility names 10 #include "grit/ui_strings.h" // Accessibility names
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 } 142 }
143 143
144 std::string CustomFrameViewAsh::GetClassName() const { 144 std::string CustomFrameViewAsh::GetClassName() const {
145 return kViewClassName; 145 return kViewClassName;
146 } 146 }
147 147
148 gfx::Size CustomFrameViewAsh::GetMinimumSize() { 148 gfx::Size CustomFrameViewAsh::GetMinimumSize() {
149 return frame_painter_->GetMinimumSize(this); 149 return frame_painter_->GetMinimumSize(this);
150 } 150 }
151 151
152 gfx::Size CustomFrameViewAsh::GetMaximumSize() {
153 return frame_painter_->GetMaximumSize(this);
154 }
155
152 //////////////////////////////////////////////////////////////////////////////// 156 ////////////////////////////////////////////////////////////////////////////////
153 // views::ButtonListener overrides: 157 // views::ButtonListener overrides:
154 void CustomFrameViewAsh::ButtonPressed(views::Button* sender, 158 void CustomFrameViewAsh::ButtonPressed(views::Button* sender,
155 const ui::Event& event) { 159 const ui::Event& event) {
156 if (event.IsShiftDown()) 160 if (event.IsShiftDown())
157 ui::LayerAnimator::set_slow_animation_mode(true); 161 ui::LayerAnimator::set_slow_animation_mode(true);
158 if (sender == maximize_button_) { 162 if (sender == maximize_button_) {
159 // The maximize button may move out from under the cursor. 163 // The maximize button may move out from under the cursor.
160 ResetWindowControls(); 164 ResetWindowControls();
161 if (frame_->IsMaximized()) 165 if (frame_->IsMaximized())
(...skipping 15 matching lines...) Expand all
177 if (frame_->IsFullscreen()) 181 if (frame_->IsFullscreen())
178 return 0; 182 return 0;
179 183
180 // Reserve enough space to see the buttons, including any offset from top and 184 // Reserve enough space to see the buttons, including any offset from top and
181 // reserving space for the separator line. 185 // reserving space for the separator line.
182 return close_button_->bounds().bottom() + 186 return close_button_->bounds().bottom() +
183 frame_painter_->HeaderContentSeparatorSize(); 187 frame_painter_->HeaderContentSeparatorSize();
184 } 188 }
185 189
186 } // namespace ash 190 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/custom_frame_view_ash.h ('k') | ash/wm/frame_painter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698