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/chrome_to_mobile_bubble_view.h" | 5 #include "chrome/browser/ui/views/chrome_to_mobile_bubble_view.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/string16.h" | 10 #include "base/string16.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 #include "ui/base/text/bytes_formatting.h" | 24 #include "ui/base/text/bytes_formatting.h" |
25 #include "ui/views/controls/button/checkbox.h" | 25 #include "ui/views/controls/button/checkbox.h" |
26 #include "ui/views/controls/button/radio_button.h" | 26 #include "ui/views/controls/button/radio_button.h" |
27 #include "ui/views/controls/button/text_button.h" | 27 #include "ui/views/controls/button/text_button.h" |
28 #include "ui/views/controls/image_view.h" | 28 #include "ui/views/controls/image_view.h" |
29 #include "ui/views/controls/label.h" | 29 #include "ui/views/controls/label.h" |
30 #include "ui/views/controls/link.h" | 30 #include "ui/views/controls/link.h" |
31 #include "ui/views/events/event.h" | 31 #include "ui/views/events/event.h" |
32 #include "ui/views/layout/grid_layout.h" | 32 #include "ui/views/layout/grid_layout.h" |
33 #include "ui/views/layout/layout_constants.h" | 33 #include "ui/views/layout/layout_constants.h" |
| 34 #include "ui/views/widget/widget.h" |
34 | 35 |
35 using views::GridLayout; | 36 using views::GridLayout; |
36 | 37 |
37 namespace { | 38 namespace { |
38 | 39 |
39 // The title label's color; matches the bookmark bubble's title. | 40 // The title label's color; matches the bookmark bubble's title. |
40 const SkColor kTitleColor = 0xFF062D75; | 41 const SkColor kTitleColor = 0xFF062D75; |
41 | 42 |
42 // The millisecond duration of the "Sending..." progress throb animation. | 43 // The millisecond duration of the "Sending..." progress throb animation. |
43 const size_t kProgressThrobDurationMS = 2400; | 44 const size_t kProgressThrobDurationMS = 2400; |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 } | 376 } |
376 | 377 |
377 // Update the view's contents to show the "Sending..." progress animation. | 378 // Update the view's contents to show the "Sending..." progress animation. |
378 cancel_->SetEnabled(false); | 379 cancel_->SetEnabled(false); |
379 send_->SetEnabled(false); | 380 send_->SetEnabled(false); |
380 send_->set_alignment(views::TextButtonBase::ALIGN_LEFT); | 381 send_->set_alignment(views::TextButtonBase::ALIGN_LEFT); |
381 progress_animation_.reset(new ui::ThrobAnimation(this)); | 382 progress_animation_.reset(new ui::ThrobAnimation(this)); |
382 progress_animation_->SetDuration(kProgressThrobDurationMS); | 383 progress_animation_->SetDuration(kProgressThrobDurationMS); |
383 progress_animation_->StartThrobbing(-1); | 384 progress_animation_->StartThrobbing(-1); |
384 } | 385 } |
OLD | NEW |