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.h" | 9 #include "base/message_loop.h" |
10 #include "chrome/browser/google/google_util.h" | 10 #include "chrome/browser/google/google_util.h" |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 layout->StartRow(0, COLUMN_SET_TITLE_BAR); | 103 layout->StartRow(0, COLUMN_SET_TITLE_BAR); |
104 | 104 |
105 views::Label* label = new views::Label( | 105 views::Label* label = new views::Label( |
106 l10n_util::GetStringUTF16(IDS_ONE_CLICK_SIGNIN_DIALOG_TITLE)); | 106 l10n_util::GetStringUTF16(IDS_ONE_CLICK_SIGNIN_DIALOG_TITLE)); |
107 label->SetHorizontalAlignment(gfx::ALIGN_LEFT); | 107 label->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
108 label->SetFont(label->font().DeriveFont(3, gfx::Font::BOLD)); | 108 label->SetFont(label->font().DeriveFont(3, gfx::Font::BOLD)); |
109 layout->AddView(label); | 109 layout->AddView(label); |
110 | 110 |
111 close_button_ = new views::ImageButton(this); | 111 close_button_ = new views::ImageButton(this); |
112 close_button_->SetImage(views::ImageButton::STATE_NORMAL, | 112 close_button_->SetImage(views::ImageButton::STATE_NORMAL, |
113 rb.GetImageNamed(IDR_CLOSE_BAR).ToImageSkia()); | 113 rb.GetImageNamed(IDR_CLOSE_2).ToImageSkia()); |
114 close_button_->SetImage(views::ImageButton::STATE_HOVERED, | 114 close_button_->SetImage(views::ImageButton::STATE_HOVERED, |
115 rb.GetImageNamed(IDR_CLOSE_BAR_H).ToImageSkia()); | 115 rb.GetImageNamed(IDR_CLOSE_2_H).ToImageSkia()); |
116 close_button_->SetImage(views::ImageButton::STATE_PRESSED, | 116 close_button_->SetImage(views::ImageButton::STATE_PRESSED, |
117 rb.GetImageNamed(IDR_CLOSE_BAR_P).ToImageSkia()); | 117 rb.GetImageNamed(IDR_CLOSE_2_P).ToImageSkia()); |
118 layout->AddView(close_button_); | 118 layout->AddView(close_button_); |
119 } | 119 } |
120 | 120 |
121 layout->AddPaddingRow(0, views::kUnrelatedControlVerticalSpacing); | 121 layout->AddPaddingRow(0, views::kUnrelatedControlVerticalSpacing); |
122 | 122 |
123 { | 123 { |
124 layout->StartRow(0, COLUMN_SET_FILL_ALIGN); | 124 layout->StartRow(0, COLUMN_SET_FILL_ALIGN); |
125 | 125 |
126 views::Label* label = new views::Label( | 126 views::Label* label = new views::Label( |
127 l10n_util::GetStringUTF16(IDS_ONE_CLICK_SIGNIN_DIALOG_MESSAGE)); | 127 l10n_util::GetStringUTF16(IDS_ONE_CLICK_SIGNIN_DIALOG_MESSAGE)); |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 OneClickSigninSyncStarter::CONFIGURE_SYNC_FIRST); | 353 OneClickSigninSyncStarter::CONFIGURE_SYNC_FIRST); |
354 } | 354 } |
355 | 355 |
356 void OneClickSigninBubbleView::ButtonPressed(views::Button* sender, | 356 void OneClickSigninBubbleView::ButtonPressed(views::Button* sender, |
357 const ui::Event& event) { | 357 const ui::Event& event) { |
358 StartFade(false); | 358 StartFade(false); |
359 base::ResetAndReturn(&start_sync_callback_).Run((sender == ok_button_) ? | 359 base::ResetAndReturn(&start_sync_callback_).Run((sender == ok_button_) ? |
360 OneClickSigninSyncStarter::SYNC_WITH_DEFAULT_SETTINGS : | 360 OneClickSigninSyncStarter::SYNC_WITH_DEFAULT_SETTINGS : |
361 OneClickSigninSyncStarter::UNDO_SYNC); | 361 OneClickSigninSyncStarter::UNDO_SYNC); |
362 } | 362 } |
OLD | NEW |