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

Side by Side Diff: chrome/browser/ui/views/frame/app_panel_browser_frame_view.cc

Issue 8869005: Revert EnableClose() removal and related crash fixes. I don't understand the crashes here, and th... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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
OLDNEW
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
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
193 void AppPanelBrowserFrameView::ResetWindowControls() { 197 void AppPanelBrowserFrameView::ResetWindowControls() {
194 // The close button isn't affected by this constraint. 198 // The close button isn't affected by this constraint.
195 } 199 }
196 200
197 void AppPanelBrowserFrameView::UpdateWindowIcon() { 201 void AppPanelBrowserFrameView::UpdateWindowIcon() {
198 window_icon_->SchedulePaint(); 202 window_icon_->SchedulePaint();
199 } 203 }
200 204
201 205
202 /////////////////////////////////////////////////////////////////////////////// 206 ///////////////////////////////////////////////////////////////////////////////
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 } 500 }
497 501
498 gfx::Rect AppPanelBrowserFrameView::CalculateClientAreaBounds(int width, 502 gfx::Rect AppPanelBrowserFrameView::CalculateClientAreaBounds(int width,
499 int height) const { 503 int height) const {
500 int top_height = NonClientTopBorderHeight(); 504 int top_height = NonClientTopBorderHeight();
501 int border_thickness = NonClientBorderThickness(); 505 int border_thickness = NonClientBorderThickness();
502 return gfx::Rect(border_thickness, top_height, 506 return gfx::Rect(border_thickness, top_height,
503 std::max(0, width - (2 * border_thickness)), 507 std::max(0, width - (2 * border_thickness)),
504 std::max(0, height - top_height - border_thickness)); 508 std::max(0, height - top_height - border_thickness));
505 } 509 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698