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

Side by Side Diff: chrome/browser/ui/views/sync/one_click_signin_bubble_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/sync/one_click_signin_bubble_view.h" 5 #include "chrome/browser/ui/views/sync/one_click_signin_bubble_view.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "chrome/browser/google/google_util.h" 10 #include "chrome/browser/google/google_util.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 void OneClickSigninBubbleView::AnimationEnded(const gfx::Animation* animation) { 133 void OneClickSigninBubbleView::AnimationEnded(const gfx::Animation* animation) {
134 views::BubbleDelegateView::AnimationEnded(animation); 134 views::BubbleDelegateView::AnimationEnded(animation);
135 if (message_loop_for_testing_) 135 if (message_loop_for_testing_)
136 message_loop_for_testing_->Quit(); 136 message_loop_for_testing_->Quit();
137 } 137 }
138 138
139 void OneClickSigninBubbleView::Init() { 139 void OneClickSigninBubbleView::Init() {
140 views::GridLayout* layout = new views::GridLayout(this); 140 views::GridLayout* layout = new views::GridLayout(this);
141 SetLayoutManager(layout); 141 SetLayoutManager(layout);
142 142
143 set_border(views::Border::CreateEmptyBorder(8, 8, 8, 8)); 143 SetBorder(views::Border::CreateEmptyBorder(8, 8, 8, 8));
144 144
145 // Column set for descriptive text and link. 145 // Column set for descriptive text and link.
146 views::ColumnSet* cs = layout->AddColumnSet(COLUMN_SET_FILL_ALIGN); 146 views::ColumnSet* cs = layout->AddColumnSet(COLUMN_SET_FILL_ALIGN);
147 cs->AddColumn(views::GridLayout::FILL, views::GridLayout::CENTER, 1, 147 cs->AddColumn(views::GridLayout::FILL, views::GridLayout::CENTER, 1,
148 views::GridLayout::USE_PREF, 0, 0); 148 views::GridLayout::USE_PREF, 0, 0);
149 149
150 // Column set for buttons at bottom of bubble. 150 // Column set for buttons at bottom of bubble.
151 cs = layout->AddColumnSet(COLUMN_SET_CONTROLS); 151 cs = layout->AddColumnSet(COLUMN_SET_CONTROLS);
152 cs->AddColumn(views::GridLayout::LEADING, views::GridLayout::CENTER, 0, 152 cs->AddColumn(views::GridLayout::LEADING, views::GridLayout::CENTER, 0,
153 views::GridLayout::USE_PREF, 0, 0); 153 views::GridLayout::USE_PREF, 0, 0);
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 // we'll be destroyed asynchronously and the shown state will be checked 413 // we'll be destroyed asynchronously and the shown state will be checked
414 // before then. 414 // before then.
415 DCHECK_EQ(bubble_view_, this); 415 DCHECK_EQ(bubble_view_, this);
416 bubble_view_ = NULL; 416 bubble_view_ = NULL;
417 417
418 if (is_sync_dialog_ && !start_sync_callback_.is_null()) { 418 if (is_sync_dialog_ && !start_sync_callback_.is_null()) {
419 base::ResetAndReturn(&start_sync_callback_).Run( 419 base::ResetAndReturn(&start_sync_callback_).Run(
420 OneClickSigninSyncStarter::UNDO_SYNC); 420 OneClickSigninSyncStarter::UNDO_SYNC);
421 } 421 }
422 } 422 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698