OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/ui/views/frame/app_panel_browser_frame_view.h" | 5 #include "chrome/browser/ui/views/frame/app_panel_browser_frame_view.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/browser/ui/views/frame/browser_frame.h" | 9 #include "chrome/browser/ui/views/frame/browser_frame.h" |
10 #include "chrome/browser/ui/views/frame/browser_view.h" | 10 #include "chrome/browser/ui/views/frame/browser_view.h" |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 window_mask->lineTo(SkIntToScalar(size.width() - 1), 1); | 183 window_mask->lineTo(SkIntToScalar(size.width() - 1), 1); |
184 window_mask->lineTo(SkIntToScalar(size.width() - 1), 2); | 184 window_mask->lineTo(SkIntToScalar(size.width() - 1), 2); |
185 window_mask->lineTo(SkIntToScalar(size.width()), 3); | 185 window_mask->lineTo(SkIntToScalar(size.width()), 3); |
186 | 186 |
187 window_mask->lineTo(SkIntToScalar(size.width()), | 187 window_mask->lineTo(SkIntToScalar(size.width()), |
188 SkIntToScalar(size.height())); | 188 SkIntToScalar(size.height())); |
189 window_mask->lineTo(0, SkIntToScalar(size.height())); | 189 window_mask->lineTo(0, SkIntToScalar(size.height())); |
190 window_mask->close(); | 190 window_mask->close(); |
191 } | 191 } |
192 | 192 |
193 void AppPanelBrowserFrameView::EnableClose(bool enable) { | |
194 close_button_->SetEnabled(enable); | |
195 } | |
196 | |
197 void AppPanelBrowserFrameView::ResetWindowControls() { | 193 void AppPanelBrowserFrameView::ResetWindowControls() { |
198 // The close button isn't affected by this constraint. | 194 // The close button isn't affected by this constraint. |
199 } | 195 } |
200 | 196 |
201 void AppPanelBrowserFrameView::UpdateWindowIcon() { | 197 void AppPanelBrowserFrameView::UpdateWindowIcon() { |
202 window_icon_->SchedulePaint(); | 198 window_icon_->SchedulePaint(); |
203 } | 199 } |
204 | 200 |
205 | 201 |
206 /////////////////////////////////////////////////////////////////////////////// | 202 /////////////////////////////////////////////////////////////////////////////// |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
500 } | 496 } |
501 | 497 |
502 gfx::Rect AppPanelBrowserFrameView::CalculateClientAreaBounds(int width, | 498 gfx::Rect AppPanelBrowserFrameView::CalculateClientAreaBounds(int width, |
503 int height) const { | 499 int height) const { |
504 int top_height = NonClientTopBorderHeight(); | 500 int top_height = NonClientTopBorderHeight(); |
505 int border_thickness = NonClientBorderThickness(); | 501 int border_thickness = NonClientBorderThickness(); |
506 return gfx::Rect(border_thickness, top_height, | 502 return gfx::Rect(border_thickness, top_height, |
507 std::max(0, width - (2 * border_thickness)), | 503 std::max(0, width - (2 * border_thickness)), |
508 std::max(0, height - top_height - border_thickness)); | 504 std::max(0, height - top_height - border_thickness)); |
509 } | 505 } |
OLD | NEW |