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

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: Further renaming 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(
181 views::Border::CreateSolidSidedBorder( 181 views::Border::CreateSolidSidedBorder(
182 1, 0, 1, 0, 182 1, 0, 1, 0,
183 ui::GetSigninConfirmationPromptBarColor( 183 ui::GetSigninConfirmationPromptBarColor(
184 ui::kSigninConfirmationPromptBarBorderAlpha))); 184 ui::kSigninConfirmationPromptBarBorderAlpha)));
185 prompt_bar->set_background(views::Background::CreateSolidBackground( 185 prompt_bar->set_background(views::Background::CreateSolidBackground(
186 kPromptBarBackgroundColor)); 186 kPromptBarBackgroundColor));
187 187
188 // Create the explanation label. 188 // Create the explanation label.
189 std::vector<size_t> offsets; 189 std::vector<size_t> offsets;
190 const base::string16 learn_more_text = 190 const base::string16 learn_more_text =
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 views::Button* sender, 253 views::Button* sender,
254 const ui::Event& event) { 254 const ui::Event& event) {
255 DCHECK(prompt_for_new_profile_); 255 DCHECK(prompt_for_new_profile_);
256 DCHECK_EQ(continue_signin_button_, sender); 256 DCHECK_EQ(continue_signin_button_, sender);
257 if (delegate_) { 257 if (delegate_) {
258 delegate_->OnContinueSignin(); 258 delegate_->OnContinueSignin();
259 delegate_ = NULL; 259 delegate_ = NULL;
260 } 260 }
261 GetWidget()->Close(); 261 GetWidget()->Close();
262 } 262 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698