| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 | 65 |
| 66 void CheckboxNativeThemeBorder::GetInsets(gfx::Insets* insets) const { | 66 void CheckboxNativeThemeBorder::GetInsets(gfx::Insets* insets) const { |
| 67 views::TextButtonNativeThemeBorder::GetInsets(insets); | 67 views::TextButtonNativeThemeBorder::GetInsets(insets); |
| 68 insets->Set(insets->top(), 0, insets->bottom(), insets->right()); | 68 insets->Set(insets->top(), 0, insets->bottom(), insets->right()); |
| 69 } | 69 } |
| 70 | 70 |
| 71 // Downcast the View to an ImageView and set the image with the resource id. | 71 // Downcast the View to an ImageView and set the image with the resource id. |
| 72 void SetImageViewToId(views::View* image_view, int id) { | 72 void SetImageViewToId(views::View* image_view, int id) { |
| 73 views::ImageView* image = static_cast<views::ImageView*>(image_view); | 73 views::ImageView* image = static_cast<views::ImageView*>(image_view); |
| 74 if (image) | 74 if (image) |
| 75 image->SetImage(ui::ResourceBundle::GetSharedInstance().GetBitmapNamed(id)); | 75 image->SetImage( |
| 76 ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed(id)); |
| 76 } | 77 } |
| 77 | 78 |
| 78 } // namespace | 79 } // namespace |
| 79 | 80 |
| 80 // Declared in browser_dialogs.h so callers don't have to depend on our header. | 81 // Declared in browser_dialogs.h so callers don't have to depend on our header. |
| 81 | 82 |
| 82 namespace browser { | 83 namespace browser { |
| 83 | 84 |
| 84 void ShowChromeToMobileBubbleView(views::View* anchor_view, Profile* profile) { | 85 void ShowChromeToMobileBubbleView(views::View* anchor_view, Profile* profile) { |
| 85 ChromeToMobileBubbleView::ShowBubble(anchor_view, profile); | 86 ChromeToMobileBubbleView::ShowBubble(anchor_view, profile); |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 service_->SendToMobile(mobile_id, snapshot, weak_ptr_factory_.GetWeakPtr()); | 347 service_->SendToMobile(mobile_id, snapshot, weak_ptr_factory_.GetWeakPtr()); |
| 347 | 348 |
| 348 // Update the view's contents to show the "Sending..." progress animation. | 349 // Update the view's contents to show the "Sending..." progress animation. |
| 349 cancel_->SetEnabled(false); | 350 cancel_->SetEnabled(false); |
| 350 send_->SetEnabled(false); | 351 send_->SetEnabled(false); |
| 351 send_->set_alignment(views::TextButtonBase::ALIGN_LEFT); | 352 send_->set_alignment(views::TextButtonBase::ALIGN_LEFT); |
| 352 progress_animation_.reset(new ui::ThrobAnimation(this)); | 353 progress_animation_.reset(new ui::ThrobAnimation(this)); |
| 353 progress_animation_->SetDuration(kProgressThrobDurationMS); | 354 progress_animation_->SetDuration(kProgressThrobDurationMS); |
| 354 progress_animation_->StartThrobbing(-1); | 355 progress_animation_->StartThrobbing(-1); |
| 355 } | 356 } |
| OLD | NEW |