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

Side by Side Diff: chrome/browser/ui/views/download/download_item_view_md.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_item_view_md.h" 5 #include "chrome/browser/ui/views/download/download_item_view_md.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <vector> 10 #include <vector>
(...skipping 938 matching lines...) Expand 10 before | Expand all | Expand 10 after
949 // to the user, so we start a new SamplingEvent and track it. 949 // to the user, so we start a new SamplingEvent and track it.
950 std::string event_name = model_.MightBeMalicious() 950 std::string event_name = model_.MightBeMalicious()
951 ? ExperienceSamplingEvent::kMaliciousDownload 951 ? ExperienceSamplingEvent::kMaliciousDownload
952 : ExperienceSamplingEvent::kDangerousDownload; 952 : ExperienceSamplingEvent::kDangerousDownload;
953 sampling_event_.reset(new ExperienceSamplingEvent( 953 sampling_event_.reset(new ExperienceSamplingEvent(
954 event_name, download()->GetURL(), download()->GetReferrerUrl(), 954 event_name, download()->GetURL(), download()->GetReferrerUrl(),
955 download()->GetBrowserContext())); 955 download()->GetBrowserContext()));
956 956
957 dropdown_state_ = NORMAL; 957 dropdown_state_ = NORMAL;
958 if (mode_ == DANGEROUS_MODE) { 958 if (mode_ == DANGEROUS_MODE) {
959 save_button_ = views::MdTextButton::CreateMdButton( 959 save_button_ =
960 this, model_.GetWarningConfirmButtonText()); 960 views::MdTextButton::Create(this, model_.GetWarningConfirmButtonText());
961 AddChildView(save_button_); 961 AddChildView(save_button_);
962 } 962 }
963 discard_button_ = views::MdTextButton::CreateMdButton( 963 discard_button_ = views::MdTextButton::Create(
964 this, l10n_util::GetStringUTF16(IDS_DISCARD_DOWNLOAD)); 964 this, l10n_util::GetStringUTF16(IDS_DISCARD_DOWNLOAD));
965 AddChildView(discard_button_); 965 AddChildView(discard_button_);
966 966
967 base::string16 dangerous_label = 967 base::string16 dangerous_label =
968 model_.GetWarningText(font_list_, kTextWidth); 968 model_.GetWarningText(font_list_, kTextWidth);
969 dangerous_download_label_ = new views::Label(dangerous_label); 969 dangerous_download_label_ = new views::Label(dangerous_label);
970 dangerous_download_label_->SetMultiLine(true); 970 dangerous_download_label_->SetMultiLine(true);
971 dangerous_download_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); 971 dangerous_download_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
972 dangerous_download_label_->SetAutoColorReadabilityEnabled(false); 972 dangerous_download_label_->SetAutoColorReadabilityEnabled(false);
973 AddChildView(dangerous_download_label_); 973 AddChildView(dangerous_download_label_);
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
1121 SchedulePaint(); 1121 SchedulePaint();
1122 } 1122 }
1123 1123
1124 SkColor DownloadItemViewMd::GetTextColor() const { 1124 SkColor DownloadItemViewMd::GetTextColor() const {
1125 return GetTextColorForThemeProvider(GetThemeProvider()); 1125 return GetTextColorForThemeProvider(GetThemeProvider());
1126 } 1126 }
1127 1127
1128 SkColor DownloadItemViewMd::GetDimmedTextColor() const { 1128 SkColor DownloadItemViewMd::GetDimmedTextColor() const {
1129 return SkColorSetA(GetTextColor(), 0xC7); 1129 return SkColorSetA(GetTextColor(), 0xC7);
1130 } 1130 }
OLDNEW
« no previous file with comments | « ash/shell/window_type_launcher.cc ('k') | chrome/browser/ui/views/download/download_shelf_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698