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

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

Issue 2480813003: Reduce views::Border creation verbosity by promoting factory functions (Closed)
Patch Set: fix bad merge Created 4 years, 1 month 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.h" 5 #include "chrome/browser/ui/views/download/download_item_view.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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 disabled_while_opening_(false), 187 disabled_while_opening_(false),
188 creation_time_(base::Time::Now()), 188 creation_time_(base::Time::Now()),
189 time_download_warning_shown_(base::Time()), 189 time_download_warning_shown_(base::Time()),
190 weak_ptr_factory_(this) { 190 weak_ptr_factory_(this) {
191 SetInkDropMode(InkDropMode::ON); 191 SetInkDropMode(InkDropMode::ON);
192 DCHECK(download()); 192 DCHECK(download());
193 download()->AddObserver(this); 193 download()->AddObserver(this);
194 set_context_menu_controller(this); 194 set_context_menu_controller(this);
195 195
196 dropdown_button_->SetBorder( 196 dropdown_button_->SetBorder(
197 views::Border::CreateEmptyBorder(gfx::Insets(kDropdownBorderWidth))); 197 views::CreateEmptyBorder(gfx::Insets(kDropdownBorderWidth)));
198 dropdown_button_->set_ink_drop_size(gfx::Size(32, 32)); 198 dropdown_button_->set_ink_drop_size(gfx::Size(32, 32));
199 AddChildView(dropdown_button_); 199 AddChildView(dropdown_button_);
200 200
201 LoadIcon(); 201 LoadIcon();
202 202
203 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 203 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
204 font_list_ = 204 font_list_ =
205 rb.GetFontList(ui::ResourceBundle::BaseFont).DeriveWithSizeDelta(1); 205 rb.GetFontList(ui::ResourceBundle::BaseFont).DeriveWithSizeDelta(1);
206 status_font_list_ = 206 status_font_list_ =
207 rb.GetFontList(ui::ResourceBundle::BaseFont).DeriveWithSizeDelta(-2); 207 rb.GetFontList(ui::ResourceBundle::BaseFont).DeriveWithSizeDelta(-2);
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after
1104 SchedulePaint(); 1104 SchedulePaint();
1105 } 1105 }
1106 1106
1107 SkColor DownloadItemView::GetTextColor() const { 1107 SkColor DownloadItemView::GetTextColor() const {
1108 return GetTextColorForThemeProvider(GetThemeProvider()); 1108 return GetTextColorForThemeProvider(GetThemeProvider());
1109 } 1109 }
1110 1110
1111 SkColor DownloadItemView::GetDimmedTextColor() const { 1111 SkColor DownloadItemView::GetDimmedTextColor() const {
1112 return SkColorSetA(GetTextColor(), 0xC7); 1112 return SkColorSetA(GetTextColor(), 0xC7);
1113 } 1113 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698