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

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

Issue 1894383002: MacViews: Implement Full Keyboard Access. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@SetFocusBehavior
Patch Set: Rebased Created 4 years, 7 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/folder_header_view.h" 5 #include "ui/app_list/views/folder_header_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 folder_name_visible_(true) { 65 folder_name_visible_(true) {
66 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 66 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
67 if (!app_list::switches::IsExperimentalAppListEnabled()) { 67 if (!app_list::switches::IsExperimentalAppListEnabled()) {
68 back_button_ = new views::ImageButton(this); 68 back_button_ = new views::ImageButton(this);
69 back_button_->SetImage( 69 back_button_->SetImage(
70 views::ImageButton::STATE_NORMAL, 70 views::ImageButton::STATE_NORMAL,
71 rb.GetImageSkiaNamed(IDR_APP_LIST_FOLDER_BACK_NORMAL)); 71 rb.GetImageSkiaNamed(IDR_APP_LIST_FOLDER_BACK_NORMAL));
72 back_button_->SetImageAlignment(views::ImageButton::ALIGN_CENTER, 72 back_button_->SetImageAlignment(views::ImageButton::ALIGN_CENTER,
73 views::ImageButton::ALIGN_MIDDLE); 73 views::ImageButton::ALIGN_MIDDLE);
74 AddChildView(back_button_); 74 AddChildView(back_button_);
75 back_button_->SetFocusBehavior(FocusBehavior::ALWAYS); 75 views::Button::ConfigureDefaultFocus(back_button_);
76 back_button_->SetAccessibleName( 76 back_button_->SetAccessibleName(
77 ui::ResourceBundle::GetSharedInstance().GetLocalizedString( 77 ui::ResourceBundle::GetSharedInstance().GetLocalizedString(
78 IDS_APP_LIST_FOLDER_CLOSE_FOLDER_ACCESSIBILE_NAME)); 78 IDS_APP_LIST_FOLDER_CLOSE_FOLDER_ACCESSIBILE_NAME));
79 } 79 }
80 80
81 folder_name_view_->SetFontList( 81 folder_name_view_->SetFontList(
82 rb.GetFontList(ui::ResourceBundle::MediumFont)); 82 rb.GetFontList(ui::ResourceBundle::MediumFont));
83 folder_name_view_->set_placeholder_text_color(kFolderTitleHintTextColor); 83 folder_name_view_->set_placeholder_text_color(kFolderTitleHintTextColor);
84 folder_name_view_->set_placeholder_text(folder_name_placeholder_text_); 84 folder_name_view_->set_placeholder_text(folder_name_placeholder_text_);
85 folder_name_view_->SetBorder(views::Border::NullBorder()); 85 folder_name_view_->SetBorder(views::Border::NullBorder());
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 void FolderHeaderView::ButtonPressed(views::Button* sender, 245 void FolderHeaderView::ButtonPressed(views::Button* sender,
246 const ui::Event& event) { 246 const ui::Event& event) {
247 delegate_->NavigateBack(folder_item_, event); 247 delegate_->NavigateBack(folder_item_, event);
248 } 248 }
249 249
250 void FolderHeaderView::ItemNameChanged() { 250 void FolderHeaderView::ItemNameChanged() {
251 Update(); 251 Update();
252 } 252 }
253 253
254 } // namespace app_list 254 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698