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

Side by Side Diff: chrome/browser/ui/views/infobars/infobar_view.cc

Issue 9562038: ui/gfx: Make gfx::Canvas inherit from gfx::CanvasSkia. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more fixes Created 8 years, 9 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/infobars/infobar_view.h" 5 #include "chrome/browser/ui/views/infobars/infobar_view.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <shellapi.h> 8 #include <shellapi.h>
9 #endif 9 #endif
10 10
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 } 242 }
243 } 243 }
244 244
245 void InfoBarView::PaintChildren(gfx::Canvas* canvas) { 245 void InfoBarView::PaintChildren(gfx::Canvas* canvas) {
246 canvas->Save(); 246 canvas->Save();
247 247
248 // TODO(scr): This really should be the |fill_path_|, but the clipPath seems 248 // TODO(scr): This really should be the |fill_path_|, but the clipPath seems
249 // broken on non-Windows platforms (crbug.com/75154). For now, just clip to 249 // broken on non-Windows platforms (crbug.com/75154). For now, just clip to
250 // the bar bounds. 250 // the bar bounds.
251 // 251 //
252 // gfx::CanvasSkia* canvas_skia = canvas->AsCanvasSkia(); 252 // canvas->clipPath(fill_path_);
253 // canvas_skia->clipPath(fill_path_);
254 DCHECK_EQ(total_height(), height()) 253 DCHECK_EQ(total_height(), height())
255 << "Infobar piecewise heights do not match overall height"; 254 << "Infobar piecewise heights do not match overall height";
256 canvas->ClipRect(gfx::Rect(0, arrow_height(), width(), bar_height())); 255 canvas->ClipRect(gfx::Rect(0, arrow_height(), width(), bar_height()));
257 views::View::PaintChildren(canvas); 256 views::View::PaintChildren(canvas);
258 canvas->Restore(); 257 canvas->Restore();
259 } 258 }
260 259
261 void InfoBarView::ButtonPressed(views::Button* sender, 260 void InfoBarView::ButtonPressed(views::Button* sender,
262 const views::Event& event) { 261 const views::Event& event) {
263 if (!owned()) 262 if (!owned())
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 // infobar. 374 // infobar.
376 if (focused_before && focused_now && !Contains(focused_before) && 375 if (focused_before && focused_now && !Contains(focused_before) &&
377 Contains(focused_now) && GetWidget()) { 376 Contains(focused_now) && GetWidget()) {
378 GetWidget()->NotifyAccessibilityEvent( 377 GetWidget()->NotifyAccessibilityEvent(
379 this, ui::AccessibilityTypes::EVENT_ALERT, true); 378 this, ui::AccessibilityTypes::EVENT_ALERT, true);
380 } 379 }
381 } 380 }
382 381
383 void InfoBarView::OnDidChangeFocus(View* focused_before, View* focused_now) { 382 void InfoBarView::OnDidChangeFocus(View* focused_before, View* focused_now) {
384 } 383 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698