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

Side by Side Diff: chrome/browser/ui/views/frame/browser_non_client_frame_view_aura.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/browser_non_client_frame_view_aura.h" 5 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view_aura.h"
6 6
7 #include "chrome/browser/ui/views/frame/browser_frame.h" 7 #include "chrome/browser/ui/views/frame/browser_frame.h"
8 #include "chrome/browser/ui/views/frame/browser_view.h" 8 #include "chrome/browser/ui/views/frame/browser_view.h"
9 #include "grit/generated_resources.h" // Accessibility names 9 #include "grit/generated_resources.h" // Accessibility names
10 #include "grit/ui_resources.h" 10 #include "grit/ui_resources.h"
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 int BrowserNonClientFrameViewAura::NonClientHitTest(const gfx::Point& point) { 431 int BrowserNonClientFrameViewAura::NonClientHitTest(const gfx::Point& point) {
432 last_hittest_code_ = NonClientHitTestImpl(point); 432 last_hittest_code_ = NonClientHitTestImpl(point);
433 return last_hittest_code_; 433 return last_hittest_code_;
434 } 434 }
435 435
436 void BrowserNonClientFrameViewAura::GetWindowMask(const gfx::Size& size, 436 void BrowserNonClientFrameViewAura::GetWindowMask(const gfx::Size& size,
437 gfx::Path* window_mask) { 437 gfx::Path* window_mask) {
438 // Nothing. 438 // Nothing.
439 } 439 }
440 440
441 void BrowserNonClientFrameViewAura::EnableClose(bool enable) {
442 close_button_->SetEnabled(enable);
443 }
444
441 void BrowserNonClientFrameViewAura::ResetWindowControls() { 445 void BrowserNonClientFrameViewAura::ResetWindowControls() {
442 maximize_button_->SetState(views::CustomButton::BS_NORMAL); 446 maximize_button_->SetState(views::CustomButton::BS_NORMAL);
443 // The close button isn't affected by this constraint. 447 // The close button isn't affected by this constraint.
444 } 448 }
445 449
446 void BrowserNonClientFrameViewAura::UpdateWindowIcon() { 450 void BrowserNonClientFrameViewAura::UpdateWindowIcon() {
447 // TODO(jamescook): We will need this for app frames. 451 // TODO(jamescook): We will need this for app frames.
448 } 452 }
449 453
450 void BrowserNonClientFrameViewAura::ShouldPaintAsActiveChanged() { 454 void BrowserNonClientFrameViewAura::ShouldPaintAsActiveChanged() {
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 577
574 void BrowserNonClientFrameViewAura::OnWindowHoverChanged(bool hovered) { 578 void BrowserNonClientFrameViewAura::OnWindowHoverChanged(bool hovered) {
575 if (hovered) { 579 if (hovered) {
576 maximize_button_->Show(); 580 maximize_button_->Show();
577 close_button_->Show(); 581 close_button_->Show();
578 } else { 582 } else {
579 maximize_button_->Hide(); 583 maximize_button_->Hide();
580 close_button_->Hide(); 584 close_button_->Hide();
581 } 585 }
582 } 586 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698