| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |