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

Side by Side Diff: chrome/browser/chromeos/frame/bubble_frame_view.cc

Issue 8122013: Allow CanvasSkia to bind to an existing SkCanvas. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: 1 more fix Created 9 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/frame/panel_controller.cc » ('j') | ui/gfx/canvas.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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
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
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/frame/panel_controller.cc » ('j') | ui/gfx/canvas.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698