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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 return titled_view; | 358 return titled_view; |
359 } | 359 } |
360 | 360 |
361 private: | 361 private: |
362 virtual void Layout() OVERRIDE{ | 362 virtual void Layout() OVERRIDE{ |
363 back_button_->SetBounds( | 363 back_button_->SetBounds( |
364 0, 0, back_button_->GetPreferredSize().width(), height()); | 364 0, 0, back_button_->GetPreferredSize().width(), height()); |
365 title_label_->SetBoundsRect(GetContentsBounds()); | 365 title_label_->SetBoundsRect(GetContentsBounds()); |
366 } | 366 } |
367 | 367 |
368 virtual gfx::Size GetPreferredSize() OVERRIDE{ | 368 virtual gfx::Size GetPreferredSize() const OVERRIDE{ |
369 int height = std::max(title_label_->GetPreferredSize().height(), | 369 int height = std::max(title_label_->GetPreferredSize().height(), |
370 back_button_->GetPreferredSize().height()); | 370 back_button_->GetPreferredSize().height()); |
371 return gfx::Size(width(), height); | 371 return gfx::Size(width(), height); |
372 } | 372 } |
373 | 373 |
374 views::ImageButton* back_button_; | 374 views::ImageButton* back_button_; |
375 views::Label* title_label_; | 375 views::Label* title_label_; |
376 | 376 |
377 DISALLOW_COPY_AND_ASSIGN(TitleCard); | 377 DISALLOW_COPY_AND_ASSIGN(TitleCard); |
378 }; | 378 }; |
(...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1304 layout->StartRowWithPadding( | 1304 layout->StartRowWithPadding( |
1305 1, 0, 0, views::kUnrelatedControlVerticalSpacing); | 1305 1, 0, 0, views::kUnrelatedControlVerticalSpacing); |
1306 layout->AddView(end_preview_and_relaunch_button_); | 1306 layout->AddView(end_preview_and_relaunch_button_); |
1307 | 1307 |
1308 TitleCard* title_card = new TitleCard( | 1308 TitleCard* title_card = new TitleCard( |
1309 IDS_PROFILES_END_PREVIEW, this, &end_preview_cancel_button_); | 1309 IDS_PROFILES_END_PREVIEW, this, &end_preview_cancel_button_); |
1310 return TitleCard::AddPaddedTitleCard( | 1310 return TitleCard::AddPaddedTitleCard( |
1311 view, title_card, kFixedAccountRemovalViewWidth); | 1311 view, title_card, kFixedAccountRemovalViewWidth); |
1312 } | 1312 } |
1313 | 1313 |
OLD | NEW |