| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 // static | 97 // static |
| 98 views::MenuButton* InfoBarView::CreateMenuButton( | 98 views::MenuButton* InfoBarView::CreateMenuButton( |
| 99 const string16& text, | 99 const string16& text, |
| 100 views::MenuButtonListener* menu_button_listener) { | 100 views::MenuButtonListener* menu_button_listener) { |
| 101 views::MenuButton* menu_button = new views::MenuButton( | 101 views::MenuButton* menu_button = new views::MenuButton( |
| 102 NULL, text, menu_button_listener, true); | 102 NULL, text, menu_button_listener, true); |
| 103 menu_button->set_border(new InfoBarButtonBorder); | 103 menu_button->set_border(new InfoBarButtonBorder); |
| 104 menu_button->set_animate_on_state_change(false); | 104 menu_button->set_animate_on_state_change(false); |
| 105 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 105 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
| 106 menu_button->set_menu_marker( | 106 menu_button->set_menu_marker( |
| 107 rb.GetImageNamed(IDR_INFOBARBUTTON_MENU_DROPARROW).ToSkBitmap()); | 107 rb.GetImageNamed(IDR_INFOBARBUTTON_MENU_DROPARROW).ToImageSkia()); |
| 108 menu_button->SetEnabledColor(SK_ColorBLACK); | 108 menu_button->SetEnabledColor(SK_ColorBLACK); |
| 109 menu_button->SetHighlightColor(SK_ColorBLACK); | 109 menu_button->SetHighlightColor(SK_ColorBLACK); |
| 110 menu_button->SetHoverColor(SK_ColorBLACK); | 110 menu_button->SetHoverColor(SK_ColorBLACK); |
| 111 menu_button->SetFont(rb.GetFont(ui::ResourceBundle::MediumFont)); | 111 menu_button->SetFont(rb.GetFont(ui::ResourceBundle::MediumFont)); |
| 112 menu_button->set_focusable(true); | 112 menu_button->set_focusable(true); |
| 113 return menu_button; | 113 return menu_button; |
| 114 } | 114 } |
| 115 | 115 |
| 116 // static | 116 // static |
| 117 views::TextButton* InfoBarView::CreateTextButton( | 117 views::TextButton* InfoBarView::CreateTextButton( |
| (...skipping 257 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 |