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

Side by Side Diff: ui/app_list/views/folder_header_view.cc

Issue 145033006: views: Make View::set_border() take a scoped_ptr<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove ClearBorder() Created 6 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "ui/app_list/views/folder_header_view.h" 5 #include "ui/app_list/views/folder_header_view.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "grit/ui_resources.h" 8 #include "grit/ui_resources.h"
9 #include "grit/ui_strings.h" 9 #include "grit/ui_strings.h"
10 #include "ui/app_list/app_list_constants.h" 10 #include "ui/app_list/app_list_constants.h"
(...skipping 19 matching lines...) Expand all
30 const int kBottomSeparatorWidth = 380; 30 const int kBottomSeparatorWidth = 380;
31 const int kBottomSeparatorHeight = 1; 31 const int kBottomSeparatorHeight = 1;
32 32
33 const SkColor kHintTextColor = SkColorSetRGB(0xA0, 0xA0, 0xA0); 33 const SkColor kHintTextColor = SkColorSetRGB(0xA0, 0xA0, 0xA0);
34 34
35 } // namespace 35 } // namespace
36 36
37 class FolderHeaderView::FolderNameView : public views::Textfield { 37 class FolderHeaderView::FolderNameView : public views::Textfield {
38 public: 38 public:
39 FolderNameView() { 39 FolderNameView() {
40 set_border(views::Border::CreateEmptyBorder(1, 1, 1, 1)); 40 SetBorder(views::Border::CreateEmptyBorder(1, 1, 1, 1));
41 const SkColor kFocusBorderColor = SkColorSetRGB(64, 128, 250); 41 const SkColor kFocusBorderColor = SkColorSetRGB(64, 128, 250);
42 SetFocusPainter(views::Painter::CreateSolidFocusPainter( 42 SetFocusPainter(views::Painter::CreateSolidFocusPainter(
43 kFocusBorderColor, 43 kFocusBorderColor,
44 gfx::Insets(0, 0, 1, 1))); 44 gfx::Insets(0, 0, 1, 1)));
45 } 45 }
46 46
47 virtual ~FolderNameView() { 47 virtual ~FolderNameView() {
48 } 48 }
49 49
50 // Overridden from views::View: 50 // Overridden from views::View:
(...skipping 15 matching lines...) Expand all
66 rb.GetImageSkiaNamed(IDR_APP_LIST_FOLDER_BACK_NORMAL)); 66 rb.GetImageSkiaNamed(IDR_APP_LIST_FOLDER_BACK_NORMAL));
67 back_button_->SetImageAlignment(views::ImageButton::ALIGN_CENTER, 67 back_button_->SetImageAlignment(views::ImageButton::ALIGN_CENTER,
68 views::ImageButton::ALIGN_MIDDLE); 68 views::ImageButton::ALIGN_MIDDLE);
69 AddChildView(back_button_); 69 AddChildView(back_button_);
70 70
71 folder_name_view_->SetFontList( 71 folder_name_view_->SetFontList(
72 rb.GetFontList(ui::ResourceBundle::MediumFont)); 72 rb.GetFontList(ui::ResourceBundle::MediumFont));
73 folder_name_view_->set_placeholder_text_color(kHintTextColor); 73 folder_name_view_->set_placeholder_text_color(kHintTextColor);
74 folder_name_view_->set_placeholder_text( 74 folder_name_view_->set_placeholder_text(
75 rb.GetLocalizedString(IDS_APP_LIST_FOLDER_NAME_PLACEHOLDER)); 75 rb.GetLocalizedString(IDS_APP_LIST_FOLDER_NAME_PLACEHOLDER));
76 folder_name_view_->set_border(NULL); 76 folder_name_view_->SetBorder(views::Border::NullBorder());
77 folder_name_view_->SetBackgroundColor(kContentsBackgroundColor); 77 folder_name_view_->SetBackgroundColor(kContentsBackgroundColor);
78 folder_name_view_->set_controller(this); 78 folder_name_view_->set_controller(this);
79 AddChildView(folder_name_view_); 79 AddChildView(folder_name_view_);
80 } 80 }
81 81
82 FolderHeaderView::~FolderHeaderView() { 82 FolderHeaderView::~FolderHeaderView() {
83 if (folder_item_) 83 if (folder_item_)
84 folder_item_->RemoveObserver(this); 84 folder_item_->RemoveObserver(this);
85 } 85 }
86 86
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 } 168 }
169 169
170 void FolderHeaderView::ItemIsInstallingChanged() { 170 void FolderHeaderView::ItemIsInstallingChanged() {
171 } 171 }
172 172
173 void FolderHeaderView::ItemPercentDownloadedChanged() { 173 void FolderHeaderView::ItemPercentDownloadedChanged() {
174 } 174 }
175 175
176 } // namespace app_list 176 } // namespace app_list
177 177
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698