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

Side by Side Diff: chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views. h" 5 #include "chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views. h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 views::StyledLabel* prompt_label = new views::StyledLabel(prompt_text, this); 170 views::StyledLabel* prompt_label = new views::StyledLabel(prompt_text, this);
171 prompt_label->SetDisplayedOnBackgroundColor(kPromptBarBackgroundColor); 171 prompt_label->SetDisplayedOnBackgroundColor(kPromptBarBackgroundColor);
172 172
173 views::StyledLabel::RangeStyleInfo bold_style; 173 views::StyledLabel::RangeStyleInfo bold_style;
174 bold_style.font_style = gfx::Font::BOLD; 174 bold_style.font_style = gfx::Font::BOLD;
175 prompt_label->AddStyleRange( 175 prompt_label->AddStyleRange(
176 gfx::Range(offset, offset + domain.size()), bold_style); 176 gfx::Range(offset, offset + domain.size()), bold_style);
177 177
178 // Create the prompt bar. 178 // Create the prompt bar.
179 views::View* prompt_bar = new views::View; 179 views::View* prompt_bar = new views::View;
180 prompt_bar->set_border( 180 prompt_bar->SetBorder(views::Border::CreateSolidSidedBorder(
181 views::Border::CreateSolidSidedBorder( 181 1,
182 1, 0, 1, 0, 182 0,
183 ui::GetSigninConfirmationPromptBarColor( 183 1,
184 ui::kSigninConfirmationPromptBarBorderAlpha))); 184 0,
185 ui::GetSigninConfirmationPromptBarColor(
186 ui::kSigninConfirmationPromptBarBorderAlpha)));
185 prompt_bar->set_background(views::Background::CreateSolidBackground( 187 prompt_bar->set_background(views::Background::CreateSolidBackground(
186 kPromptBarBackgroundColor)); 188 kPromptBarBackgroundColor));
187 189
188 // Create the explanation label. 190 // Create the explanation label.
189 std::vector<size_t> offsets; 191 std::vector<size_t> offsets;
190 const base::string16 learn_more_text = 192 const base::string16 learn_more_text =
191 l10n_util::GetStringUTF16( 193 l10n_util::GetStringUTF16(
192 IDS_ENTERPRISE_SIGNIN_PROFILE_LINK_LEARN_MORE); 194 IDS_ENTERPRISE_SIGNIN_PROFILE_LINK_LEARN_MORE);
193 const base::string16 signin_explanation_text = 195 const base::string16 signin_explanation_text =
194 l10n_util::GetStringFUTF16(prompt_for_new_profile_ ? 196 l10n_util::GetStringFUTF16(prompt_for_new_profile_ ?
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 views::Button* sender, 255 views::Button* sender,
254 const ui::Event& event) { 256 const ui::Event& event) {
255 DCHECK(prompt_for_new_profile_); 257 DCHECK(prompt_for_new_profile_);
256 DCHECK_EQ(continue_signin_button_, sender); 258 DCHECK_EQ(continue_signin_button_, sender);
257 if (delegate_) { 259 if (delegate_) {
258 delegate_->OnContinueSignin(); 260 delegate_->OnContinueSignin();
259 delegate_ = NULL; 261 delegate_ = NULL;
260 } 262 }
261 GetWidget()->Close(); 263 GetWidget()->Close();
262 } 264 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/sync/one_click_signin_bubble_view.cc ('k') | chrome/browser/ui/views/tabs/tab.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698