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

Side by Side Diff: chrome/browser/ui/views/cookie_info_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: Rebase to ToT 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) 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/cookie_info_view.h" 5 #include "chrome/browser/ui/views/cookie_info_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/i18n/time_formatting.h" 9 #include "base/i18n/time_formatting.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
11 #include "base/strings/string16.h" 11 #include "base/strings/string16.h"
12 #include "base/strings/string_util.h" 12 #include "base/strings/string_util.h"
13 #include "base/strings/utf_string_conversions.h" 13 #include "base/strings/utf_string_conversions.h"
14 #include "chrome/browser/browsing_data/cookies_tree_model.h" 14 #include "chrome/browser/browsing_data/cookies_tree_model.h"
15 #include "grit/generated_resources.h" 15 #include "grit/generated_resources.h"
16 #include "grit/locale_settings.h" 16 #include "grit/locale_settings.h"
17 #include "net/cookies/canonical_cookie.h" 17 #include "net/cookies/canonical_cookie.h"
18 #include "net/cookies/parsed_cookie.h" 18 #include "net/cookies/parsed_cookie.h"
19 #include "third_party/skia/include/core/SkColor.h" 19 #include "third_party/skia/include/core/SkColor.h"
20 #include "ui/base/l10n/l10n_util.h" 20 #include "ui/base/l10n/l10n_util.h"
21 #include "ui/gfx/canvas.h" 21 #include "ui/gfx/canvas.h"
22 #include "ui/native_theme/native_theme.h" 22 #include "ui/native_theme/native_theme.h"
23 #include "ui/views/border.h"
23 #include "ui/views/controls/label.h" 24 #include "ui/views/controls/label.h"
24 #include "ui/views/controls/textfield/textfield.h" 25 #include "ui/views/controls/textfield/textfield.h"
25 #include "ui/views/layout/grid_layout.h" 26 #include "ui/views/layout/grid_layout.h"
26 #include "ui/views/layout/layout_constants.h" 27 #include "ui/views/layout/layout_constants.h"
27 #include "ui/views/window/dialog_delegate.h" 28 #include "ui/views/window/dialog_delegate.h"
28 29
29 namespace { 30 namespace {
30 31
31 // Adjustment to the spacing between subsequent label-field lines. 32 // Adjustment to the spacing between subsequent label-field lines.
32 const int kExtraLineHeightPadding = 3; 33 const int kExtraLineHeightPadding = 3;
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 views::Label* label, 122 views::Label* label,
122 views::Textfield* text_field) { 123 views::Textfield* text_field) {
123 layout->StartRow(0, layout_id); 124 layout->StartRow(0, layout_id);
124 layout->AddView(label); 125 layout->AddView(label);
125 layout->AddView(text_field, 2, 1, views::GridLayout::FILL, 126 layout->AddView(text_field, 2, 1, views::GridLayout::FILL,
126 views::GridLayout::CENTER); 127 views::GridLayout::CENTER);
127 layout->AddPaddingRow(0, kExtraLineHeightPadding); 128 layout->AddPaddingRow(0, kExtraLineHeightPadding);
128 129
129 // Now that the Textfield is in the view hierarchy, it can be initialized. 130 // Now that the Textfield is in the view hierarchy, it can be initialized.
130 text_field->SetReadOnly(true); 131 text_field->SetReadOnly(true);
131 text_field->set_border(NULL); 132 text_field->SetBorder(views::Border::NullBorder());
132 // Color these borderless text areas the same as the containing dialog. 133 // Color these borderless text areas the same as the containing dialog.
133 text_field->SetBackgroundColor(GetNativeTheme()->GetSystemColor( 134 text_field->SetBackgroundColor(GetNativeTheme()->GetSystemColor(
134 ui::NativeTheme::kColorId_DialogBackground)); 135 ui::NativeTheme::kColorId_DialogBackground));
135 text_field->SetTextColor(SkColorSetRGB(0x78, 0x78, 0x78)); 136 text_field->SetTextColor(SkColorSetRGB(0x78, 0x78, 0x78));
136 } 137 }
137 138
138 /////////////////////////////////////////////////////////////////////////////// 139 ///////////////////////////////////////////////////////////////////////////////
139 // CookieInfoView, private: 140 // CookieInfoView, private:
140 141
141 void CookieInfoView::Init() { 142 void CookieInfoView::Init() {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 AddLabelRow(three_column_layout_id, layout, domain_label_, 185 AddLabelRow(three_column_layout_id, layout, domain_label_,
185 domain_value_field_); 186 domain_value_field_);
186 AddLabelRow(three_column_layout_id, layout, path_label_, path_value_field_); 187 AddLabelRow(three_column_layout_id, layout, path_label_, path_value_field_);
187 AddLabelRow(three_column_layout_id, layout, send_for_label_, 188 AddLabelRow(three_column_layout_id, layout, send_for_label_,
188 send_for_value_field_); 189 send_for_value_field_);
189 AddLabelRow(three_column_layout_id, layout, created_label_, 190 AddLabelRow(three_column_layout_id, layout, created_label_,
190 created_value_field_); 191 created_value_field_);
191 AddLabelRow(three_column_layout_id, layout, expires_label_, 192 AddLabelRow(three_column_layout_id, layout, expires_label_,
192 expires_value_field_); 193 expires_value_field_);
193 } 194 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/content_setting_bubble_contents.cc ('k') | chrome/browser/ui/views/dropdown_bar_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698