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

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

Issue 8383028: ui/gfx: Convert Canvas::ClipRectInt() to use gfx::Rect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix typo 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
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/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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 canvas->Save(); 248 canvas->Save();
249 249
250 // TODO(scr): This really should be the |fill_path_|, but the clipPath seems 250 // TODO(scr): This really should be the |fill_path_|, but the clipPath seems
251 // broken on non-Windows platforms (crbug.com/75154). For now, just clip to 251 // broken on non-Windows platforms (crbug.com/75154). For now, just clip to
252 // the bar bounds. 252 // the bar bounds.
253 // 253 //
254 // gfx::CanvasSkia* canvas_skia = canvas->AsCanvasSkia(); 254 // gfx::CanvasSkia* canvas_skia = canvas->AsCanvasSkia();
255 // canvas_skia->clipPath(fill_path_); 255 // canvas_skia->clipPath(fill_path_);
256 DCHECK_EQ(total_height(), height()) 256 DCHECK_EQ(total_height(), height())
257 << "Infobar piecewise heights do not match overall height"; 257 << "Infobar piecewise heights do not match overall height";
258 canvas->ClipRectInt(0, arrow_height(), width(), bar_height()); 258 canvas->ClipRectInt(gfx::Rect(0, arrow_height(), width(), bar_height()));
259 views::View::PaintChildren(canvas); 259 views::View::PaintChildren(canvas);
260 canvas->Restore(); 260 canvas->Restore();
261 } 261 }
262 262
263 void InfoBarView::ButtonPressed(views::Button* sender, 263 void InfoBarView::ButtonPressed(views::Button* sender,
264 const views::Event& event) { 264 const views::Event& event) {
265 if (!owned()) 265 if (!owned())
266 return; // We're closing; don't call anything, it might access the owner. 266 return; // We're closing; don't call anything, it might access the owner.
267 if (sender == close_button_) { 267 if (sender == close_button_) {
268 delegate()->InfoBarDismissed(); 268 delegate()->InfoBarDismissed();
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 374
375 void InfoBarView::FocusWillChange(View* focused_before, View* focused_now) { 375 void InfoBarView::FocusWillChange(View* focused_before, View* focused_now) {
376 // This will trigger some screen readers to read the entire contents of this 376 // This will trigger some screen readers to read the entire contents of this
377 // infobar. 377 // infobar.
378 if (focused_before && focused_now && !Contains(focused_before) && 378 if (focused_before && focused_now && !Contains(focused_before) &&
379 Contains(focused_now) && GetWidget()) { 379 Contains(focused_now) && GetWidget()) {
380 GetWidget()->NotifyAccessibilityEvent( 380 GetWidget()->NotifyAccessibilityEvent(
381 this, ui::AccessibilityTypes::EVENT_ALERT, true); 381 this, ui::AccessibilityTypes::EVENT_ALERT, true);
382 } 382 }
383 } 383 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc ('k') | chrome/browser/ui/views/tabs/base_tab.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698