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

Side by Side Diff: chrome/browser/ui/views/download/download_shelf_view.cc

Issue 2313253003: Rename views::MdTextButton::CreateMdButton to just Create (Closed)
Patch Set: more renames Created 4 years, 3 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
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/download/download_shelf_view.h" 5 #include "chrome/browser/ui/views/download/download_shelf_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 show_all_view_ = show_all_view; 161 show_all_view_ = show_all_view;
162 162
163 close_button_ = new views::ImageButton(this); 163 close_button_ = new views::ImageButton(this);
164 close_button_->SetImage(views::CustomButton::STATE_NORMAL, 164 close_button_->SetImage(views::CustomButton::STATE_NORMAL,
165 rb.GetImageSkiaNamed(IDR_CLOSE_1)); 165 rb.GetImageSkiaNamed(IDR_CLOSE_1));
166 close_button_->SetImage(views::CustomButton::STATE_HOVERED, 166 close_button_->SetImage(views::CustomButton::STATE_HOVERED,
167 rb.GetImageSkiaNamed(IDR_CLOSE_1_H)); 167 rb.GetImageSkiaNamed(IDR_CLOSE_1_H));
168 close_button_->SetImage(views::CustomButton::STATE_PRESSED, 168 close_button_->SetImage(views::CustomButton::STATE_PRESSED,
169 rb.GetImageSkiaNamed(IDR_CLOSE_1_P)); 169 rb.GetImageSkiaNamed(IDR_CLOSE_1_P));
170 } else { 170 } else {
171 show_all_view_md_ = views::MdTextButton::CreateMdButton( 171 show_all_view_md_ = views::MdTextButton::Create(
172 this, l10n_util::GetStringUTF16(IDS_SHOW_ALL_DOWNLOADS_MD)); 172 this, l10n_util::GetStringUTF16(IDS_SHOW_ALL_DOWNLOADS_MD));
173 show_all_view_ = show_all_view_md_; 173 show_all_view_ = show_all_view_md_;
174 174
175 BarControlButton* close_button = new BarControlButton(this); 175 BarControlButton* close_button = new BarControlButton(this);
176 close_button->SetIcon(gfx::VectorIconId::BAR_CLOSE, 176 close_button->SetIcon(gfx::VectorIconId::BAR_CLOSE,
177 base::Bind(&DownloadShelfView::GetTextColorForIconMd, 177 base::Bind(&DownloadShelfView::GetTextColorForIconMd,
178 base::Unretained(this))); 178 base::Unretained(this)));
179 close_button_ = close_button; 179 close_button_ = close_button;
180 } 180 }
181 close_button_->SetAccessibleName( 181 close_button_->SetAccessibleName(
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 492
493 content::DownloadItem* DownloadShelfView::GetDownloadItemForView(size_t i) { 493 content::DownloadItem* DownloadShelfView::GetDownloadItemForView(size_t i) {
494 if (ui::MaterialDesignController::IsModeMaterial()) 494 if (ui::MaterialDesignController::IsModeMaterial())
495 return static_cast<DownloadItemViewMd*>(download_views_[i])->download(); 495 return static_cast<DownloadItemViewMd*>(download_views_[i])->download();
496 return static_cast<DownloadItemView*>(download_views_[i])->download(); 496 return static_cast<DownloadItemView*>(download_views_[i])->download();
497 } 497 }
498 498
499 SkColor DownloadShelfView::GetTextColorForIconMd() { 499 SkColor DownloadShelfView::GetTextColorForIconMd() {
500 return DownloadItemViewMd::GetTextColorForThemeProvider(GetThemeProvider()); 500 return DownloadItemViewMd::GetTextColorForThemeProvider(GetThemeProvider());
501 } 501 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/download/download_item_view_md.cc ('k') | chrome/browser/ui/views/infobars/confirm_infobar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698