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/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 Loading... |
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 | |
445 void BrowserNonClientFrameViewAura::ResetWindowControls() { | 441 void BrowserNonClientFrameViewAura::ResetWindowControls() { |
446 maximize_button_->SetState(views::CustomButton::BS_NORMAL); | 442 maximize_button_->SetState(views::CustomButton::BS_NORMAL); |
447 // The close button isn't affected by this constraint. | 443 // The close button isn't affected by this constraint. |
448 } | 444 } |
449 | 445 |
450 void BrowserNonClientFrameViewAura::UpdateWindowIcon() { | 446 void BrowserNonClientFrameViewAura::UpdateWindowIcon() { |
451 // TODO(jamescook): We will need this for app frames. | 447 // TODO(jamescook): We will need this for app frames. |
452 } | 448 } |
453 | 449 |
454 void BrowserNonClientFrameViewAura::ShouldPaintAsActiveChanged() { | 450 void BrowserNonClientFrameViewAura::ShouldPaintAsActiveChanged() { |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
577 | 573 |
578 void BrowserNonClientFrameViewAura::OnWindowHoverChanged(bool hovered) { | 574 void BrowserNonClientFrameViewAura::OnWindowHoverChanged(bool hovered) { |
579 if (hovered) { | 575 if (hovered) { |
580 maximize_button_->Show(); | 576 maximize_button_->Show(); |
581 close_button_->Show(); | 577 close_button_->Show(); |
582 } else { | 578 } else { |
583 maximize_button_->Hide(); | 579 maximize_button_->Hide(); |
584 close_button_->Hide(); | 580 close_button_->Hide(); |
585 } | 581 } |
586 } | 582 } |
OLD | NEW |