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

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

Issue 9693022: views: Rename MenuButtonDelegate::RunMenu to something more obvious. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: menu_button_listener.h 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 link->SetHorizontalAlignment(views::Label::ALIGN_LEFT); 90 link->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
91 link->set_listener(listener); 91 link->set_listener(listener);
92 link->SetBackgroundColor(background()->get_color()); 92 link->SetBackgroundColor(background()->get_color());
93 link->set_focusable(true); 93 link->set_focusable(true);
94 return link; 94 return link;
95 } 95 }
96 96
97 // static 97 // static
98 views::MenuButton* InfoBarView::CreateMenuButton( 98 views::MenuButton* InfoBarView::CreateMenuButton(
99 const string16& text, 99 const string16& text,
100 views::MenuButtonDelegate* menu_delegate) { 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_delegate, 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 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 105 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
106 menu_button->set_menu_marker( 106 menu_button->set_menu_marker(
107 rb.GetBitmapNamed(IDR_INFOBARBUTTON_MENU_DROPARROW)); 107 rb.GetBitmapNamed(IDR_INFOBARBUTTON_MENU_DROPARROW));
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(ResourceBundle::MediumFont)); 111 menu_button->SetFont(rb.GetFont(ResourceBundle::MediumFont));
112 menu_button->set_focusable(true); 112 menu_button->set_focusable(true);
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/infobars/infobar_view.h ('k') | chrome/browser/ui/views/infobars/media_stream_infobar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698