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" |
11 #include "chrome/browser/ui/browser.h" | 11 #include "chrome/browser/ui/browser.h" |
12 #include "chrome/common/url_constants.h" | 12 #include "chrome/common/url_constants.h" |
13 #include "grit/chromium_strings.h" | 13 #include "grit/chromium_strings.h" |
14 #include "grit/generated_resources.h" | 14 #include "grit/generated_resources.h" |
15 #include "ui/base/keycodes/keyboard_codes.h" | 15 #include "ui/base/keycodes/keyboard_codes.h" |
16 #include "ui/base/l10n/l10n_util.h" | 16 #include "ui/base/l10n/l10n_util.h" |
17 #include "ui/base/resource/resource_bundle.h" | 17 #include "ui/base/resource/resource_bundle.h" |
18 #include "ui/views/controls/button/text_button.h" | 18 #include "ui/views/controls/button/text_button.h" |
19 #include "ui/views/controls/label.h" | 19 #include "ui/views/controls/label.h" |
20 #include "ui/views/controls/link.h" | 20 #include "ui/views/controls/link.h" |
21 #include "ui/views/events/event.h" | |
22 #include "ui/views/layout/grid_layout.h" | 21 #include "ui/views/layout/grid_layout.h" |
23 #include "ui/views/layout/layout_constants.h" | 22 #include "ui/views/layout/layout_constants.h" |
24 #include "ui/views/widget/widget.h" | 23 #include "ui/views/widget/widget.h" |
25 | 24 |
26 // Minimum width for the mutli-line label. | 25 // Minimum width for the mutli-line label. |
27 const int kMinimumLabelWidth = 240; | 26 const int kMinimumLabelWidth = 240; |
28 | 27 |
29 // OneClickSigninBubbleView ---------------------------------------------------- | 28 // OneClickSigninBubbleView ---------------------------------------------------- |
30 | 29 |
31 // static | 30 // static |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 void OneClickSigninBubbleView::ButtonPressed(views::Button* sender, | 185 void OneClickSigninBubbleView::ButtonPressed(views::Button* sender, |
187 const ui::Event& event) { | 186 const ui::Event& event) { |
188 StartFade(false); | 187 StartFade(false); |
189 if (ok_button_ == sender) { | 188 if (ok_button_ == sender) { |
190 base::ResetAndReturn(&start_sync_callback_).Run( | 189 base::ResetAndReturn(&start_sync_callback_).Run( |
191 OneClickSigninSyncStarter::SYNC_WITH_DEFAULT_SETTINGS); | 190 OneClickSigninSyncStarter::SYNC_WITH_DEFAULT_SETTINGS); |
192 } else { | 191 } else { |
193 start_sync_callback_.Reset(); | 192 start_sync_callback_.Reset(); |
194 } | 193 } |
195 } | 194 } |
OLD | NEW |