| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this |
| 2 // source code is governed by a BSD-style license that can be found in the | 2 // source code is governed by a BSD-style license that can be found in the |
| 3 // LICENSE file. | 3 // LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/views/bubble_border.h" | 5 #include "chrome/browser/views/bubble_border.h" |
| 6 | 6 |
| 7 #include "app/gfx/canvas.h" | |
| 8 #include "app/resource_bundle.h" | 7 #include "app/resource_bundle.h" |
| 9 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "gfx/canvas.h" |
| 10 #include "gfx/path.h" | 10 #include "gfx/path.h" |
| 11 #include "grit/theme_resources.h" | 11 #include "grit/theme_resources.h" |
| 12 #include "third_party/skia/include/core/SkBitmap.h" | 12 #include "third_party/skia/include/core/SkBitmap.h" |
| 13 | 13 |
| 14 // static | 14 // static |
| 15 SkBitmap* BubbleBorder::left_ = NULL; | 15 SkBitmap* BubbleBorder::left_ = NULL; |
| 16 SkBitmap* BubbleBorder::top_left_ = NULL; | 16 SkBitmap* BubbleBorder::top_left_ = NULL; |
| 17 SkBitmap* BubbleBorder::top_ = NULL; | 17 SkBitmap* BubbleBorder::top_ = NULL; |
| 18 SkBitmap* BubbleBorder::top_right_ = NULL; | 18 SkBitmap* BubbleBorder::top_right_ = NULL; |
| 19 SkBitmap* BubbleBorder::right_ = NULL; | 19 SkBitmap* BubbleBorder::right_ = NULL; |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 paint.setColor(border_->background_color()); | 277 paint.setColor(border_->background_color()); |
| 278 gfx::Path path; | 278 gfx::Path path; |
| 279 gfx::Rect bounds(view->GetLocalBounds(false)); | 279 gfx::Rect bounds(view->GetLocalBounds(false)); |
| 280 SkRect rect; | 280 SkRect rect; |
| 281 rect.set(SkIntToScalar(bounds.x()), SkIntToScalar(bounds.y()), | 281 rect.set(SkIntToScalar(bounds.x()), SkIntToScalar(bounds.y()), |
| 282 SkIntToScalar(bounds.right()), SkIntToScalar(bounds.bottom())); | 282 SkIntToScalar(bounds.right()), SkIntToScalar(bounds.bottom())); |
| 283 SkScalar radius = SkIntToScalar(BubbleBorder::GetCornerRadius()); | 283 SkScalar radius = SkIntToScalar(BubbleBorder::GetCornerRadius()); |
| 284 path.addRoundRect(rect, radius, radius); | 284 path.addRoundRect(rect, radius, radius); |
| 285 canvas->drawPath(path, paint); | 285 canvas->drawPath(path, paint); |
| 286 } | 286 } |
| OLD | NEW |