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

Side by Side Diff: chrome/browser/ui/panels/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/panels/panel_browser_frame_view.h" 5 #include "chrome/browser/ui/panels/panel_browser_frame_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/themes/theme_service.h" 10 #include "chrome/browser/themes/theme_service.h"
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 window_mask->lineTo(SkIntToScalar(size.width() - 2), 1); 428 window_mask->lineTo(SkIntToScalar(size.width() - 2), 1);
429 window_mask->lineTo(SkIntToScalar(size.width() - 1), 1); 429 window_mask->lineTo(SkIntToScalar(size.width() - 1), 1);
430 window_mask->lineTo(SkIntToScalar(size.width() - 1), 2); 430 window_mask->lineTo(SkIntToScalar(size.width() - 1), 2);
431 window_mask->lineTo(SkIntToScalar(size.width() - 1), 3); 431 window_mask->lineTo(SkIntToScalar(size.width() - 1), 3);
432 window_mask->lineTo(SkIntToScalar(size.width()), 432 window_mask->lineTo(SkIntToScalar(size.width()),
433 SkIntToScalar(size.height())); 433 SkIntToScalar(size.height()));
434 window_mask->lineTo(0, SkIntToScalar(size.height())); 434 window_mask->lineTo(0, SkIntToScalar(size.height()));
435 window_mask->close(); 435 window_mask->close();
436 } 436 }
437 437
438 void PanelBrowserFrameView::EnableClose(bool enable) {
439 close_button_->SetEnabled(enable);
440 }
441
438 void PanelBrowserFrameView::ResetWindowControls() { 442 void PanelBrowserFrameView::ResetWindowControls() {
439 // The close button isn't affected by this constraint. 443 // The close button isn't affected by this constraint.
440 } 444 }
441 445
442 void PanelBrowserFrameView::UpdateWindowIcon() { 446 void PanelBrowserFrameView::UpdateWindowIcon() {
443 title_icon_->SchedulePaint(); 447 title_icon_->SchedulePaint();
444 } 448 }
445 449
446 void PanelBrowserFrameView::OnPaint(gfx::Canvas* canvas) { 450 void PanelBrowserFrameView::OnPaint(gfx::Canvas* canvas) {
447 // The font and color need to be updated depending on the panel's state. 451 // The font and color need to be updated depending on the panel's state.
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 867
864 settings_menu_model_.reset( 868 settings_menu_model_.reset(
865 new PanelSettingsMenuModel(panel_browser_view_->panel())); 869 new PanelSettingsMenuModel(panel_browser_view_->panel()));
866 settings_menu_adapter_.reset( 870 settings_menu_adapter_.reset(
867 new views::MenuModelAdapter(settings_menu_model_.get())); 871 new views::MenuModelAdapter(settings_menu_model_.get()));
868 settings_menu_ = new views::MenuItemView(settings_menu_adapter_.get()); 872 settings_menu_ = new views::MenuItemView(settings_menu_adapter_.get());
869 settings_menu_adapter_->BuildMenu(settings_menu_); 873 settings_menu_adapter_->BuildMenu(settings_menu_);
870 settings_menu_runner_.reset(new views::MenuRunner(settings_menu_)); 874 settings_menu_runner_.reset(new views::MenuRunner(settings_menu_));
871 return true; 875 return true;
872 } 876 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698