| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_view.h" | 5 #include "chrome/browser/ui/panels/panel_browser_view.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "chrome/browser/native_window_notification_source.h" | 9 #include "chrome/browser/native_window_notification_source.h" |
| 10 #include "chrome/browser/ui/browser_window.h" | 10 #include "chrome/browser/ui/browser_window.h" |
| (...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 606 const gfx::Point& mouse_location, panel::ClickModifier modifier) OVERRIDE; | 606 const gfx::Point& mouse_location, panel::ClickModifier modifier) OVERRIDE; |
| 607 virtual void ReleaseMouseButtonTitlebar( | 607 virtual void ReleaseMouseButtonTitlebar( |
| 608 panel::ClickModifier modifier) OVERRIDE; | 608 panel::ClickModifier modifier) OVERRIDE; |
| 609 virtual void DragTitlebar(const gfx::Point& mouse_location) OVERRIDE; | 609 virtual void DragTitlebar(const gfx::Point& mouse_location) OVERRIDE; |
| 610 virtual void CancelDragTitlebar() OVERRIDE; | 610 virtual void CancelDragTitlebar() OVERRIDE; |
| 611 virtual void FinishDragTitlebar() OVERRIDE; | 611 virtual void FinishDragTitlebar() OVERRIDE; |
| 612 virtual bool VerifyDrawingAttention() const OVERRIDE; | 612 virtual bool VerifyDrawingAttention() const OVERRIDE; |
| 613 virtual bool VerifyActiveState(bool is_active) OVERRIDE; | 613 virtual bool VerifyActiveState(bool is_active) OVERRIDE; |
| 614 virtual bool IsWindowSizeKnown() const OVERRIDE; | 614 virtual bool IsWindowSizeKnown() const OVERRIDE; |
| 615 virtual bool IsAnimatingBounds() const OVERRIDE; | 615 virtual bool IsAnimatingBounds() const OVERRIDE; |
| 616 virtual bool IsButtonVisible(TitlebarButtonType button_type) const OVERRIDE; | 616 virtual bool IsButtonVisible( |
| 617 panel::TitlebarButtonType button_type) const OVERRIDE; |
| 617 | 618 |
| 618 PanelBrowserView* panel_browser_view_; | 619 PanelBrowserView* panel_browser_view_; |
| 619 }; | 620 }; |
| 620 | 621 |
| 621 // static | 622 // static |
| 622 NativePanelTesting* NativePanelTesting::Create(NativePanel* native_panel) { | 623 NativePanelTesting* NativePanelTesting::Create(NativePanel* native_panel) { |
| 623 return new NativePanelTestingWin(static_cast<PanelBrowserView*>( | 624 return new NativePanelTestingWin(static_cast<PanelBrowserView*>( |
| 624 native_panel)); | 625 native_panel)); |
| 625 } | 626 } |
| 626 | 627 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 666 | 667 |
| 667 bool NativePanelTestingWin::IsWindowSizeKnown() const { | 668 bool NativePanelTestingWin::IsWindowSizeKnown() const { |
| 668 return true; | 669 return true; |
| 669 } | 670 } |
| 670 | 671 |
| 671 bool NativePanelTestingWin::IsAnimatingBounds() const { | 672 bool NativePanelTestingWin::IsAnimatingBounds() const { |
| 672 return panel_browser_view_->IsAnimatingBounds(); | 673 return panel_browser_view_->IsAnimatingBounds(); |
| 673 } | 674 } |
| 674 | 675 |
| 675 bool NativePanelTestingWin::IsButtonVisible( | 676 bool NativePanelTestingWin::IsButtonVisible( |
| 676 TitlebarButtonType button_type) const { | 677 panel::TitlebarButtonType button_type) const { |
| 677 PanelBrowserFrameView* frame_view = panel_browser_view_->GetFrameView(); | 678 PanelBrowserFrameView* frame_view = panel_browser_view_->GetFrameView(); |
| 678 | 679 |
| 679 switch (button_type) { | 680 switch (button_type) { |
| 680 case CLOSE_BUTTON: | 681 case panel::CLOSE_BUTTON: |
| 681 return frame_view->close_button_->visible(); | 682 return frame_view->close_button_->visible(); |
| 682 case MINIMIZE_BUTTON: | 683 case panel::MINIMIZE_BUTTON: |
| 683 return frame_view->minimize_button_->visible(); | 684 return frame_view->minimize_button_->visible(); |
| 684 case RESTORE_BUTTON: | 685 case panel::RESTORE_BUTTON: |
| 685 return frame_view->restore_button_->visible(); | 686 return frame_view->restore_button_->visible(); |
| 686 default: | 687 default: |
| 687 NOTREACHED(); | 688 NOTREACHED(); |
| 688 } | 689 } |
| 689 return false; | 690 return false; |
| 690 } | 691 } |
| OLD | NEW |