| OLD | NEW |
| 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/tabs/dragged_tab_controller.h" | 5 #include "chrome/browser/ui/views/tabs/dragged_tab_controller.h" |
| 6 | 6 |
| 7 #include <math.h> | 7 #include <math.h> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 | 82 |
| 83 virtual void OnPaintBackground(gfx::Canvas* canvas) { | 83 virtual void OnPaintBackground(gfx::Canvas* canvas) { |
| 84 SkRect outer_rect = { SkIntToScalar(0), SkIntToScalar(0), | 84 SkRect outer_rect = { SkIntToScalar(0), SkIntToScalar(0), |
| 85 SkIntToScalar(width()), | 85 SkIntToScalar(width()), |
| 86 SkIntToScalar(height()) }; | 86 SkIntToScalar(height()) }; |
| 87 | 87 |
| 88 // Fill the background rect. | 88 // Fill the background rect. |
| 89 SkPaint paint; | 89 SkPaint paint; |
| 90 paint.setColor(SkColorSetRGB(108, 108, 108)); | 90 paint.setColor(SkColorSetRGB(108, 108, 108)); |
| 91 paint.setStyle(SkPaint::kFill_Style); | 91 paint.setStyle(SkPaint::kFill_Style); |
| 92 canvas->AsCanvasSkia()->drawRoundRect( | 92 canvas->AsCanvasSkia()->skia_canvas()->drawRoundRect( |
| 93 outer_rect, SkIntToScalar(kRoundedRectRadius), | 93 outer_rect, SkIntToScalar(kRoundedRectRadius), |
| 94 SkIntToScalar(kRoundedRectRadius), paint); | 94 SkIntToScalar(kRoundedRectRadius), paint); |
| 95 | 95 |
| 96 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 96 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
| 97 | 97 |
| 98 SkBitmap* high_icon = rb.GetBitmapNamed(IDR_DOCK_HIGH); | 98 SkBitmap* high_icon = rb.GetBitmapNamed(IDR_DOCK_HIGH); |
| 99 SkBitmap* wide_icon = rb.GetBitmapNamed(IDR_DOCK_WIDE); | 99 SkBitmap* wide_icon = rb.GetBitmapNamed(IDR_DOCK_WIDE); |
| 100 | 100 |
| 101 canvas->Save(); | 101 canvas->Save(); |
| 102 bool rtl_ui = base::i18n::IsRTL(); | 102 bool rtl_ui = base::i18n::IsRTL(); |
| (...skipping 1351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1454 | 1454 |
| 1455 bool DraggedTabController::AreTabsConsecutive() { | 1455 bool DraggedTabController::AreTabsConsecutive() { |
| 1456 for (size_t i = 1; i < drag_data_.size(); ++i) { | 1456 for (size_t i = 1; i < drag_data_.size(); ++i) { |
| 1457 if (drag_data_[i - 1].source_model_index + 1 != | 1457 if (drag_data_[i - 1].source_model_index + 1 != |
| 1458 drag_data_[i].source_model_index) { | 1458 drag_data_[i].source_model_index) { |
| 1459 return false; | 1459 return false; |
| 1460 } | 1460 } |
| 1461 } | 1461 } |
| 1462 return true; | 1462 return true; |
| 1463 } | 1463 } |
| OLD | NEW |