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

Side by Side Diff: chrome/browser/ui/views/confirm_bubble_views.cc

Issue 11779030: Remove unused images; change confirm (spelling) bubble close button. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 | « chrome/app/theme/theme_resources.grd ('k') | no next file » | 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 "chrome/browser/ui/views/confirm_bubble_views.h" 5 #include "chrome/browser/ui/views/confirm_bubble_views.h"
6 6
7 #include "chrome/browser/ui/confirm_bubble.h" 7 #include "chrome/browser/ui/confirm_bubble.h"
8 #include "chrome/browser/ui/confirm_bubble_model.h" 8 #include "chrome/browser/ui/confirm_bubble_model.h"
9 #include "grit/theme_resources.h" 9 #include "grit/theme_resources.h"
10 #include "ui/base/resource/resource_bundle.h" 10 #include "ui/base/resource/resource_bundle.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 layout->AddView(icon_view); 78 layout->AddView(icon_view);
79 79
80 const string16 title_text = model_->GetTitle(); 80 const string16 title_text = model_->GetTitle();
81 DCHECK(!title_text.empty()); 81 DCHECK(!title_text.empty());
82 views::Label* title_label = new views::Label(title_text); 82 views::Label* title_label = new views::Label(title_text);
83 title_label->SetFont(bundle.GetFont(ui::ResourceBundle::MediumFont)); 83 title_label->SetFont(bundle.GetFont(ui::ResourceBundle::MediumFont));
84 layout->AddView(title_label); 84 layout->AddView(title_label);
85 85
86 views::ImageButton* close_button = new views::ImageButton(this); 86 views::ImageButton* close_button = new views::ImageButton(this);
87 const gfx::ImageSkia* close_image = 87 const gfx::ImageSkia* close_image =
88 bundle.GetImageNamed(IDR_INFO_BUBBLE_CLOSE).ToImageSkia(); 88 bundle.GetImageNamed(IDR_WEB_UI_CLOSE).ToImageSkia();
89 close_button->SetImage(views::CustomButton::STATE_NORMAL, close_image); 89 close_button->SetImage(views::CustomButton::STATE_NORMAL, close_image);
90 close_button->set_tag(ConfirmBubbleModel::BUTTON_NONE); 90 close_button->set_tag(ConfirmBubbleModel::BUTTON_NONE);
91 layout->AddView(close_button); 91 layout->AddView(close_button);
92 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); 92 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing);
93 93
94 // Add the message label to the second row. 94 // Add the message label to the second row.
95 cs = layout->AddColumnSet(1); 95 cs = layout->AddColumnSet(1);
96 const string16 message_text = model_->GetMessageText(); 96 const string16 message_text = model_->GetMessageText();
97 DCHECK(!message_text.empty()); 97 DCHECK(!message_text.empty());
98 views::Label* message_label = new views::Label(message_text); 98 views::Label* message_label = new views::Label(message_text);
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 155
156 void ShowConfirmBubble(gfx::NativeView view, 156 void ShowConfirmBubble(gfx::NativeView view,
157 const gfx::Point& origin, 157 const gfx::Point& origin,
158 ConfirmBubbleModel* model) { 158 ConfirmBubbleModel* model) {
159 ConfirmBubbleViews* bubble = new ConfirmBubbleViews(origin, model); 159 ConfirmBubbleViews* bubble = new ConfirmBubbleViews(origin, model);
160 views::BubbleDelegateView::CreateBubble(bubble); 160 views::BubbleDelegateView::CreateBubble(bubble);
161 bubble->Show(); 161 bubble->Show();
162 } 162 }
163 163
164 } // namespace chrome 164 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/app/theme/theme_resources.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698