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

Side by Side Diff: chrome/browser/ui/views/download/download_item_view.cc

Issue 6879013: skia::PlatformCanvas is being deprecated. Going forward we will use gfx::Canvas wherever we need ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/download/download_item_view.h" 5 #include "chrome/browser/ui/views/download/download_item_view.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 x += center_width; 807 x += center_width;
808 PaintBitmaps(canvas, 808 PaintBitmaps(canvas,
809 body_image_set->top_right, body_image_set->right, 809 body_image_set->top_right, body_image_set->right,
810 body_image_set->bottom_right, 810 body_image_set->bottom_right,
811 x, box_y_, box_height_, body_image_set->top_right->width()); 811 x, box_y_, box_height_, body_image_set->top_right->width());
812 812
813 // Overlay our body hot state. 813 // Overlay our body hot state.
814 if (body_hover_animation_->GetCurrentValue() > 0) { 814 if (body_hover_animation_->GetCurrentValue() > 0) {
815 canvas->SaveLayerAlpha( 815 canvas->SaveLayerAlpha(
816 static_cast<int>(body_hover_animation_->GetCurrentValue() * 255)); 816 static_cast<int>(body_hover_animation_->GetCurrentValue() * 255));
817 canvas->AsCanvasSkia()->drawARGB(0, 255, 255, 255, SkXfermode::kClear_Mode); 817 canvas->AsCanvasSkia()->skia_canvas()->drawARGB(
818 0, 255, 255, 255, SkXfermode::kClear_Mode);
818 819
819 int x = kLeftPadding; 820 int x = kLeftPadding;
820 PaintBitmaps(canvas, 821 PaintBitmaps(canvas,
821 hot_body_image_set_.top_left, hot_body_image_set_.left, 822 hot_body_image_set_.top_left, hot_body_image_set_.left,
822 hot_body_image_set_.bottom_left, 823 hot_body_image_set_.bottom_left,
823 x, box_y_, box_height_, hot_body_image_set_.top_left->width()); 824 x, box_y_, box_height_, hot_body_image_set_.top_left->width());
824 x += body_image_set->top_left->width(); 825 x += body_image_set->top_left->width();
825 PaintBitmaps(canvas, 826 PaintBitmaps(canvas,
826 hot_body_image_set_.top, hot_body_image_set_.center, 827 hot_body_image_set_.top, hot_body_image_set_.center,
827 hot_body_image_set_.bottom, 828 hot_body_image_set_.bottom,
(...skipping 13 matching lines...) Expand all
841 if (drop_down_image_set) { 842 if (drop_down_image_set) {
842 PaintBitmaps(canvas, 843 PaintBitmaps(canvas,
843 drop_down_image_set->top, drop_down_image_set->center, 844 drop_down_image_set->top, drop_down_image_set->center,
844 drop_down_image_set->bottom, 845 drop_down_image_set->bottom,
845 x, box_y_, box_height_, drop_down_image_set->top->width()); 846 x, box_y_, box_height_, drop_down_image_set->top->width());
846 847
847 // Overlay our drop-down hot state. 848 // Overlay our drop-down hot state.
848 if (drop_hover_animation_->GetCurrentValue() > 0) { 849 if (drop_hover_animation_->GetCurrentValue() > 0) {
849 canvas->SaveLayerAlpha( 850 canvas->SaveLayerAlpha(
850 static_cast<int>(drop_hover_animation_->GetCurrentValue() * 255)); 851 static_cast<int>(drop_hover_animation_->GetCurrentValue() * 255));
851 canvas->AsCanvasSkia()->drawARGB(0, 255, 255, 255, 852 canvas->AsCanvasSkia()->skia_canvas()->drawARGB(
852 SkXfermode::kClear_Mode); 853 0, 255, 255, 255, SkXfermode::kClear_Mode);
853 854
854 PaintBitmaps(canvas, 855 PaintBitmaps(canvas,
855 drop_down_image_set->top, drop_down_image_set->center, 856 drop_down_image_set->top, drop_down_image_set->center,
856 drop_down_image_set->bottom, 857 drop_down_image_set->bottom,
857 x, box_y_, box_height_, drop_down_image_set->top->width()); 858 x, box_y_, box_height_, drop_down_image_set->top->width());
858 859
859 canvas->Restore(); 860 canvas->Restore();
860 } 861 }
861 } 862 }
862 863
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
1149 // If the name has changed, notify assistive technology that the name 1150 // If the name has changed, notify assistive technology that the name
1150 // has changed so they can announce it immediately. 1151 // has changed so they can announce it immediately.
1151 if (new_name != accessible_name_) { 1152 if (new_name != accessible_name_) {
1152 accessible_name_ = new_name; 1153 accessible_name_ = new_name;
1153 if (GetWidget()) { 1154 if (GetWidget()) {
1154 GetWidget()->NotifyAccessibilityEvent( 1155 GetWidget()->NotifyAccessibilityEvent(
1155 this, ui::AccessibilityTypes::EVENT_NAME_CHANGED, true); 1156 this, ui::AccessibilityTypes::EVENT_NAME_CHANGED, true);
1156 } 1157 }
1157 } 1158 }
1158 } 1159 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/detachable_toolbar_view.cc ('k') | chrome/browser/ui/views/frame/opaque_browser_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698