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

Side by Side Diff: ash/wm/frame_painter.cc

Issue 10382144: Change SetImage, SetBackground, and SetToggledImage to take in a gfx::ImageSkia (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 months 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) 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 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 551
552 /////////////////////////////////////////////////////////////////////////////// 552 ///////////////////////////////////////////////////////////////////////////////
553 // FramePainter, private: 553 // FramePainter, private:
554 554
555 void FramePainter::SetButtonImages(views::ImageButton* button, 555 void FramePainter::SetButtonImages(views::ImageButton* button,
556 int normal_bitmap_id, 556 int normal_bitmap_id,
557 int hot_bitmap_id, 557 int hot_bitmap_id,
558 int pushed_bitmap_id) { 558 int pushed_bitmap_id) {
559 ui::ThemeProvider* theme_provider = frame_->GetThemeProvider(); 559 ui::ThemeProvider* theme_provider = frame_->GetThemeProvider();
560 button->SetImage(views::CustomButton::BS_NORMAL, 560 button->SetImage(views::CustomButton::BS_NORMAL,
561 theme_provider->GetBitmapNamed(normal_bitmap_id)); 561 theme_provider->GetImageSkiaNamed(normal_bitmap_id));
562 button->SetImage(views::CustomButton::BS_HOT, 562 button->SetImage(views::CustomButton::BS_HOT,
563 theme_provider->GetBitmapNamed(hot_bitmap_id)); 563 theme_provider->GetImageSkiaNamed(hot_bitmap_id));
564 button->SetImage(views::CustomButton::BS_PUSHED, 564 button->SetImage(views::CustomButton::BS_PUSHED,
565 theme_provider->GetBitmapNamed(pushed_bitmap_id)); 565 theme_provider->GetImageSkiaNamed(pushed_bitmap_id));
566 } 566 }
567 567
568 int FramePainter::GetTitleOffsetX() const { 568 int FramePainter::GetTitleOffsetX() const {
569 return window_icon_ ? 569 return window_icon_ ?
570 window_icon_->bounds().right() + kTitleIconOffsetX : 570 window_icon_->bounds().right() + kTitleIconOffsetX :
571 kTitleNoIconOffsetX; 571 kTitleNoIconOffsetX;
572 } 572 }
573 573
574 int FramePainter::GetHeaderOpacity(HeaderMode header_mode, 574 int FramePainter::GetHeaderOpacity(HeaderMode header_mode,
575 int theme_frame_id, 575 int theme_frame_id,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 for (std::set<FramePainter*>::const_iterator it = instances_->begin(); 610 for (std::set<FramePainter*>::const_iterator it = instances_->begin();
611 it != instances_->end(); 611 it != instances_->end();
612 ++it) { 612 ++it) {
613 FramePainter* painter = *it; 613 FramePainter* painter = *it;
614 if (IsVisibleNormalWindow(painter->window_)) 614 if (IsVisibleNormalWindow(painter->window_))
615 painter->frame_->non_client_view()->SchedulePaint(); 615 painter->frame_->non_client_view()->SchedulePaint();
616 } 616 }
617 } 617 }
618 618
619 } // namespace ash 619 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698