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

Side by Side Diff: ash/wm/dialog_frame_view.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: Rebased 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
« no previous file with comments | « ash/system/tray_update.cc ('k') | ash/wm/frame_painter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/dialog_frame_view.h" 5 #include "ash/wm/dialog_frame_view.h"
6 6
7 #include "grit/ui_resources_standard.h" 7 #include "grit/ui_resources_standard.h"
8 #include "ui/base/hit_test.h" 8 #include "ui/base/hit_test.h"
9 #include "ui/base/resource/resource_bundle.h" 9 #include "ui/base/resource/resource_bundle.h"
10 #include "ui/gfx/canvas.h" 10 #include "ui/gfx/canvas.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 //////////////////////////////////////////////////////////////////////////////// 65 ////////////////////////////////////////////////////////////////////////////////
66 // DialogFrameView, public: 66 // DialogFrameView, public:
67 67
68 DialogFrameView::DialogFrameView() { 68 DialogFrameView::DialogFrameView() {
69 set_background(views::Background::CreateSolidBackground( 69 set_background(views::Background::CreateSolidBackground(
70 kDialogBackgroundColor)); 70 kDialogBackgroundColor));
71 71
72 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 72 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
73 close_button_ = new views::ImageButton(this); 73 close_button_ = new views::ImageButton(this);
74 close_button_->SetImage(views::CustomButton::BS_NORMAL, 74 close_button_->SetImage(views::CustomButton::BS_NORMAL,
75 rb.GetImageNamed(IDR_CLOSE_BAR).ToSkBitmap()); 75 rb.GetImageNamed(IDR_CLOSE_BAR).ToImageSkia());
76 close_button_->SetImage(views::CustomButton::BS_HOT, 76 close_button_->SetImage(views::CustomButton::BS_HOT,
77 rb.GetImageNamed(IDR_CLOSE_BAR_H).ToSkBitmap()); 77 rb.GetImageNamed(IDR_CLOSE_BAR_H).ToImageSkia());
78 close_button_->SetImage(views::CustomButton::BS_PUSHED, 78 close_button_->SetImage(views::CustomButton::BS_PUSHED,
79 rb.GetImageNamed(IDR_CLOSE_BAR_P).ToSkBitmap()); 79 rb.GetImageNamed(IDR_CLOSE_BAR_P).ToImageSkia());
80 close_button_->SetImageAlignment(views::ImageButton::ALIGN_CENTER, 80 close_button_->SetImageAlignment(views::ImageButton::ALIGN_CENTER,
81 views::ImageButton::ALIGN_MIDDLE); 81 views::ImageButton::ALIGN_MIDDLE);
82 AddChildView(close_button_); 82 AddChildView(close_button_);
83 } 83 }
84 84
85 DialogFrameView::~DialogFrameView() { 85 DialogFrameView::~DialogFrameView() {
86 } 86 }
87 87
88 //////////////////////////////////////////////////////////////////////////////// 88 ////////////////////////////////////////////////////////////////////////////////
89 // DialogFrameView, views::NonClientFrameView: 89 // DialogFrameView, views::NonClientFrameView:
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 GetTitleFont().GetHeight() + GetTitleFont().GetFontSize() - 186 GetTitleFont().GetHeight() + GetTitleFont().GetFontSize() -
187 kDialogTopPaddingNudge, 187 kDialogTopPaddingNudge,
188 -kDialogHPaddingNudge, 188 -kDialogHPaddingNudge,
189 -kDialogBottomPaddingNudge, 189 -kDialogBottomPaddingNudge,
190 -kDialogHPaddingNudge); 190 -kDialogHPaddingNudge);
191 return insets; 191 return insets;
192 } 192 }
193 193
194 } // namespace internal 194 } // namespace internal
195 } // namespace views 195 } // namespace views
OLDNEW
« no previous file with comments | « ash/system/tray_update.cc ('k') | ash/wm/frame_painter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698