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

Side by Side Diff: ui/app_list/views/search_result_actions_view.cc

Issue 103493005: Rename View::set_focusable and View::set_accessibility_focusable (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added a few missing files Created 7 years 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "ui/app_list/views/search_result_actions_view.h" 5 #include "ui/app_list/views/search_result_actions_view.h"
6 6
7 #include "ui/app_list/views/search_result_actions_view_delegate.h" 7 #include "ui/app_list/views/search_result_actions_view_delegate.h"
8 #include "ui/base/resource/resource_bundle.h" 8 #include "ui/base/resource/resource_bundle.h"
9 #include "ui/views/border.h" 9 #include "ui/views/border.h"
10 #include "ui/views/controls/button/blue_button.h" 10 #include "ui/views/controls/button/blue_button.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 button->SetTooltipText(action.tooltip_text); 48 button->SetTooltipText(action.tooltip_text);
49 AddChildView(button); 49 AddChildView(button);
50 } 50 }
51 51
52 void SearchResultActionsView::CreateBlueButton( 52 void SearchResultActionsView::CreateBlueButton(
53 const SearchResult::Action& action) { 53 const SearchResult::Action& action) {
54 views::BlueButton* button = new views::BlueButton(this, action.label_text); 54 views::BlueButton* button = new views::BlueButton(this, action.label_text);
55 button->SetTooltipText(action.tooltip_text); 55 button->SetTooltipText(action.tooltip_text);
56 button->SetFont(ui::ResourceBundle::GetSharedInstance().GetFont( 56 button->SetFont(ui::ResourceBundle::GetSharedInstance().GetFont(
57 ui::ResourceBundle::SmallBoldFont)); 57 ui::ResourceBundle::SmallBoldFont));
58 button->set_focusable(false); 58 button->SetFocusable(false);
59 AddChildView(button); 59 AddChildView(button);
60 } 60 }
61 61
62 void SearchResultActionsView::ButtonPressed(views::Button* sender, 62 void SearchResultActionsView::ButtonPressed(views::Button* sender,
63 const ui::Event& event) { 63 const ui::Event& event) {
64 if (!delegate_) 64 if (!delegate_)
65 return; 65 return;
66 66
67 const int index = GetIndexOf(sender); 67 const int index = GetIndexOf(sender);
68 DCHECK_NE(-1, index); 68 DCHECK_NE(-1, index);
69 delegate_->OnSearchResultActionActivated(index, event.flags()); 69 delegate_->OnSearchResultActionActivated(index, event.flags());
70 } 70 }
71 71
72 } // namespace app_list 72 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698