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 "ash/wm/frame_painter.h" | 5 #include "ash/wm/frame_painter.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/shell_window_ids.h" | 8 #include "ash/shell_window_ids.h" |
9 #include "ash/wm/window_util.h" | 9 #include "ash/wm/window_util.h" |
10 #include "base/logging.h" // DCHECK | 10 #include "base/logging.h" // DCHECK |
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
562 | 562 |
563 /////////////////////////////////////////////////////////////////////////////// | 563 /////////////////////////////////////////////////////////////////////////////// |
564 // FramePainter, private: | 564 // FramePainter, private: |
565 | 565 |
566 void FramePainter::SetButtonImages(views::ImageButton* button, | 566 void FramePainter::SetButtonImages(views::ImageButton* button, |
567 int normal_bitmap_id, | 567 int normal_bitmap_id, |
568 int hot_bitmap_id, | 568 int hot_bitmap_id, |
569 int pushed_bitmap_id) { | 569 int pushed_bitmap_id) { |
570 ui::ThemeProvider* theme_provider = frame_->GetThemeProvider(); | 570 ui::ThemeProvider* theme_provider = frame_->GetThemeProvider(); |
571 button->SetImage(views::CustomButton::BS_NORMAL, | 571 button->SetImage(views::CustomButton::BS_NORMAL, |
572 theme_provider->GetBitmapNamed(normal_bitmap_id)); | 572 theme_provider->GetImageSkiaNamed(normal_bitmap_id)); |
573 button->SetImage(views::CustomButton::BS_HOT, | 573 button->SetImage(views::CustomButton::BS_HOT, |
574 theme_provider->GetBitmapNamed(hot_bitmap_id)); | 574 theme_provider->GetImageSkiaNamed(hot_bitmap_id)); |
575 button->SetImage(views::CustomButton::BS_PUSHED, | 575 button->SetImage(views::CustomButton::BS_PUSHED, |
576 theme_provider->GetBitmapNamed(pushed_bitmap_id)); | 576 theme_provider->GetImageSkiaNamed(pushed_bitmap_id)); |
577 } | 577 } |
578 | 578 |
579 int FramePainter::GetTitleOffsetX() const { | 579 int FramePainter::GetTitleOffsetX() const { |
580 return window_icon_ ? | 580 return window_icon_ ? |
581 window_icon_->bounds().right() + kTitleIconOffsetX : | 581 window_icon_->bounds().right() + kTitleIconOffsetX : |
582 kTitleNoIconOffsetX; | 582 kTitleNoIconOffsetX; |
583 } | 583 } |
584 | 584 |
585 int FramePainter::GetHeaderOpacity(HeaderMode header_mode, | 585 int FramePainter::GetHeaderOpacity(HeaderMode header_mode, |
586 int theme_frame_id, | 586 int theme_frame_id, |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
621 for (std::set<FramePainter*>::const_iterator it = instances_->begin(); | 621 for (std::set<FramePainter*>::const_iterator it = instances_->begin(); |
622 it != instances_->end(); | 622 it != instances_->end(); |
623 ++it) { | 623 ++it) { |
624 FramePainter* painter = *it; | 624 FramePainter* painter = *it; |
625 if (IsVisibleNormalWindow(painter->window_)) | 625 if (IsVisibleNormalWindow(painter->window_)) |
626 painter->frame_->non_client_view()->SchedulePaint(); | 626 painter->frame_->non_client_view()->SchedulePaint(); |
627 } | 627 } |
628 } | 628 } |
629 | 629 |
630 } // namespace ash | 630 } // namespace ash |
OLD | NEW |