| 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/chromeos/frame/bubble_frame_view.h" | 5 #include "chrome/browser/chromeos/frame/bubble_frame_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "chrome/browser/chromeos/frame/bubble_window.h" | 9 #include "chrome/browser/chromeos/frame/bubble_window.h" |
| 10 #include "chrome/browser/chromeos/login/helper.h" | 10 #include "chrome/browser/chromeos/login/helper.h" |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 void BubbleFrameView::OnPaint(gfx::Canvas* canvas) { | 208 void BubbleFrameView::OnPaint(gfx::Canvas* canvas) { |
| 209 SkPaint paint; | 209 SkPaint paint; |
| 210 paint.setStyle(SkPaint::kFill_Style); | 210 paint.setStyle(SkPaint::kFill_Style); |
| 211 paint.setColor(kBubbleWindowBackgroundColor); | 211 paint.setColor(kBubbleWindowBackgroundColor); |
| 212 gfx::Path path; | 212 gfx::Path path; |
| 213 gfx::Rect bounds(GetContentsBounds()); | 213 gfx::Rect bounds(GetContentsBounds()); |
| 214 SkRect rect; | 214 SkRect rect; |
| 215 rect.set(SkIntToScalar(bounds.x()), SkIntToScalar(bounds.y()), | 215 rect.set(SkIntToScalar(bounds.x()), SkIntToScalar(bounds.y()), |
| 216 SkIntToScalar(bounds.right()), SkIntToScalar(bounds.bottom())); | 216 SkIntToScalar(bounds.right()), SkIntToScalar(bounds.bottom())); |
| 217 path.addRect(rect); | 217 path.addRect(rect); |
| 218 canvas->AsCanvasSkia()->drawPath(path, paint); | 218 canvas->GetSkCanvas()->drawPath(path, paint); |
| 219 } | 219 } |
| 220 | 220 |
| 221 void BubbleFrameView::ButtonPressed(views::Button* sender, | 221 void BubbleFrameView::ButtonPressed(views::Button* sender, |
| 222 const views::Event& event) { | 222 const views::Event& event) { |
| 223 if (close_button_ != NULL && sender == close_button_) | 223 if (close_button_ != NULL && sender == close_button_) |
| 224 frame_->Close(); | 224 frame_->Close(); |
| 225 } | 225 } |
| 226 | 226 |
| 227 } // namespace chromeos | 227 } // namespace chromeos |
| OLD | NEW |