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/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/ui/panels/panel.h" | 9 #include "chrome/browser/ui/panels/panel.h" |
10 #include "chrome/browser/ui/panels/panel_browser_frame_view.h" | 10 #include "chrome/browser/ui/panels/panel_browser_frame_view.h" |
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
520 } | 520 } |
521 | 521 |
522 void NativePanelTestingWin::FinishDragTitlebar() { | 522 void NativePanelTestingWin::FinishDragTitlebar() { |
523 panel_browser_view_->OnTitlebarMouseReleased(); | 523 panel_browser_view_->OnTitlebarMouseReleased(); |
524 } | 524 } |
525 | 525 |
526 bool NativePanelTestingWin::VerifyDrawingAttention() const { | 526 bool NativePanelTestingWin::VerifyDrawingAttention() const { |
527 PanelBrowserFrameView* frame_view = panel_browser_view_->GetFrameView(); | 527 PanelBrowserFrameView* frame_view = panel_browser_view_->GetFrameView(); |
528 SkColor attention_color = frame_view->GetTitleColor( | 528 SkColor attention_color = frame_view->GetTitleColor( |
529 PanelBrowserFrameView::PAINT_FOR_ATTENTION); | 529 PanelBrowserFrameView::PAINT_FOR_ATTENTION); |
530 return attention_color == frame_view->title_label_->GetColor(); | 530 return attention_color == frame_view->title_label_->enabled_color(); |
531 } | 531 } |
532 | 532 |
533 bool NativePanelTestingWin::VerifyActiveState(bool is_active) { | 533 bool NativePanelTestingWin::VerifyActiveState(bool is_active) { |
534 PanelBrowserFrameView* frame_view = panel_browser_view_->GetFrameView(); | 534 PanelBrowserFrameView* frame_view = panel_browser_view_->GetFrameView(); |
535 | 535 |
536 PanelBrowserFrameView::PaintState expected_paint_state = | 536 PanelBrowserFrameView::PaintState expected_paint_state = |
537 is_active ? PanelBrowserFrameView::PAINT_AS_ACTIVE | 537 is_active ? PanelBrowserFrameView::PAINT_AS_ACTIVE |
538 : PanelBrowserFrameView::PAINT_AS_INACTIVE; | 538 : PanelBrowserFrameView::PAINT_AS_INACTIVE; |
539 if (frame_view->paint_state_ != expected_paint_state) | 539 if (frame_view->paint_state_ != expected_paint_state) |
540 return false; | 540 return false; |
541 | 541 |
542 SkColor expected_color = frame_view->GetTitleColor(expected_paint_state); | 542 SkColor expected_color = frame_view->GetTitleColor(expected_paint_state); |
543 return expected_color == frame_view->title_label_->GetColor(); | 543 return expected_color == frame_view->title_label_->enabled_color(); |
544 } | 544 } |
545 | 545 |
546 bool NativePanelTestingWin::IsWindowSizeKnown() const { | 546 bool NativePanelTestingWin::IsWindowSizeKnown() const { |
547 return true; | 547 return true; |
548 } | 548 } |
549 | 549 |
550 bool NativePanelTestingWin::IsAnimatingBounds() const { | 550 bool NativePanelTestingWin::IsAnimatingBounds() const { |
551 return panel_browser_view_->bounds_animator_.get() && | 551 return panel_browser_view_->bounds_animator_.get() && |
552 panel_browser_view_->bounds_animator_->is_animating(); | 552 panel_browser_view_->bounds_animator_->is_animating(); |
553 } | 553 } |
OLD | NEW |