Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Side by Side Diff: chrome/browser/ui/views/chrome_to_mobile_bubble_view.cc

Issue 10382144: Change SetImage, SetBackground, and SetToggledImage to take in a gfx::ImageSkia (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/avatar_menu_bubble_view.cc ('k') | chrome/browser/ui/views/collected_cookies_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698