OLD | NEW |
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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 // | 252 // |
253 // canvas->sk_canvas()->clipPath(fill_path_); | 253 // canvas->sk_canvas()->clipPath(fill_path_); |
254 DCHECK_EQ(total_height(), height()) | 254 DCHECK_EQ(total_height(), height()) |
255 << "Infobar piecewise heights do not match overall height"; | 255 << "Infobar piecewise heights do not match overall height"; |
256 canvas->ClipRect(gfx::Rect(0, arrow_height(), width(), bar_height())); | 256 canvas->ClipRect(gfx::Rect(0, arrow_height(), width(), bar_height())); |
257 views::View::PaintChildren(canvas); | 257 views::View::PaintChildren(canvas); |
258 canvas->Restore(); | 258 canvas->Restore(); |
259 } | 259 } |
260 | 260 |
261 void InfoBarView::ButtonPressed(views::Button* sender, | 261 void InfoBarView::ButtonPressed(views::Button* sender, |
262 const views::Event& event) { | 262 const ui::Event& event) { |
263 if (!owned()) | 263 if (!owned()) |
264 return; // We're closing; don't call anything, it might access the owner. | 264 return; // We're closing; don't call anything, it might access the owner. |
265 if (sender == close_button_) { | 265 if (sender == close_button_) { |
266 delegate()->InfoBarDismissed(); | 266 delegate()->InfoBarDismissed(); |
267 RemoveSelf(); | 267 RemoveSelf(); |
268 } | 268 } |
269 } | 269 } |
270 | 270 |
271 int InfoBarView::ContentMinimumWidth() const { | 271 int InfoBarView::ContentMinimumWidth() const { |
272 return 0; | 272 return 0; |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 // infobar. | 375 // infobar. |
376 if (focused_before && focused_now && !Contains(focused_before) && | 376 if (focused_before && focused_now && !Contains(focused_before) && |
377 Contains(focused_now) && GetWidget()) { | 377 Contains(focused_now) && GetWidget()) { |
378 GetWidget()->NotifyAccessibilityEvent( | 378 GetWidget()->NotifyAccessibilityEvent( |
379 this, ui::AccessibilityTypes::EVENT_ALERT, true); | 379 this, ui::AccessibilityTypes::EVENT_ALERT, true); |
380 } | 380 } |
381 } | 381 } |
382 | 382 |
383 void InfoBarView::OnDidChangeFocus(View* focused_before, View* focused_now) { | 383 void InfoBarView::OnDidChangeFocus(View* focused_before, View* focused_now) { |
384 } | 384 } |
OLD | NEW |