| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/profiles/profile_chooser_view.h" | 5 #include "chrome/browser/ui/views/profiles/profile_chooser_view.h" |
| 6 | 6 |
| 7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/lifetime/application_lifetime.h" | 10 #include "chrome/browser/lifetime/application_lifetime.h" |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 bool ProfileChooserView::close_on_deactivate_for_testing_ = true; | 384 bool ProfileChooserView::close_on_deactivate_for_testing_ = true; |
| 385 | 385 |
| 386 // static | 386 // static |
| 387 void ProfileChooserView::ShowBubble( | 387 void ProfileChooserView::ShowBubble( |
| 388 BubbleViewMode view_mode, | 388 BubbleViewMode view_mode, |
| 389 views::View* anchor_view, | 389 views::View* anchor_view, |
| 390 views::BubbleBorder::Arrow arrow, | 390 views::BubbleBorder::Arrow arrow, |
| 391 views::BubbleBorder::BubbleAlignment border_alignment, | 391 views::BubbleBorder::BubbleAlignment border_alignment, |
| 392 const gfx::Rect& anchor_rect, | 392 const gfx::Rect& anchor_rect, |
| 393 Browser* browser) { | 393 Browser* browser) { |
| 394 if (IsShowing()) |
| 395 return; |
| 396 |
| 394 profile_bubble_ = new ProfileChooserView(anchor_view, arrow, anchor_rect, | 397 profile_bubble_ = new ProfileChooserView(anchor_view, arrow, anchor_rect, |
| 395 browser, view_mode); | 398 browser, view_mode); |
| 396 views::BubbleDelegateView::CreateBubble(profile_bubble_); | 399 views::BubbleDelegateView::CreateBubble(profile_bubble_); |
| 397 profile_bubble_->set_close_on_deactivate(close_on_deactivate_for_testing_); | 400 profile_bubble_->set_close_on_deactivate(close_on_deactivate_for_testing_); |
| 398 profile_bubble_->SetAlignment(border_alignment); | 401 profile_bubble_->SetAlignment(border_alignment); |
| 399 profile_bubble_->GetWidget()->Show(); | 402 profile_bubble_->GetWidget()->Show(); |
| 400 profile_bubble_->SetArrowPaintType(views::BubbleBorder::PAINT_NONE); | 403 profile_bubble_->SetArrowPaintType(views::BubbleBorder::PAINT_NONE); |
| 401 } | 404 } |
| 402 | 405 |
| 403 // static | 406 // static |
| (...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1296 layout->StartRowWithPadding( | 1299 layout->StartRowWithPadding( |
| 1297 1, 0, 0, views::kUnrelatedControlVerticalSpacing); | 1300 1, 0, 0, views::kUnrelatedControlVerticalSpacing); |
| 1298 layout->AddView(end_preview_and_relaunch_button_); | 1301 layout->AddView(end_preview_and_relaunch_button_); |
| 1299 | 1302 |
| 1300 TitleCard* title_card = new TitleCard( | 1303 TitleCard* title_card = new TitleCard( |
| 1301 IDS_PROFILES_END_PREVIEW, this, &end_preview_cancel_button_); | 1304 IDS_PROFILES_END_PREVIEW, this, &end_preview_cancel_button_); |
| 1302 return TitleCard::AddPaddedTitleCard( | 1305 return TitleCard::AddPaddedTitleCard( |
| 1303 view, title_card, kFixedAccountRemovalViewWidth); | 1306 view, title_card, kFixedAccountRemovalViewWidth); |
| 1304 } | 1307 } |
| 1305 | 1308 |
| OLD | NEW |