summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormohsen@chromium.org <mohsen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-16 14:07:19 +0000
committermohsen@chromium.org <mohsen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-16 14:07:19 +0000
commit505df7b9b280d3acfa9fa66094d6a5906fa6e743 (patch)
treee0f3b4ca8e03699e7e388130a12d4aa2b0691e88
parent71de10ee5b06eacf9ee72db449c15967878054b6 (diff)
downloadchromium_src-505df7b9b280d3acfa9fa66094d6a5906fa6e743.zip
chromium_src-505df7b9b280d3acfa9fa66094d6a5906fa6e743.tar.gz
chromium_src-505df7b9b280d3acfa9fa66094d6a5906fa6e743.tar.bz2
Rename View::set_focusable and View::set_accessibility_focusable
These functions are renamed to SetFocusable and SetAccessibilityFocusable, respectively, as a first step to add some functionality to them later. Later the view should give up focus if it has become unfocusable. BUG=323956 Review URL: https://codereview.chromium.org/103493005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240888 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--ash/focus_cycler_unittest.cc8
-rw-r--r--ash/shelf/overflow_button.cc2
-rw-r--r--ash/shelf/shelf_button.cc2
-rw-r--r--ash/shell/lock_view.cc2
-rw-r--r--ash/system/chromeos/audio/tray_audio.cc2
-rw-r--r--ash/system/date/date_view.cc6
-rw-r--r--ash/system/tray/actionable_view.cc2
-rw-r--r--ash/system/tray/tray_details_view_unittest.cc2
-rw-r--r--ash/system/tray/tray_popup_header_button.cc2
-rw-r--r--ash/system/tray/tray_popup_label_button.cc2
-rw-r--r--ash/wm/immersive_fullscreen_controller_unittest.cc6
-rw-r--r--chrome/browser/chromeos/options/wifi_config_view.cc2
-rw-r--r--chrome/browser/chromeos/options/wimax_config_view.cc2
-rw-r--r--chrome/browser/ui/views/accessibility/accessibility_event_router_views_unittest.cc4
-rw-r--r--chrome/browser/ui/views/autofill/autofill_dialog_views.cc4
-rw-r--r--chrome/browser/ui/views/autofill/autofill_dialog_views_unittest.cc6
-rw-r--r--chrome/browser/ui/views/autofill/tooltip_icon.cc2
-rw-r--r--chrome/browser/ui/views/avatar_menu_bubble_view.cc2
-rw-r--r--chrome/browser/ui/views/bookmarks/bookmark_bar_instructions_view.cc2
-rw-r--r--chrome/browser/ui/views/desktop_media_picker_views.cc2
-rw-r--r--chrome/browser/ui/views/download/download_item_view.cc2
-rw-r--r--chrome/browser/ui/views/extensions/extension_view_views.cc2
-rw-r--r--chrome/browser/ui/views/find_bar_view.cc6
-rw-r--r--chrome/browser/ui/views/frame/browser_view.cc2
-rw-r--r--chrome/browser/ui/views/fullscreen_exit_bubble_views.cc8
-rw-r--r--chrome/browser/ui/views/infobars/extension_infobar.cc2
-rw-r--r--chrome/browser/ui/views/infobars/infobar_view.cc8
-rw-r--r--chrome/browser/ui/views/location_bar/bubble_icon_view.cc2
-rw-r--r--chrome/browser/ui/views/location_bar/location_bar_decoration_view.cc2
-rw-r--r--chrome/browser/ui/views/location_bar/location_bar_view.cc6
-rw-r--r--chrome/browser/ui/views/location_bar/open_pdf_in_reader_view.cc2
-rw-r--r--chrome/browser/ui/views/location_bar/page_action_image_view.cc2
-rw-r--r--chrome/browser/ui/views/location_bar/script_bubble_icon_view.cc2
-rw-r--r--chrome/browser/ui/views/location_bar/zoom_view.cc2
-rw-r--r--chrome/browser/ui/views/native_widget_win_interactive_uitest.cc2
-rw-r--r--chrome/browser/ui/views/passwords/manage_password_item_view.cc2
-rw-r--r--chrome/browser/ui/views/passwords/manage_passwords_icon_view.cc2
-rw-r--r--chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc2
-rw-r--r--chrome/browser/ui/views/toolbar/toolbar_button.cc2
-rw-r--r--chrome/browser/ui/views/toolbar/wrench_menu.cc4
-rw-r--r--chrome/browser/ui/views/website_settings/permission_selector_view.cc2
-rw-r--r--ui/app_list/views/search_result_actions_view.cc2
-rw-r--r--ui/message_center/views/message_center_button_bar.cc4
-rw-r--r--ui/message_center/views/message_center_view.cc2
-rw-r--r--ui/message_center/views/message_view.cc2
-rw-r--r--ui/message_center/views/notification_button.cc2
-rw-r--r--ui/message_center/views/notifier_settings_view.cc10
-rw-r--r--ui/message_center/views/padded_button.cc2
-rw-r--r--ui/views/bubble/bubble_delegate_unittest.cc2
-rw-r--r--ui/views/color_chooser/color_chooser_view.cc8
-rw-r--r--ui/views/controls/button/button.cc2
-rw-r--r--ui/views/controls/button/checkbox.cc2
-rw-r--r--ui/views/controls/button/custom_button.h2
-rw-r--r--ui/views/controls/button/image_button.h2
-rw-r--r--ui/views/controls/button/label_button.cc2
-rw-r--r--ui/views/controls/button/text_button.h2
-rw-r--r--ui/views/controls/combobox/combobox.cc6
-rw-r--r--ui/views/controls/label_unittest.cc10
-rw-r--r--ui/views/controls/link.cc2
-rw-r--r--ui/views/controls/native_control.cc2
-rw-r--r--ui/views/controls/scrollbar/native_scroll_bar_views.cc8
-rw-r--r--ui/views/controls/separator.cc2
-rw-r--r--ui/views/controls/slider.cc2
-rw-r--r--ui/views/controls/tabbed_pane/tabbed_pane.cc2
-rw-r--r--ui/views/controls/table/table_view.cc2
-rw-r--r--ui/views/controls/textfield/textfield.cc4
-rw-r--r--ui/views/controls/tree/tree_view.cc2
-rw-r--r--ui/views/examples/button_example.cc8
-rw-r--r--ui/views/examples/tree_view_example.cc6
-rw-r--r--ui/views/examples/widget_example.cc2
-rw-r--r--ui/views/focus/focus_manager_unittest.cc32
-rw-r--r--ui/views/focus/focus_manager_unittest_win.cc2
-rw-r--r--ui/views/focus/focus_traversal_unittest.cc12
-rw-r--r--ui/views/touchui/touch_editing_menu.cc2
-rw-r--r--ui/views/view.cc14
-rw-r--r--ui/views/view.h6
-rw-r--r--ui/views/view_unittest.cc6
-rw-r--r--ui/views/widget/widget_interactive_uitest.cc2
-rw-r--r--ui/views/widget/widget_unittest.cc8
-rw-r--r--ui/views/window/dialog_client_view.cc2
80 files changed, 164 insertions, 152 deletions
diff --git a/ash/focus_cycler_unittest.cc b/ash/focus_cycler_unittest.cc
index 8c02491..ed5340e 100644
--- a/ash/focus_cycler_unittest.cc
+++ b/ash/focus_cycler_unittest.cc
@@ -315,22 +315,22 @@ TEST_F(FocusCyclerTest, CycleFocusThroughWindowWithPanes) {
root_view->AddChildView(pane1);
views::View* view1 = new views::View;
- view1->set_focusable(true);
+ view1->SetFocusable(true);
pane1->AddChildView(view1);
views::View* view2 = new views::View;
- view2->set_focusable(true);
+ view2->SetFocusable(true);
pane1->AddChildView(view2);
views::AccessiblePaneView* pane2 = new views::AccessiblePaneView();
root_view->AddChildView(pane2);
views::View* view3 = new views::View;
- view3->set_focusable(true);
+ view3->SetFocusable(true);
pane2->AddChildView(view3);
views::View* view4 = new views::View;
- view4->set_focusable(true);
+ view4->SetFocusable(true);
pane2->AddChildView(view4);
std::vector<views::View*> panes;
diff --git a/ash/shelf/overflow_button.cc b/ash/shelf/overflow_button.cc
index 4f8becc..66d5476 100644
--- a/ash/shelf/overflow_button.cc
+++ b/ash/shelf/overflow_button.cc
@@ -43,7 +43,7 @@ OverflowButton::OverflowButton(views::ButtonListener* listener)
bottom_image_ = rb.GetImageNamed(IDR_AURA_LAUNCHER_OVERFLOW).ToImageSkia();
- set_accessibility_focusable(true);
+ SetAccessibilityFocusable(true);
SetAccessibleName(l10n_util::GetStringUTF16(IDS_ASH_SHELF_OVERFLOW_NAME));
}
diff --git a/ash/shelf/shelf_button.cc b/ash/shelf/shelf_button.cc
index 93a44e1..dd3e3e9 100644
--- a/ash/shelf/shelf_button.cc
+++ b/ash/shelf/shelf_button.cc
@@ -238,7 +238,7 @@ ShelfButton::ShelfButton(views::ButtonListener* listener,
state_(STATE_NORMAL),
shelf_layout_manager_(shelf_layout_manager),
destroyed_flag_(NULL) {
- set_accessibility_focusable(true);
+ SetAccessibilityFocusable(true);
const gfx::ShadowValue kShadows[] = {
gfx::ShadowValue(gfx::Point(0, 2), 0, SkColorSetARGB(0x1A, 0, 0, 0)),
diff --git a/ash/shell/lock_view.cc b/ash/shell/lock_view.cc
index aee0133..7a95ea439 100644
--- a/ash/shell/lock_view.cc
+++ b/ash/shell/lock_view.cc
@@ -28,7 +28,7 @@ class LockView : public views::WidgetDelegateView,
: unlock_button_(new views::LabelButton(this, ASCIIToUTF16("Unlock"))) {
unlock_button_->SetStyle(views::Button::STYLE_NATIVE_TEXTBUTTON);
AddChildView(unlock_button_);
- unlock_button_->set_focusable(true);
+ unlock_button_->SetFocusable(true);
}
virtual ~LockView() {}
diff --git a/ash/system/chromeos/audio/tray_audio.cc b/ash/system/chromeos/audio/tray_audio.cc
index 3d77ed1..7d26fc6 100644
--- a/ash/system/chromeos/audio/tray_audio.cc
+++ b/ash/system/chromeos/audio/tray_audio.cc
@@ -206,7 +206,7 @@ class VolumeView : public ActionableView,
device_type_(NULL),
more_(NULL),
is_default_view_(is_default_view) {
- set_focusable(false);
+ SetFocusable(false);
SetLayoutManager(new views::BoxLayout(views::BoxLayout::kHorizontal,
kTrayPopupPaddingHorizontal, 0, kTrayPopupPaddingBetweenItems));
diff --git a/ash/system/date/date_view.cc b/ash/system/date/date_view.cc
index ae4a546..63f3af3 100644
--- a/ash/system/date/date_view.cc
+++ b/ash/system/date/date_view.cc
@@ -138,7 +138,7 @@ DateView::DateView()
date_label_->SetEnabledColor(kHeaderTextColorNormal);
UpdateTextInternal(base::Time::Now());
AddChildView(date_label_);
- set_focusable(actionable_);
+ SetFocusable(actionable_);
}
DateView::~DateView() {
@@ -146,7 +146,7 @@ DateView::~DateView() {
void DateView::SetActionable(bool actionable) {
actionable_ = actionable;
- set_focusable(actionable_);
+ SetFocusable(actionable_);
}
void DateView::UpdateTimeFormat() {
@@ -196,7 +196,7 @@ TimeView::TimeView(TrayDate::ClockLayout clock_layout)
SetupLabels();
UpdateTextInternal(base::Time::Now());
UpdateClockLayout(clock_layout);
- set_focusable(false);
+ SetFocusable(false);
}
TimeView::~TimeView() {
diff --git a/ash/system/tray/actionable_view.cc b/ash/system/tray/actionable_view.cc
index 169b46d..261cefd 100644
--- a/ash/system/tray/actionable_view.cc
+++ b/ash/system/tray/actionable_view.cc
@@ -16,7 +16,7 @@ const char ActionableView::kViewClassName[] = "tray/ActionableView";
ActionableView::ActionableView()
: has_capture_(false) {
- set_focusable(true);
+ SetFocusable(true);
}
ActionableView::~ActionableView() {
diff --git a/ash/system/tray/tray_details_view_unittest.cc b/ash/system/tray/tray_details_view_unittest.cc
index 49a637e..c608120 100644
--- a/ash/system/tray/tray_details_view_unittest.cc
+++ b/ash/system/tray/tray_details_view_unittest.cc
@@ -63,7 +63,7 @@ class TestItem : public SystemTrayItem {
}
virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE {
default_view_ = new views::View;
- default_view_->set_focusable(true);
+ default_view_->SetFocusable(true);
return default_view_;
}
virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE {
diff --git a/ash/system/tray/tray_popup_header_button.cc b/ash/system/tray/tray_popup_header_button.cc
index e9430e5..d19cbc5 100644
--- a/ash/system/tray/tray_popup_header_button.cc
+++ b/ash/system/tray/tray_popup_header_button.cc
@@ -36,7 +36,7 @@ TrayPopupHeaderButton::TrayPopupHeaderButton(views::ButtonListener* listener,
SetImageAlignment(views::ImageButton::ALIGN_CENTER,
views::ImageButton::ALIGN_MIDDLE);
SetAccessibleName(bundle.GetLocalizedString(accessible_name_id));
- set_focusable(true);
+ SetFocusable(true);
set_request_focus_on_press(false);
SetFocusPainter(views::Painter::CreateSolidFocusPainter(
diff --git a/ash/system/tray/tray_popup_label_button.cc b/ash/system/tray/tray_popup_label_button.cc
index 2f97c37..5b00c02 100644
--- a/ash/system/tray/tray_popup_label_button.cc
+++ b/ash/system/tray/tray_popup_label_button.cc
@@ -17,7 +17,7 @@ TrayPopupLabelButton::TrayPopupLabelButton(views::ButtonListener* listener,
const base::string16& text)
: views::LabelButton(listener, text) {
set_border(new TrayPopupLabelButtonBorder);
- set_focusable(true);
+ SetFocusable(true);
set_request_focus_on_press(false);
set_animate_on_state_change(false);
SetHorizontalAlignment(gfx::ALIGN_CENTER);
diff --git a/ash/wm/immersive_fullscreen_controller_unittest.cc b/ash/wm/immersive_fullscreen_controller_unittest.cc
index 94e3f01..7e50916 100644
--- a/ash/wm/immersive_fullscreen_controller_unittest.cc
+++ b/ash/wm/immersive_fullscreen_controller_unittest.cc
@@ -131,7 +131,7 @@ class ImmersiveFullscreenControllerTest : public ash::test::AshTestBase {
top_container_ = new views::View();
top_container_->SetBounds(
0, 0, widget_->GetWindowBoundsInScreen().width(), 100);
- top_container_->set_focusable(true);
+ top_container_->SetFocusable(true);
widget_->GetContentsView()->AddChildView(top_container_);
delegate_.reset(
@@ -684,11 +684,11 @@ TEST_F(ImmersiveFullscreenControllerTest, Focus) {
// test.
views::View* child_view = new views::View();
child_view->SetBounds(0, 0, 10, 10);
- child_view->set_focusable(true);
+ child_view->SetFocusable(true);
top_container()->AddChildView(child_view);
views::View* unrelated_view = new views::View();
unrelated_view->SetBounds(0, 100, 10, 10);
- unrelated_view->set_focusable(true);
+ unrelated_view->SetFocusable(true);
top_container()->parent()->AddChildView(unrelated_view);
views::FocusManager* focus_manager =
top_container()->GetWidget()->GetFocusManager();
diff --git a/chrome/browser/chromeos/options/wifi_config_view.cc b/chrome/browser/chromeos/options/wifi_config_view.cc
index a27cab7..8bd223d 100644
--- a/chrome/browser/chromeos/options/wifi_config_view.cc
+++ b/chrome/browser/chromeos/options/wifi_config_view.cc
@@ -1084,7 +1084,7 @@ void WifiConfigView::Init(bool show_8021x) {
} else {
// Password visible button.
passphrase_visible_button_ = new views::ToggleImageButton(this);
- passphrase_visible_button_->set_focusable(true);
+ passphrase_visible_button_->SetFocusable(true);
passphrase_visible_button_->SetTooltipText(
l10n_util::GetStringUTF16(
IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_PASSPHRASE_SHOW));
diff --git a/chrome/browser/chromeos/options/wimax_config_view.cc b/chrome/browser/chromeos/options/wimax_config_view.cc
index 99ff882..6a8e57f 100644
--- a/chrome/browser/chromeos/options/wimax_config_view.cc
+++ b/chrome/browser/chromeos/options/wimax_config_view.cc
@@ -269,7 +269,7 @@ void WimaxConfigView::Init() {
} else {
// Password visible button.
passphrase_visible_button_ = new views::ToggleImageButton(this);
- passphrase_visible_button_->set_focusable(true);
+ passphrase_visible_button_->SetFocusable(true);
passphrase_visible_button_->SetTooltipText(
l10n_util::GetStringUTF16(
IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_PASSPHRASE_SHOW));
diff --git a/chrome/browser/ui/views/accessibility/accessibility_event_router_views_unittest.cc b/chrome/browser/ui/views/accessibility/accessibility_event_router_views_unittest.cc
index 48ffdb0..02c0b8d 100644
--- a/chrome/browser/ui/views/accessibility/accessibility_event_router_views_unittest.cc
+++ b/chrome/browser/ui/views/accessibility/accessibility_event_router_views_unittest.cc
@@ -329,7 +329,7 @@ TEST_F(AccessibilityEventRouterViewsTest, StateChangeAfterNotification) {
ViewWithNameAndRole* child = new ViewWithNameAndRole(
ASCIIToUTF16(kOldNameASCII),
ui::AccessibilityTypes::ROLE_PUSHBUTTON);
- child->set_focusable(true);
+ child->SetFocusable(true);
contents->AddChildView(child);
// Put the view in a window.
@@ -365,7 +365,7 @@ TEST_F(AccessibilityEventRouterViewsTest, NotificationOnDeletedObject) {
ViewWithNameAndRole* child = new ViewWithNameAndRole(
ASCIIToUTF16(kNameASCII),
ui::AccessibilityTypes::ROLE_PUSHBUTTON);
- child->set_focusable(true);
+ child->SetFocusable(true);
contents->AddChildView(child);
// Put the view in a window.
diff --git a/chrome/browser/ui/views/autofill/autofill_dialog_views.cc b/chrome/browser/ui/views/autofill/autofill_dialog_views.cc
index 514519a..928603e 100644
--- a/chrome/browser/ui/views/autofill/autofill_dialog_views.cc
+++ b/chrome/browser/ui/views/autofill/autofill_dialog_views.cc
@@ -479,7 +479,7 @@ AutofillDialogViews::AccountChooser::AccountChooser(
gfx::Insets insets = GetInsets();
menu_button_->SetFocusPainter(
views::Painter::CreateDashedFocusPainterWithInsets(insets));
- menu_button_->set_focusable(true);
+ menu_button_->SetFocusable(true);
AddChildView(menu_button_);
link_->set_listener(this);
@@ -945,7 +945,7 @@ AutofillDialogViews::SuggestedButton::SuggestedButton(
-kFocusBorderWidth, -kFocusBorderWidth);
SetFocusPainter(
views::Painter::CreateDashedFocusPainterWithInsets(insets));
- set_focusable(true);
+ SetFocusable(true);
}
AutofillDialogViews::SuggestedButton::~SuggestedButton() {}
diff --git a/chrome/browser/ui/views/autofill/autofill_dialog_views_unittest.cc b/chrome/browser/ui/views/autofill/autofill_dialog_views_unittest.cc
index e294774..f9c27a8 100644
--- a/chrome/browser/ui/views/autofill/autofill_dialog_views_unittest.cc
+++ b/chrome/browser/ui/views/autofill/autofill_dialog_views_unittest.cc
@@ -90,11 +90,11 @@ class AutofillDialogViewsTest : public TestWithBrowserView {
protected:
void SetSectionsFocusable() {
- dialog()->GetLoadingShieldForTesting()->set_focusable(true);
+ dialog()->GetLoadingShieldForTesting()->SetFocusable(true);
// The sign in web view is not focusable until a web contents is created.
// TODO(dbeam): figure out how to create a web contents on the right thread.
- dialog()->GetNotificationAreaForTesting()->set_focusable(true);
- dialog()->GetScrollableAreaForTesting()->set_focusable(true);
+ dialog()->GetNotificationAreaForTesting()->SetFocusable(true);
+ dialog()->GetScrollableAreaForTesting()->SetFocusable(true);
}
private:
diff --git a/chrome/browser/ui/views/autofill/tooltip_icon.cc b/chrome/browser/ui/views/autofill/tooltip_icon.cc
index 9b866aa..e25b990 100644
--- a/chrome/browser/ui/views/autofill/tooltip_icon.cc
+++ b/chrome/browser/ui/views/autofill/tooltip_icon.cc
@@ -54,7 +54,7 @@ TooltipIcon::TooltipIcon(const base::string16& tooltip)
mouse_inside_(false),
bubble_(NULL) {
ChangeImageTo(IDR_AUTOFILL_TOOLTIP_ICON);
- set_focusable(true);
+ SetFocusable(true);
}
TooltipIcon::~TooltipIcon() {
diff --git a/chrome/browser/ui/views/avatar_menu_bubble_view.cc b/chrome/browser/ui/views/avatar_menu_bubble_view.cc
index 31c2377..35dba8d 100644
--- a/chrome/browser/ui/views/avatar_menu_bubble_view.cc
+++ b/chrome/browser/ui/views/avatar_menu_bubble_view.cc
@@ -721,7 +721,7 @@ void AvatarMenuBubbleView::InitMenuContents(
avatar_menu_.get());
item_view->SetAccessibleName(l10n_util::GetStringFUTF16(
IDS_PROFILES_SWITCH_TO_PROFILE_ACCESSIBLE_NAME, item.name));
- item_view->set_focusable(true);
+ item_view->SetFocusable(true);
AddChildView(item_view);
item_views_.push_back(item_view);
}
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_instructions_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_instructions_view.cc
index d2e72a3..d13c063 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bar_instructions_view.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_instructions_view.cc
@@ -40,7 +40,7 @@ BookmarkBarInstructionsView::BookmarkBarInstructionsView(
import_link_ = new views::Link(
l10n_util::GetStringUTF16(IDS_BOOKMARK_BAR_IMPORT_LINK));
// We don't want the link to alter tab navigation.
- import_link_->set_focusable(false);
+ import_link_->SetFocusable(false);
import_link_->set_listener(this);
import_link_->set_context_menu_controller(this);
import_link_->SetAutoColorReadabilityEnabled(false);
diff --git a/chrome/browser/ui/views/desktop_media_picker_views.cc b/chrome/browser/ui/views/desktop_media_picker_views.cc
index 191af32..cb9007f 100644
--- a/chrome/browser/ui/views/desktop_media_picker_views.cc
+++ b/chrome/browser/ui/views/desktop_media_picker_views.cc
@@ -215,7 +215,7 @@ DesktopMediaSourceView::DesktopMediaSourceView(
selected_(false) {
AddChildView(image_view_);
AddChildView(label_);
- set_focusable(true);
+ SetFocusable(true);
}
DesktopMediaSourceView::~DesktopMediaSourceView() {}
diff --git a/chrome/browser/ui/views/download/download_item_view.cc b/chrome/browser/ui/views/download/download_item_view.cc
index 71dfacd..ee6ca0e 100644
--- a/chrome/browser/ui/views/download/download_item_view.cc
+++ b/chrome/browser/ui/views/download/download_item_view.cc
@@ -205,7 +205,7 @@ DownloadItemView::DownloadItemView(DownloadItem* download_item,
body_hover_animation_.reset(new gfx::SlideAnimation(this));
drop_hover_animation_.reset(new gfx::SlideAnimation(this));
- set_accessibility_focusable(true);
+ SetAccessibilityFocusable(true);
OnDownloadUpdated(download());
UpdateDropDownButtonPosition();
diff --git a/chrome/browser/ui/views/extensions/extension_view_views.cc b/chrome/browser/ui/views/extensions/extension_view_views.cc
index 6f73c07..f94a4f2 100644
--- a/chrome/browser/ui/views/extensions/extension_view_views.cc
+++ b/chrome/browser/ui/views/extensions/extension_view_views.cc
@@ -29,7 +29,7 @@ ExtensionViewViews::ExtensionViewViews(extensions::ExtensionHost* host,
// This view needs to be focusable so it can act as the focused view for the
// focus manager. This is required to have SkipDefaultKeyEventProcessing
// called so the tab key events are forwarded to the renderer.
- set_focusable(true);
+ SetFocusable(true);
}
ExtensionViewViews::~ExtensionViewViews() {
diff --git a/chrome/browser/ui/views/find_bar_view.cc b/chrome/browser/ui/views/find_bar_view.cc
index bb7c8b2..36c8893 100644
--- a/chrome/browser/ui/views/find_bar_view.cc
+++ b/chrome/browser/ui/views/find_bar_view.cc
@@ -99,7 +99,7 @@ FindBarView::FindBarView(FindBarHost* host)
find_previous_button_ = new views::ImageButton(this);
find_previous_button_->set_tag(FIND_PREVIOUS_TAG);
- find_previous_button_->set_focusable(true);
+ find_previous_button_->SetFocusable(true);
find_previous_button_->SetImage(views::CustomButton::STATE_NORMAL,
rb.GetImageSkiaNamed(IDR_FINDINPAGE_PREV));
find_previous_button_->SetImage(views::CustomButton::STATE_HOVERED,
@@ -116,7 +116,7 @@ FindBarView::FindBarView(FindBarHost* host)
find_next_button_ = new views::ImageButton(this);
find_next_button_->set_tag(FIND_NEXT_TAG);
- find_next_button_->set_focusable(true);
+ find_next_button_->SetFocusable(true);
find_next_button_->SetImage(views::CustomButton::STATE_NORMAL,
rb.GetImageSkiaNamed(IDR_FINDINPAGE_NEXT));
find_next_button_->SetImage(views::CustomButton::STATE_HOVERED,
@@ -133,7 +133,7 @@ FindBarView::FindBarView(FindBarHost* host)
close_button_ = new views::ImageButton(this);
close_button_->set_tag(CLOSE_TAG);
- close_button_->set_focusable(true);
+ close_button_->SetFocusable(true);
close_button_->SetImage(views::CustomButton::STATE_NORMAL,
rb.GetImageSkiaNamed(IDR_CLOSE_1));
close_button_->SetImage(views::CustomButton::STATE_HOVERED,
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index 4efc214..e856e99 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -1822,7 +1822,7 @@ void BrowserView::Layout() {
views::View::Layout();
// TODO(jamescook): Why was this in the middle of layout code?
- toolbar_->location_bar()->omnibox_view()->set_focusable(IsToolbarVisible());
+ toolbar_->location_bar()->omnibox_view()->SetFocusable(IsToolbarVisible());
// The status bubble position requires that all other layout finish first.
LayoutStatusBubble();
diff --git a/chrome/browser/ui/views/fullscreen_exit_bubble_views.cc b/chrome/browser/ui/views/fullscreen_exit_bubble_views.cc
index d8b43df..ec7c5c2 100644
--- a/chrome/browser/ui/views/fullscreen_exit_bubble_views.cc
+++ b/chrome/browser/ui/views/fullscreen_exit_bubble_views.cc
@@ -66,12 +66,12 @@ ButtonView::ButtonView(views::ButtonListener* listener,
deny_button_(NULL) {
accept_button_ = new views::LabelButton(listener, base::string16());
accept_button_->SetStyle(views::Button::STYLE_NATIVE_TEXTBUTTON);
- accept_button_->set_focusable(false);
+ accept_button_->SetFocusable(false);
AddChildView(accept_button_);
deny_button_ = new views::LabelButton(listener, base::string16());
deny_button_->SetStyle(views::Button::STYLE_NATIVE_TEXTBUTTON);
- deny_button_->set_focusable(false);
+ deny_button_->SetFocusable(false);
AddChildView(deny_button_);
SetLayoutManager(new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0,
@@ -138,7 +138,7 @@ FullscreenExitBubbleViews::FullscreenExitView::FullscreenExitView(
SK_ColorWHITE);
set_background(new views::BubbleBackground(bubble_border));
set_border(bubble_border);
- set_focusable(false);
+ SetFocusable(false);
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
message_label_ = new views::Label();
@@ -152,7 +152,7 @@ FullscreenExitBubbleViews::FullscreenExitView::FullscreenExitView(
link_ = new views::Link();
link_->set_collapse_when_hidden(true);
- link_->set_focusable(false);
+ link_->SetFocusable(false);
#if defined(OS_CHROMEOS)
// On CrOS, the link text doesn't change, since it doesn't show the shortcut.
link_->SetText(l10n_util::GetStringUTF16(IDS_EXIT_FULLSCREEN_MODE));
diff --git a/chrome/browser/ui/views/infobars/extension_infobar.cc b/chrome/browser/ui/views/infobars/extension_infobar.cc
index ca284cf..236c97d 100644
--- a/chrome/browser/ui/views/infobars/extension_infobar.cc
+++ b/chrome/browser/ui/views/infobars/extension_infobar.cc
@@ -123,7 +123,7 @@ void ExtensionInfoBar::ViewHierarchyChanged(
if (extension_view_host->extension()->ShowConfigureContextMenus()) {
icon_as_menu_ = new views::MenuButton(NULL, base::string16(), this, false);
- icon_as_menu_->set_focusable(true);
+ icon_as_menu_->SetFocusable(true);
infobar_icon_ = icon_as_menu_;
} else {
icon_as_image_ = new views::ImageView();
diff --git a/chrome/browser/ui/views/infobars/infobar_view.cc b/chrome/browser/ui/views/infobars/infobar_view.cc
index f75d3d3..5b81098 100644
--- a/chrome/browser/ui/views/infobars/infobar_view.cc
+++ b/chrome/browser/ui/views/infobars/infobar_view.cc
@@ -97,7 +97,7 @@ views::Link* InfoBarView::CreateLink(const base::string16& text,
link->SetHorizontalAlignment(gfx::ALIGN_LEFT);
link->set_listener(listener);
link->SetBackgroundColor(background()->get_color());
- link->set_focusable(true);
+ link->SetFocusable(true);
return link;
}
@@ -127,7 +127,7 @@ views::MenuButton* InfoBarView::CreateMenuButton(
menu_button->SetEnabledColor(SK_ColorBLACK);
menu_button->SetHoverColor(SK_ColorBLACK);
menu_button->SetFont(rb.GetFont(ui::ResourceBundle::MediumFont));
- menu_button->set_focusable(true);
+ menu_button->SetFocusable(true);
return menu_button;
}
@@ -183,7 +183,7 @@ views::LabelButton* InfoBarView::CreateLabelButton(
}
}
#endif
- label_button->set_focusable(true);
+ label_button->SetFocusable(true);
return label_button;
}
@@ -271,7 +271,7 @@ void InfoBarView::ViewHierarchyChanged(
rb.GetImageNamed(IDR_CLOSE_1_P).ToImageSkia());
close_button_->SetAccessibleName(
l10n_util::GetStringUTF16(IDS_ACCNAME_CLOSE));
- close_button_->set_focusable(true);
+ close_button_->SetFocusable(true);
AddChildView(close_button_);
} else if ((close_button_ != NULL) && (details.parent == this) &&
(details.child != close_button_) && (close_button_->parent() == this) &&
diff --git a/chrome/browser/ui/views/location_bar/bubble_icon_view.cc b/chrome/browser/ui/views/location_bar/bubble_icon_view.cc
index 2f1e9d9..001e1e4 100644
--- a/chrome/browser/ui/views/location_bar/bubble_icon_view.cc
+++ b/chrome/browser/ui/views/location_bar/bubble_icon_view.cc
@@ -13,7 +13,7 @@ BubbleIconView::BubbleIconView(CommandUpdater* command_updater, int command_id)
: command_updater_(command_updater),
command_id_(command_id),
suppress_mouse_released_action_(false) {
- set_accessibility_focusable(true);
+ SetAccessibilityFocusable(true);
LocationBarView::InitTouchableLocationBarChildView(this);
}
diff --git a/chrome/browser/ui/views/location_bar/location_bar_decoration_view.cc b/chrome/browser/ui/views/location_bar/location_bar_decoration_view.cc
index 67f87bf..be27dca 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_decoration_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_decoration_view.cc
@@ -9,7 +9,7 @@
LocationBarDecorationView::LocationBarDecorationView()
: could_handle_click_(true) {
- set_accessibility_focusable(true);
+ SetAccessibilityFocusable(true);
LocationBarView::InitTouchableLocationBarChildView(this);
}
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
index 9b24d42..4b80b09 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -278,7 +278,7 @@ void LocationBarView::Init() {
omnibox_view_ = new OmniboxViewViews(this, profile_, command_updater(),
is_popup_mode_, this, font_list);
omnibox_view_->Init();
- omnibox_view_->set_focusable(true);
+ omnibox_view_->SetFocusable(true);
AddChildView(omnibox_view_);
// Initialize the inline autocomplete view which is visible only when IME is
@@ -316,7 +316,7 @@ void LocationBarView::Init() {
mic_search_view_ = new views::ImageButton(this);
mic_search_view_->set_id(VIEW_ID_MIC_SEARCH_BUTTON);
- mic_search_view_->set_accessibility_focusable(true);
+ mic_search_view_->SetAccessibilityFocusable(true);
mic_search_view_->SetTooltipText(
l10n_util::GetStringUTF16(IDS_TOOLTIP_MIC_SEARCH));
mic_search_view_->SetImage(
@@ -369,7 +369,7 @@ void LocationBarView::Init() {
search_button_->set_triggerable_event_flags(
ui::EF_LEFT_MOUSE_BUTTON | ui::EF_MIDDLE_MOUSE_BUTTON);
search_button_->SetStyle(views::Button::STYLE_BUTTON);
- search_button_->set_focusable(false);
+ search_button_->SetFocusable(false);
search_button_->set_min_size(gfx::Size());
views::LabelButtonBorder* search_button_border =
static_cast<views::LabelButtonBorder*>(search_button_->border());
diff --git a/chrome/browser/ui/views/location_bar/open_pdf_in_reader_view.cc b/chrome/browser/ui/views/location_bar/open_pdf_in_reader_view.cc
index 33607ad..68c4e01 100644
--- a/chrome/browser/ui/views/location_bar/open_pdf_in_reader_view.cc
+++ b/chrome/browser/ui/views/location_bar/open_pdf_in_reader_view.cc
@@ -18,7 +18,7 @@ OpenPDFInReaderView::OpenPDFInReaderView(LocationBarView* location_bar_view)
: location_bar_view_(location_bar_view),
bubble_(NULL),
model_(NULL) {
- set_accessibility_focusable(true);
+ SetAccessibilityFocusable(true);
SetImage(ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
IDR_OMNIBOX_PDF_ICON));
SetTooltipText(l10n_util::GetStringUTF16(IDS_PDF_BUBBLE_OPEN_IN_READER_LINK));
diff --git a/chrome/browser/ui/views/location_bar/page_action_image_view.cc b/chrome/browser/ui/views/location_bar/page_action_image_view.cc
index 28c8d3e..49c773c 100644
--- a/chrome/browser/ui/views/location_bar/page_action_image_view.cc
+++ b/chrome/browser/ui/views/location_bar/page_action_image_view.cc
@@ -54,7 +54,7 @@ PageActionImageView::PageActionImageView(LocationBarView* owner,
new ExtensionActionIconFactory(
owner_->profile(), extension, page_action, this));
- set_accessibility_focusable(true);
+ SetAccessibilityFocusable(true);
set_context_menu_controller(this);
extensions::CommandService* command_service =
diff --git a/chrome/browser/ui/views/location_bar/script_bubble_icon_view.cc b/chrome/browser/ui/views/location_bar/script_bubble_icon_view.cc
index 82952c5..0e3c8dc 100644
--- a/chrome/browser/ui/views/location_bar/script_bubble_icon_view.cc
+++ b/chrome/browser/ui/views/location_bar/script_bubble_icon_view.cc
@@ -24,7 +24,7 @@ ScriptBubbleIconView::ScriptBubbleIconView(
script_count_(0) {
set_id(VIEW_ID_SCRIPT_BUBBLE);
SetTooltipText(l10n_util::GetStringUTF16(IDS_TOOLTIP_SCRIPT_BUBBLE));
- set_accessibility_focusable(true);
+ SetAccessibilityFocusable(true);
LocationBarView::InitTouchableLocationBarChildView(this);
}
diff --git a/chrome/browser/ui/views/location_bar/zoom_view.cc b/chrome/browser/ui/views/location_bar/zoom_view.cc
index 2be60c5..aca3096 100644
--- a/chrome/browser/ui/views/location_bar/zoom_view.cc
+++ b/chrome/browser/ui/views/location_bar/zoom_view.cc
@@ -18,7 +18,7 @@
ZoomView::ZoomView(LocationBarView::Delegate* location_bar_delegate)
: location_bar_delegate_(location_bar_delegate) {
- set_accessibility_focusable(true);
+ SetAccessibilityFocusable(true);
Update(NULL);
LocationBarView::InitTouchableLocationBarChildView(this);
}
diff --git a/chrome/browser/ui/views/native_widget_win_interactive_uitest.cc b/chrome/browser/ui/views/native_widget_win_interactive_uitest.cc
index 6dd66d3..05cbbbe 100644
--- a/chrome/browser/ui/views/native_widget_win_interactive_uitest.cc
+++ b/chrome/browser/ui/views/native_widget_win_interactive_uitest.cc
@@ -85,7 +85,7 @@ class NativeWidgetWinTest1 : public NativeWidgetWinTest {
child_->Init(child_params);
native_view_host_ = new views::NativeViewHost;
- native_view_host_->set_focusable(true);
+ native_view_host_->SetFocusable(true);
contents_view_->AddChildView(native_view_host_);
native_view_host_->SetBoundsRect(gfx::Rect(0, 0, 200, 200));
native_view_host_->Attach(child_->GetNativeView());
diff --git a/chrome/browser/ui/views/passwords/manage_password_item_view.cc b/chrome/browser/ui/views/passwords/manage_password_item_view.cc
index 49693de..92e7ad6 100644
--- a/chrome/browser/ui/views/passwords/manage_password_item_view.cc
+++ b/chrome/browser/ui/views/passwords/manage_password_item_view.cc
@@ -65,7 +65,7 @@ ManagePasswordItemView::ManagePasswordItemView(
new views::Link(GetPasswordDisplayString(password_form_.password_value));
label_2_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
label_2_->set_listener(this);
- label_2_->set_focusable(false);
+ label_2_->SetFocusable(false);
label_2_->SetEnabled(false);
label_2_->SetUnderline(false);
diff --git a/chrome/browser/ui/views/passwords/manage_passwords_icon_view.cc b/chrome/browser/ui/views/passwords/manage_passwords_icon_view.cc
index e1ad5e7..76b21cf 100644
--- a/chrome/browser/ui/views/passwords/manage_passwords_icon_view.cc
+++ b/chrome/browser/ui/views/passwords/manage_passwords_icon_view.cc
@@ -15,7 +15,7 @@
ManagePasswordsIconView::ManagePasswordsIconView(
LocationBarView::Delegate* location_bar_delegate)
: location_bar_delegate_(location_bar_delegate) {
- set_accessibility_focusable(true);
+ SetAccessibilityFocusable(true);
Update(NULL);
LocationBarView::InitTouchableLocationBarChildView(this);
}
diff --git a/chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc b/chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc
index acf720d..9c707e0 100644
--- a/chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc
+++ b/chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc
@@ -117,7 +117,7 @@ views::View* ProfileSigninConfirmationDialogViews::CreateExtraView() {
continue_signin_button_ =
new views::LabelButton(this, continue_signin_text);
continue_signin_button_->SetStyle(views::Button::STYLE_NATIVE_TEXTBUTTON);
- continue_signin_button_->set_focusable(true);
+ continue_signin_button_->SetFocusable(true);
}
return continue_signin_button_;
}
diff --git a/chrome/browser/ui/views/toolbar/toolbar_button.cc b/chrome/browser/ui/views/toolbar/toolbar_button.cc
index 9017f96..1be0c140 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_button.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_button.cc
@@ -32,7 +32,7 @@ ToolbarButton::~ToolbarButton() {
}
void ToolbarButton::Init() {
- set_focusable(true);
+ SetFocusable(true);
// Provides the hover/pressed style used by buttons in the toolbar.
views::LabelButtonBorder* border =
diff --git a/chrome/browser/ui/views/toolbar/wrench_menu.cc b/chrome/browser/ui/views/toolbar/wrench_menu.cc
index c6f833b..a82b5f2 100644
--- a/chrome/browser/ui/views/toolbar/wrench_menu.cc
+++ b/chrome/browser/ui/views/toolbar/wrench_menu.cc
@@ -391,7 +391,7 @@ class WrenchMenuView : public views::View,
l10n_util::GetStringUTF16(string_id), '&', NULL, NULL));
button->SetAccessibleName(
GetAccessibleNameForWrenchMenuItem(menu_model_, index, acc_string_id));
- button->set_focusable(true);
+ button->SetFocusable(true);
button->set_request_focus_on_press(false);
button->set_tag(index);
button->SetEnabled(menu_model_->IsEnabledAt(index));
@@ -664,7 +664,7 @@ class WrenchMenu::ZoomView : public WrenchMenuView {
disabled_text_color);
increment_button_->SetTextColor(views::Button::STATE_DISABLED,
disabled_text_color);
- fullscreen_button_->set_focusable(true);
+ fullscreen_button_->SetFocusable(true);
fullscreen_button_->set_request_focus_on_press(false);
fullscreen_button_->set_tag(fullscreen_index);
fullscreen_button_->SetImageAlignment(
diff --git a/chrome/browser/ui/views/website_settings/permission_selector_view.cc b/chrome/browser/ui/views/website_settings/permission_selector_view.cc
index 2e25363..cad37e8 100644
--- a/chrome/browser/ui/views/website_settings/permission_selector_view.cc
+++ b/chrome/browser/ui/views/website_settings/permission_selector_view.cc
@@ -216,7 +216,7 @@ PermissionSelectorView::PermissionSelectorView(
menu_button_model_.get(),
button_enabled);
menu_button_->SetEnabled(button_enabled);
- menu_button_->set_focusable(button_enabled);
+ menu_button_->SetFocusable(button_enabled);
menu_button_->SetAccessibleName(
WebsiteSettingsUI::PermissionTypeToUIString(type));
layout->AddView(menu_button_);
diff --git a/ui/app_list/views/search_result_actions_view.cc b/ui/app_list/views/search_result_actions_view.cc
index abe796c..ccf848c 100644
--- a/ui/app_list/views/search_result_actions_view.cc
+++ b/ui/app_list/views/search_result_actions_view.cc
@@ -55,7 +55,7 @@ void SearchResultActionsView::CreateBlueButton(
button->SetTooltipText(action.tooltip_text);
button->SetFont(ui::ResourceBundle::GetSharedInstance().GetFont(
ui::ResourceBundle::SmallBoldFont));
- button->set_focusable(false);
+ button->SetFocusable(false);
AddChildView(button);
}
diff --git a/ui/message_center/views/message_center_button_bar.cc b/ui/message_center/views/message_center_button_bar.cc
index 9eb7246..0816ffa 100644
--- a/ui/message_center/views/message_center_button_bar.cc
+++ b/ui/message_center/views/message_center_button_bar.cc
@@ -74,7 +74,7 @@ NotificationCenterButton::NotificationCenterButton(
if (text_id)
SetTooltipText(resource_bundle.GetLocalizedString(text_id));
- set_focusable(true);
+ SetFocusable(true);
set_request_focus_on_press(false);
SetFocusPainter(views::Painter::CreateSolidFocusPainter(
@@ -114,7 +114,7 @@ MessageCenterButtonBar::MessageCenterButtonBar(
title_arrow_->set_size(gfx::Size(kChevronWidth, kButtonSize));
// Keyboardists can use the gear button to switch modes.
- title_arrow_->set_focusable(false);
+ title_arrow_->SetFocusable(false);
AddChildView(title_arrow_);
gfx::Font notification_label_font =
diff --git a/ui/message_center/views/message_center_view.cc b/ui/message_center/views/message_center_view.cc
index ae2a94c..ebdbf33 100644
--- a/ui/message_center/views/message_center_view.cc
+++ b/ui/message_center/views/message_center_view.cc
@@ -1173,7 +1173,7 @@ void MessageCenterView::NotificationsChanged() {
no_message_views ? empty_list_view_.get() : message_list_view_.get());
button_bar_->SetCloseAllButtonEnabled(!no_message_views);
- scroller_->set_focusable(!no_message_views);
+ scroller_->SetFocusable(!no_message_views);
if (focus_manager && focused_view)
focus_manager->SetFocusedView(focused_view);
diff --git a/ui/message_center/views/message_view.cc b/ui/message_center/views/message_view.cc
index 2c37bac..ccf1074 100644
--- a/ui/message_center/views/message_view.cc
+++ b/ui/message_center/views/message_view.cc
@@ -175,7 +175,7 @@ MessageView::MessageView(MessageViewController* controller,
notifier_id,
display_source)),
scroller_(NULL) {
- set_focusable(true);
+ SetFocusable(true);
set_context_menu_controller(context_menu_controller_.get());
PaddedButton *close = new PaddedButton(this);
diff --git a/ui/message_center/views/notification_button.cc b/ui/message_center/views/notification_button.cc
index a0243f8..7ef5295 100644
--- a/ui/message_center/views/notification_button.cc
+++ b/ui/message_center/views/notification_button.cc
@@ -23,7 +23,7 @@ NotificationButton::NotificationButton(views::ButtonListener* listener)
focus_painter_(views::Painter::CreateSolidFocusPainter(
message_center::kFocusBorderColor,
gfx::Insets(1, 2, 2, 2))) {
- set_focusable(true);
+ SetFocusable(true);
set_request_focus_on_press(false);
set_notify_enter_exit_on_child(true);
SetLayoutManager(
diff --git a/ui/message_center/views/notifier_settings_view.cc b/ui/message_center/views/notifier_settings_view.cc
index 399283b..e345d93 100644
--- a/ui/message_center/views/notifier_settings_view.cc
+++ b/ui/message_center/views/notifier_settings_view.cc
@@ -306,7 +306,7 @@ NotifierSettingsView::NotifierButton::NotifierButton(
checkbox_->SetChecked(notifier_->enabled);
checkbox_->set_listener(this);
- checkbox_->set_focusable(false);
+ checkbox_->SetFocusable(false);
checkbox_->SetAccessibleName(notifier_->name);
if (ShouldHaveLearnMoreButton()) {
@@ -314,7 +314,7 @@ NotifierSettingsView::NotifierButton::NotifierButton(
learn_more_ = new views::ImageButton(this);
learn_more_->SetFocusPainter(CreateFocusPainter());
learn_more_->set_request_focus_on_press(false);
- learn_more_->set_focusable(true);
+ learn_more_->SetFocusable(true);
ui::ResourceBundle& rb = ResourceBundle::GetSharedInstance();
learn_more_->SetImage(
@@ -483,7 +483,7 @@ NotifierSettingsView::NotifierSettingsView(NotifierSettingsProvider* provider)
if (provider_)
provider_->AddObserver(this);
- set_focusable(true);
+ SetFocusable(true);
set_background(
views::Background::CreateSolidBackground(kMessageCenterBackgroundColor));
if (get_use_acceleration_when_possible())
@@ -601,7 +601,7 @@ void NotifierSettingsView::UpdateContentsView(
notifier_group_selector_->set_border(selector_border.release());
notifier_group_selector_->SetFocusPainter(scoped_ptr<views::Painter>());
notifier_group_selector_->set_animate_on_state_change(false);
- notifier_group_selector_->set_focusable(true);
+ notifier_group_selector_->SetFocusable(true);
contents_title_view->AddChildView(notifier_group_selector_);
}
@@ -627,7 +627,7 @@ void NotifierSettingsView::UpdateContentsView(
settings::kEntrySeparatorColor));
}
entry->set_border(entry_border.release());
- entry->set_focusable(true);
+ entry->SetFocusable(true);
contents_view->AddChildView(entry);
buttons_.insert(button);
}
diff --git a/ui/message_center/views/padded_button.cc b/ui/message_center/views/padded_button.cc
index 2504a37..182cde6 100644
--- a/ui/message_center/views/padded_button.cc
+++ b/ui/message_center/views/padded_button.cc
@@ -15,7 +15,7 @@ namespace message_center {
PaddedButton::PaddedButton(views::ButtonListener* listener)
: views::ImageButton(listener) {
- set_focusable(true);
+ SetFocusable(true);
set_request_focus_on_press(false);
SetFocusPainter(views::Painter::CreateSolidFocusPainter(
kFocusBorderColor,
diff --git a/ui/views/bubble/bubble_delegate_unittest.cc b/ui/views/bubble/bubble_delegate_unittest.cc
index 9104900..7e2c718f 100644
--- a/ui/views/bubble/bubble_delegate_unittest.cc
+++ b/ui/views/bubble/bubble_delegate_unittest.cc
@@ -24,7 +24,7 @@ class TestBubbleDelegateView : public BubbleDelegateView {
TestBubbleDelegateView(View* anchor_view)
: BubbleDelegateView(anchor_view, BubbleBorder::TOP_LEFT),
view_(new View()) {
- view_->set_focusable(true);
+ view_->SetFocusable(true);
AddChildView(view_);
}
virtual ~TestBubbleDelegateView() {}
diff --git a/ui/views/color_chooser/color_chooser_view.cc b/ui/views/color_chooser/color_chooser_view.cc
index 1ccc12b..3c649f9 100644
--- a/ui/views/color_chooser/color_chooser_view.cc
+++ b/ui/views/color_chooser/color_chooser_view.cc
@@ -137,7 +137,7 @@ class ColorChooserView::HueView : public LocatedEventHandlerView {
ColorChooserView::HueView::HueView(ColorChooserView* chooser_view)
: chooser_view_(chooser_view),
level_(0) {
- set_focusable(false);
+ SetFocusable(false);
}
void ColorChooserView::HueView::OnHueChanged(SkScalar hue) {
@@ -251,7 +251,7 @@ ColorChooserView::SaturationValueView::SaturationValueView(
ColorChooserView* chooser_view)
: chooser_view_(chooser_view),
hue_(0) {
- set_focusable(false);
+ SetFocusable(false);
set_border(Border::CreateSolidBorder(kBorderWidth, SK_ColorGRAY));
}
@@ -346,7 +346,7 @@ class ColorChooserView::SelectedColorPatchView : public views::View {
};
ColorChooserView::SelectedColorPatchView::SelectedColorPatchView() {
- set_focusable(false);
+ SetFocusable(false);
SetVisible(true);
set_border(Border::CreateSolidBorder(kBorderWidth, SK_ColorGRAY));
}
@@ -368,7 +368,7 @@ ColorChooserView::ColorChooserView(ColorChooserListener* listener,
: listener_(listener) {
DCHECK(listener_);
- set_focusable(false);
+ SetFocusable(false);
set_background(Background::CreateSolidBackground(SK_ColorLTGRAY));
SetLayoutManager(new BoxLayout(BoxLayout::kVertical, kMarginWidth,
kMarginWidth, kMarginWidth));
diff --git a/ui/views/controls/button/button.cc b/ui/views/controls/button/button.cc
index eccec03..96e2e27 100644
--- a/ui/views/controls/button/button.cc
+++ b/ui/views/controls/button/button.cc
@@ -48,7 +48,7 @@ void Button::GetAccessibleState(ui::AccessibleViewState* state) {
Button::Button(ButtonListener* listener)
: listener_(listener),
tag_(-1) {
- set_accessibility_focusable(true);
+ SetAccessibilityFocusable(true);
}
void Button::NotifyClick(const ui::Event& event) {
diff --git a/ui/views/controls/button/checkbox.cc b/ui/views/controls/button/checkbox.cc
index ae263e3..ec33a47 100644
--- a/ui/views/controls/button/checkbox.cc
+++ b/ui/views/controls/button/checkbox.cc
@@ -24,7 +24,7 @@ Checkbox::Checkbox(const string16& label)
button_border->SetPainter(false, STATE_PRESSED, NULL);
// Inset the trailing side by a couple pixels for the focus border.
button_border->set_insets(gfx::Insets(0, 0, 0, 2));
- set_focusable(true);
+ SetFocusable(true);
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
diff --git a/ui/views/controls/button/custom_button.h b/ui/views/controls/button/custom_button.h
index c769d1b..9ac502d 100644
--- a/ui/views/controls/button/custom_button.h
+++ b/ui/views/controls/button/custom_button.h
@@ -21,7 +21,7 @@ class CustomButtonStateChangedDelegate;
// A button with custom rendering. The common base class of ImageButton and
// TextButton.
// Note that this type of button is not focusable by default and will not be
-// part of the focus chain. Call set_focusable(true) to make it part of the
+// part of the focus chain. Call SetFocusable(true) to make it part of the
// focus chain.
class VIEWS_EXPORT CustomButton : public Button,
public gfx::AnimationDelegate {
diff --git a/ui/views/controls/button/image_button.h b/ui/views/controls/button/image_button.h
index d74eceb..4977b06 100644
--- a/ui/views/controls/button/image_button.h
+++ b/ui/views/controls/button/image_button.h
@@ -18,7 +18,7 @@ class Painter;
// An image button.
// Note that this type of button is not focusable by default and will not be
-// part of the focus chain. Call set_focusable(true) to make it part of the
+// part of the focus chain. Call SetFocusable(true) to make it part of the
// focus chain.
class VIEWS_EXPORT ImageButton : public CustomButton {
diff --git a/ui/views/controls/button/label_button.cc b/ui/views/controls/button/label_button.cc
index 58e3fe6..30db5d1 100644
--- a/ui/views/controls/button/label_button.cc
+++ b/ui/views/controls/button/label_button.cc
@@ -154,7 +154,7 @@ void LabelButton::SetStyle(ButtonStyle style) {
}
if (style == STYLE_BUTTON || style == STYLE_NATIVE_TEXTBUTTON) {
label_->SetHorizontalAlignment(gfx::ALIGN_CENTER);
- set_focusable(true);
+ SetFocusable(true);
}
if (style == STYLE_BUTTON)
set_min_size(gfx::Size(70, 33));
diff --git a/ui/views/controls/button/text_button.h b/ui/views/controls/button/text_button.h
index 18d2ba2..4dc6157 100644
--- a/ui/views/controls/button/text_button.h
+++ b/ui/views/controls/button/text_button.h
@@ -49,7 +49,7 @@ class VIEWS_EXPORT TextButtonBorder : public Border {
// the button frame in the hot/pushed states.
//
// Note that this type of button is not focusable by default and will not be
-// part of the focus chain. Call set_focusable(true) to make it part of the
+// part of the focus chain. Call SetFocusable(true) to make it part of the
// focus chain.
class VIEWS_EXPORT TextButtonDefaultBorder : public TextButtonBorder {
public:
diff --git a/ui/views/controls/combobox/combobox.cc b/ui/views/controls/combobox/combobox.cc
index e366442..ce8d93a 100644
--- a/ui/views/controls/combobox/combobox.cc
+++ b/ui/views/controls/combobox/combobox.cc
@@ -249,7 +249,7 @@ Combobox::Combobox(ui::ComboboxModel* model)
arrow_button_(new TransparentButton(this)) {
model_->AddObserver(this);
UpdateFromModel();
- set_focusable(true);
+ SetFocusable(true);
UpdateBorder();
// Initialize the button images.
@@ -274,8 +274,8 @@ Combobox::Combobox(ui::ComboboxModel* model)
text_button_->SetVisible(true);
arrow_button_->SetVisible(true);
- text_button_->set_focusable(false);
- arrow_button_->set_focusable(false);
+ text_button_->SetFocusable(false);
+ arrow_button_->SetFocusable(false);
AddChildView(text_button_);
AddChildView(arrow_button_);
}
diff --git a/ui/views/controls/label_unittest.cc b/ui/views/controls/label_unittest.cc
index c36b5de..e2a37c3 100644
--- a/ui/views/controls/label_unittest.cc
+++ b/ui/views/controls/label_unittest.cc
@@ -201,7 +201,7 @@ TEST(LabelTest, MultilineSmallAvailableWidthSizing) {
TEST(LabelTest, MultiLineSizing) {
Label label;
- label.set_focusable(false);
+ label.SetFocusable(false);
string16 test_text(
ASCIIToUTF16("A random string\nwith multiple lines\nand returns!"));
label.SetText(test_text);
@@ -322,7 +322,7 @@ TEST(LabelTest, AutoDetectDirectionality) {
TEST(LabelTest, DrawSingleLineString) {
Label label;
- label.set_focusable(false);
+ label.SetFocusable(false);
// Turn off mirroring so that we don't need to figure out if
// align right really means align left.
@@ -458,7 +458,7 @@ TEST(LabelTest, DrawSingleLineString) {
// multiline lables to not ellide in Linux only.
TEST(LabelTest, DrawMultiLineString) {
Label label;
- label.set_focusable(false);
+ label.SetFocusable(false);
// Turn off mirroring so that we don't need to figure out if
// align right really means align left.
@@ -599,7 +599,7 @@ TEST(LabelTest, DrawMultiLineString) {
TEST(LabelTest, DrawSingleLineStringInRTL) {
Label label;
- label.set_focusable(false);
+ label.SetFocusable(false);
std::string locale = l10n_util::GetApplicationLocale("");
base::i18n::SetICUDefaultLocale("he");
@@ -738,7 +738,7 @@ TEST(LabelTest, DrawSingleLineStringInRTL) {
// multiline lables to not ellide in Linux only.
TEST(LabelTest, DrawMultiLineStringInRTL) {
Label label;
- label.set_focusable(false);
+ label.SetFocusable(false);
// Test for RTL.
std::string locale = l10n_util::GetApplicationLocale("");
diff --git a/ui/views/controls/link.cc b/ui/views/controls/link.cc
index 5a5729a..d02a0b8 100644
--- a/ui/views/controls/link.cc
+++ b/ui/views/controls/link.cc
@@ -205,7 +205,7 @@ void Link::Init() {
SetPressedColor(SK_ColorRED);
#endif
RecalculateFont();
- set_focusable(true);
+ SetFocusable(true);
}
void Link::SetPressed(bool pressed) {
diff --git a/ui/views/controls/native_control.cc b/ui/views/controls/native_control.cc
index 3a1fe58..faebbc8 100644
--- a/ui/views/controls/native_control.cc
+++ b/ui/views/controls/native_control.cc
@@ -177,7 +177,7 @@ NativeControl::NativeControl() : hwnd_view_(NULL),
horizontal_alignment_(CENTER),
fixed_height_(-1),
vertical_alignment_(CENTER) {
- set_focusable(true);
+ SetFocusable(true);
}
NativeControl::~NativeControl() {
diff --git a/ui/views/controls/scrollbar/native_scroll_bar_views.cc b/ui/views/controls/scrollbar/native_scroll_bar_views.cc
index 6c3506f..a8402e5 100644
--- a/ui/views/controls/scrollbar/native_scroll_bar_views.cc
+++ b/ui/views/controls/scrollbar/native_scroll_bar_views.cc
@@ -76,8 +76,8 @@ class ScrollBarThumb : public BaseScrollBarThumb {
ScrollBarButton::ScrollBarButton(ButtonListener* listener, Type type)
: BaseScrollBarButton(listener),
type_(type) {
- set_focusable(false);
- set_accessibility_focusable(false);
+ SetFocusable(false);
+ SetAccessibilityFocusable(false);
}
ScrollBarButton::~ScrollBarButton() {
@@ -157,8 +157,8 @@ ui::NativeTheme::State
ScrollBarThumb::ScrollBarThumb(BaseScrollBar* scroll_bar)
: BaseScrollBarThumb(scroll_bar),
scroll_bar_(scroll_bar) {
- set_focusable(false);
- set_accessibility_focusable(false);
+ SetFocusable(false);
+ SetAccessibilityFocusable(false);
}
ScrollBarThumb::~ScrollBarThumb() {
diff --git a/ui/views/controls/separator.cc b/ui/views/controls/separator.cc
index f8ce470..bbac3ed 100644
--- a/ui/views/controls/separator.cc
+++ b/ui/views/controls/separator.cc
@@ -19,7 +19,7 @@ const int kSeparatorHeight = 1;
const SkColor kDefaultColor = SkColorSetARGB(255, 233, 233, 233);
Separator::Separator(Orientation orientation) : orientation_(orientation) {
- set_focusable(false);
+ SetFocusable(false);
}
Separator::~Separator() {
diff --git a/ui/views/controls/slider.cc b/ui/views/controls/slider.cc
index 242ff5e..4be6f5a 100644
--- a/ui/views/controls/slider.cc
+++ b/ui/views/controls/slider.cc
@@ -61,7 +61,7 @@ Slider::Slider(SliderListener* listener, Orientation orientation)
bar_active_images_(kBarImagesActive),
bar_disabled_images_(kBarImagesDisabled) {
EnableCanvasFlippingForRTLUI(true);
- set_focusable(true);
+ SetFocusable(true);
UpdateState(true);
}
diff --git a/ui/views/controls/tabbed_pane/tabbed_pane.cc b/ui/views/controls/tabbed_pane/tabbed_pane.cc
index aa46af6..3f2d5da9 100644
--- a/ui/views/controls/tabbed_pane/tabbed_pane.cc
+++ b/ui/views/controls/tabbed_pane/tabbed_pane.cc
@@ -238,7 +238,7 @@ TabbedPane::TabbedPane()
tab_strip_(new TabStrip(this)),
contents_(new View()),
selected_tab_index_(-1) {
- set_focusable(true);
+ SetFocusable(true);
AddChildView(tab_strip_);
AddChildView(contents_);
}
diff --git a/ui/views/controls/table/table_view.cc b/ui/views/controls/table/table_view.cc
index cf9c0ff..8a27a1f 100644
--- a/ui/views/controls/table/table_view.cc
+++ b/ui/views/controls/table/table_view.cc
@@ -134,7 +134,7 @@ TableView::TableView(ui::TableModel* model,
visible_column.column = columns[i];
visible_columns_.push_back(visible_column);
}
- set_focusable(true);
+ SetFocusable(true);
SetModel(model);
}
diff --git a/ui/views/controls/textfield/textfield.cc b/ui/views/controls/textfield/textfield.cc
index 04003ba..de590dc 100644
--- a/ui/views/controls/textfield/textfield.cc
+++ b/ui/views/controls/textfield/textfield.cc
@@ -72,7 +72,7 @@ Textfield::Textfield()
placeholder_text_color_(kDefaultPlaceholderTextColor),
text_input_type_(ui::TEXT_INPUT_TYPE_TEXT),
weak_ptr_factory_(this) {
- set_focusable(true);
+ SetFocusable(true);
if (ViewsDelegate::views_delegate) {
obscured_reveal_duration_ = ViewsDelegate::views_delegate->
@@ -100,7 +100,7 @@ Textfield::Textfield(StyleFlags style)
placeholder_text_color_(kDefaultPlaceholderTextColor),
text_input_type_(ui::TEXT_INPUT_TYPE_TEXT),
weak_ptr_factory_(this) {
- set_focusable(true);
+ SetFocusable(true);
if (IsObscured())
SetTextInputType(ui::TEXT_INPUT_TYPE_PASSWORD);
diff --git a/ui/views/controls/tree/tree_view.cc b/ui/views/controls/tree/tree_view.cc
index 055b9b9..2c7bd55 100644
--- a/ui/views/controls/tree/tree_view.cc
+++ b/ui/views/controls/tree/tree_view.cc
@@ -80,7 +80,7 @@ TreeView::TreeView()
root_shown_(true),
has_custom_icons_(false),
row_height_(font_.GetHeight() + kTextVerticalPadding * 2) {
- set_focusable(true);
+ SetFocusable(true);
closed_icon_ = *ui::ResourceBundle::GetSharedInstance().GetImageNamed(
(base::i18n::IsRTL() ? IDR_FOLDER_CLOSED_RTL
: IDR_FOLDER_CLOSED)).ToImageSkia();
diff --git a/ui/views/examples/button_example.cc b/ui/views/examples/button_example.cc
index 1bff590..a791559 100644
--- a/ui/views/examples/button_example.cc
+++ b/ui/views/examples/button_example.cc
@@ -49,11 +49,11 @@ void ButtonExample::CreateExampleView(View* container) {
container->SetLayoutManager(new BoxLayout(BoxLayout::kVertical, 10, 10, 10));
text_button_ = new TextButton(this, ASCIIToUTF16(kTextButton));
- text_button_->set_focusable(true);
+ text_button_->SetFocusable(true);
container->AddChildView(text_button_);
label_button_ = new LabelButton(this, ASCIIToUTF16(kLabelButton));
- label_button_->set_focusable(true);
+ label_button_->SetFocusable(true);
container->AddChildView(label_button_);
LabelButton* disabled_button =
@@ -66,7 +66,7 @@ void ButtonExample::CreateExampleView(View* container) {
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
image_button_ = new ImageButton(this);
- image_button_->set_focusable(true);
+ image_button_->SetFocusable(true);
image_button_->SetImage(ImageButton::STATE_NORMAL,
rb.GetImageNamed(IDR_CLOSE).ToImageSkia());
image_button_->SetImage(ImageButton::STATE_HOVERED,
@@ -161,7 +161,7 @@ void ButtonExample::LabelButtonPressed(const ui::Event& event) {
}
} else if (event.IsShiftDown()) {
if (event.IsAltDown()) {
- label_button_->set_focusable(!label_button_->focusable());
+ label_button_->SetFocusable(!label_button_->focusable());
} else {
label_button_->SetStyle(static_cast<Button::ButtonStyle>(
(label_button_->style() + 1) % Button::STYLE_COUNT));
diff --git a/ui/views/examples/tree_view_example.cc b/ui/views/examples/tree_view_example.cc
index a7a51cb..6dfc558 100644
--- a/ui/views/examples/tree_view_example.cc
+++ b/ui/views/examples/tree_view_example.cc
@@ -45,11 +45,11 @@ void TreeViewExample::CreateExampleView(View* container) {
tree_view_->SetModel(&model_);
tree_view_->SetController(this);
add_ = new LabelButton(this, ASCIIToUTF16("Add"));
- add_->set_focusable(true);
+ add_->SetFocusable(true);
remove_ = new LabelButton(this, ASCIIToUTF16("Remove"));
- remove_->set_focusable(true);
+ remove_->SetFocusable(true);
change_title_ = new LabelButton(this, ASCIIToUTF16("Change Title"));
- change_title_->set_focusable(true);
+ change_title_->SetFocusable(true);
GridLayout* layout = new GridLayout(container);
container->SetLayoutManager(layout);
diff --git a/ui/views/examples/widget_example.cc b/ui/views/examples/widget_example.cc
index 3722ba0..0d42a65 100644
--- a/ui/views/examples/widget_example.cc
+++ b/ui/views/examples/widget_example.cc
@@ -78,7 +78,7 @@ void WidgetExample::BuildButton(View* container,
const std::string& label,
int tag) {
LabelButton* button = new LabelButton(this, ASCIIToUTF16(label));
- button->set_focusable(true);
+ button->SetFocusable(true);
button->set_tag(tag);
container->AddChildView(button);
}
diff --git a/ui/views/focus/focus_manager_unittest.cc b/ui/views/focus/focus_manager_unittest.cc
index a2c9d48..fcb82b7 100644
--- a/ui/views/focus/focus_manager_unittest.cc
+++ b/ui/views/focus/focus_manager_unittest.cc
@@ -53,7 +53,7 @@ class SimpleTestView : public View {
public:
SimpleTestView(std::vector<FocusTestEvent>* event_list, int view_id)
: event_list_(event_list) {
- set_focusable(true);
+ SetFocusable(true);
set_id(view_id);
}
@@ -103,9 +103,9 @@ TEST_F(FocusManagerTest, ViewFocusCallbacks) {
TEST_F(FocusManagerTest, FocusChangeListener) {
View* view1 = new View();
- view1->set_focusable(true);
+ view1->SetFocusable(true);
View* view2 = new View();
- view2->set_focusable(true);
+ view2->SetFocusable(true);
GetContentsView()->AddChildView(view1);
GetContentsView()->AddChildView(view2);
@@ -630,17 +630,17 @@ TEST_F(FocusManagerTest, FocusInAboutToRequestFocusFromTabTraversal) {
// Create 3 views focuses the 3 and advances to the second. The 2nd views
// implementation of AboutToRequestFocusFromTabTraversal() focuses the first.
views::View* v1 = new View;
- v1->set_focusable(true);
+ v1->SetFocusable(true);
GetContentsView()->AddChildView(v1);
FocusInAboutToRequestFocusFromTabTraversalView* v2 =
new FocusInAboutToRequestFocusFromTabTraversalView;
- v2->set_focusable(true);
+ v2->SetFocusable(true);
v2->set_view_to_focus(v1);
GetContentsView()->AddChildView(v2);
views::View* v3 = new View;
- v3->set_focusable(true);
+ v3->SetFocusable(true);
GetContentsView()->AddChildView(v3);
v3->RequestFocus();
@@ -653,22 +653,22 @@ TEST_F(FocusManagerTest, RotatePaneFocus) {
GetContentsView()->AddChildView(pane1);
views::View* v1 = new View;
- v1->set_focusable(true);
+ v1->SetFocusable(true);
pane1->AddChildView(v1);
views::View* v2 = new View;
- v2->set_focusable(true);
+ v2->SetFocusable(true);
pane1->AddChildView(v2);
views::AccessiblePaneView* pane2 = new AccessiblePaneView();
GetContentsView()->AddChildView(pane2);
views::View* v3 = new View;
- v3->set_focusable(true);
+ v3->SetFocusable(true);
pane2->AddChildView(v3);
views::View* v4 = new View;
- v4->set_focusable(true);
+ v4->SetFocusable(true);
pane2->AddChildView(v4);
std::vector<views::View*> panes;
@@ -723,11 +723,11 @@ TEST_F(FocusManagerTest, RotatePaneFocus) {
// Verifies the stored focus view tracks the focused view.
TEST_F(FocusManagerTest, ImplicitlyStoresFocus) {
views::View* v1 = new View;
- v1->set_focusable(true);
+ v1->SetFocusable(true);
GetContentsView()->AddChildView(v1);
views::View* v2 = new View;
- v2->set_focusable(true);
+ v2->SetFocusable(true);
GetContentsView()->AddChildView(v2);
// Verify a focus request on |v1| implicitly updates the stored focus view.
@@ -785,7 +785,7 @@ TEST_F(FocusManagerArrowKeyTraversalTest, ArrowKeyTraversal) {
std::vector<views::View*> v;
for (size_t i = 0; i < 2; ++i) {
views::View* view = new View;
- view->set_focusable(true);
+ view->SetFocusable(true);
GetContentsView()->AddChildView(view);
v.push_back(view);
}
@@ -864,7 +864,7 @@ class AdvanceFocusWidgetDelegate : public WidgetDelegate {
TEST_F(FocusManagerTest, AdvanceFocusStaysInWidget) {
// Add |widget_view| as a child of the Widget.
View* widget_view = new View;
- widget_view->set_focusable(true);
+ widget_view->SetFocusable(true);
widget_view->SetBounds(20, 0, 20, 20);
GetContentsView()->AddChildView(widget_view);
@@ -880,10 +880,10 @@ TEST_F(FocusManagerTest, AdvanceFocusStaysInWidget) {
params.delegate = delegate.get();
child_widget.Init(params);
View* view1 = new View;
- view1->set_focusable(true);
+ view1->SetFocusable(true);
view1->SetBounds(0, 0, 20, 20);
View* view2 = new View;
- view2->set_focusable(true);
+ view2->SetFocusable(true);
view2->SetBounds(20, 0, 20, 20);
child_widget.client_view()->AddChildView(view1);
child_widget.client_view()->AddChildView(view2);
diff --git a/ui/views/focus/focus_manager_unittest_win.cc b/ui/views/focus/focus_manager_unittest_win.cc
index 1309ed2..267a8b7 100644
--- a/ui/views/focus/focus_manager_unittest_win.cc
+++ b/ui/views/focus/focus_manager_unittest_win.cc
@@ -73,7 +73,7 @@ TEST_F(FocusManagerTest, FocusStoreRestore) {
LabelButton* button = new LabelButton(NULL, ASCIIToUTF16("Press me"));
button->SetStyle(Button::STYLE_NATIVE_TEXTBUTTON);
View* view = new View();
- view->set_focusable(true);
+ view->SetFocusable(true);
GetContentsView()->AddChildView(button);
button->SetBounds(10, 10, 200, 30);
diff --git a/ui/views/focus/focus_traversal_unittest.cc b/ui/views/focus/focus_traversal_unittest.cc
index 03bf165..c3e8159 100644
--- a/ui/views/focus/focus_traversal_unittest.cc
+++ b/ui/views/focus/focus_traversal_unittest.cc
@@ -136,7 +136,7 @@ class BorderView : public NativeViewHost {
public:
explicit BorderView(View* child) : child_(child), widget_(NULL) {
DCHECK(child);
- set_focusable(false);
+ SetFocusable(false);
}
virtual ~BorderView() {}
@@ -545,7 +545,7 @@ void FocusTraversalTest::InitContentView() {
y += 60;
contents = new View();
- contents->set_focusable(true);
+ contents->SetFocusable(true);
contents->set_background(Background::CreateSolidBackground(SK_ColorBLUE));
contents->set_id(kThumbnailContainerID);
button = new LabelButton(NULL, ASCIIToUTF16("Star"));
@@ -758,10 +758,10 @@ TEST_F(FocusTraversalTest, PaneTraversal) {
FocusSearch focus_search_right(right_container_, true, true);
right_container_->EnablePaneFocus(&focus_search_right);
- FindViewByID(kRosettaLinkID)->set_focusable(false);
- FindViewByID(kStupeurEtTremblementLinkID)->set_focusable(false);
- FindViewByID(kDinerGameLinkID)->set_accessibility_focusable(true);
- FindViewByID(kDinerGameLinkID)->set_focusable(false);
+ FindViewByID(kRosettaLinkID)->SetFocusable(false);
+ FindViewByID(kStupeurEtTremblementLinkID)->SetFocusable(false);
+ FindViewByID(kDinerGameLinkID)->SetAccessibilityFocusable(true);
+ FindViewByID(kDinerGameLinkID)->SetFocusable(false);
FindViewByID(kAsterixLinkID)->RequestFocus();
// Traverse the focus hierarchy within the pane several times.
diff --git a/ui/views/touchui/touch_editing_menu.cc b/ui/views/touchui/touch_editing_menu.cc
index bd0efb1..dec9113 100644
--- a/ui/views/touchui/touch_editing_menu.cc
+++ b/ui/views/touchui/touch_editing_menu.cc
@@ -128,7 +128,7 @@ void TouchEditingMenuView::CreateButtons() {
Button* TouchEditingMenuView::CreateButton(const string16& title, int tag) {
string16 label = gfx::RemoveAcceleratorChar(title, '&', NULL, NULL);
LabelButton* button = new LabelButton(this, label);
- button->set_focusable(true);
+ button->SetFocusable(true);
button->set_request_focus_on_press(false);
gfx::Font font = ui::ResourceBundle::GetSharedInstance().GetFont(
ui::ResourceBundle::SmallFont);
diff --git a/ui/views/view.cc b/ui/views/view.cc
index ee4ed58..0cec760 100644
--- a/ui/views/view.cc
+++ b/ui/views/view.cc
@@ -1200,6 +1200,13 @@ void View::SetNextFocusableView(View* view) {
next_focusable_view_ = view;
}
+void View::SetFocusable(bool focusable) {
+ if (focusable_ == focusable)
+ return;
+
+ focusable_ = focusable;
+}
+
bool View::IsFocusable() const {
return focusable_ && enabled_ && IsDrawn();
}
@@ -1208,6 +1215,13 @@ bool View::IsAccessibilityFocusable() const {
return (focusable_ || accessibility_focusable_) && enabled_ && IsDrawn();
}
+void View::SetAccessibilityFocusable(bool accessibility_focusable) {
+ if (accessibility_focusable_ == accessibility_focusable)
+ return;
+
+ accessibility_focusable_ = accessibility_focusable;
+}
+
FocusManager* View::GetFocusManager() {
Widget* widget = GetWidget();
return widget ? widget->GetFocusManager() : NULL;
diff --git a/ui/views/view.h b/ui/views/view.h
index e391dbe..848d847 100644
--- a/ui/views/view.h
+++ b/ui/views/view.h
@@ -770,7 +770,7 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
// Sets whether this view is capable of taking focus.
// Note that this is false by default so that a view used as a container does
// not get the focus.
- void set_focusable(bool focusable) { focusable_ = focusable; }
+ void SetFocusable(bool focusable);
// Returns true if this view is capable of taking focus.
bool focusable() const { return focusable_ && enabled_ && visible_; }
@@ -785,9 +785,7 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
// Set whether this view can be made focusable if the user requires
// full keyboard access, even though it's not normally focusable.
// Note that this is false by default.
- void set_accessibility_focusable(bool accessibility_focusable) {
- accessibility_focusable_ = accessibility_focusable;
- }
+ void SetAccessibilityFocusable(bool accessibility_focusable);
// Convenience method to retrieve the FocusManager associated with the
// Widget that contains this view. This can return NULL if this view is not
diff --git a/ui/views/view_unittest.cc b/ui/views/view_unittest.cc
index e680160..1597f5d 100644
--- a/ui/views/view_unittest.cc
+++ b/ui/views/view_unittest.cc
@@ -2796,9 +2796,9 @@ TEST_F(ViewTest, ReorderChildren) {
child->AddChildView(foo2);
View* foo3 = new View();
child->AddChildView(foo3);
- foo1->set_focusable(true);
- foo2->set_focusable(true);
- foo3->set_focusable(true);
+ foo1->SetFocusable(true);
+ foo2->SetFocusable(true);
+ foo3->SetFocusable(true);
ASSERT_EQ(0, child->GetIndexOf(foo1));
ASSERT_EQ(1, child->GetIndexOf(foo2));
diff --git a/ui/views/widget/widget_interactive_uitest.cc b/ui/views/widget/widget_interactive_uitest.cc
index 889ee6b..30d44a3 100644
--- a/ui/views/widget/widget_interactive_uitest.cc
+++ b/ui/views/widget/widget_interactive_uitest.cc
@@ -162,7 +162,7 @@ class NestedLoopCaptureView : public View {
TEST_F(WidgetTest, DesktopNativeWidgetAuraActivationAndFocusTest) {
// Create widget 1 and expect the active window to be its window.
View* contents_view1 = new View;
- contents_view1->set_focusable(true);
+ contents_view1->SetFocusable(true);
Widget widget1;
Widget::InitParams init_params =
CreateParams(Widget::InitParams::TYPE_WINDOW_FRAMELESS);
diff --git a/ui/views/widget/widget_unittest.cc b/ui/views/widget/widget_unittest.cc
index cb29c4e..51b444f 100644
--- a/ui/views/widget/widget_unittest.cc
+++ b/ui/views/widget/widget_unittest.cc
@@ -951,7 +951,7 @@ TEST_F(WidgetTest, KeyboardInputEvent) {
TEST_F(WidgetTest, DISABLED_FocusChangesOnBubble) {
// Create a widget, show and activate it and focus the contents view.
View* contents_view = new View;
- contents_view->set_focusable(true);
+ contents_view->SetFocusable(true);
Widget widget;
Widget::InitParams init_params =
CreateParams(Widget::InitParams::TYPE_WINDOW_FRAMELESS);
@@ -970,7 +970,7 @@ TEST_F(WidgetTest, DISABLED_FocusChangesOnBubble) {
// Show a bubble.
BubbleDelegateView* bubble_delegate_view =
new BubbleDelegateView(contents_view, BubbleBorder::TOP_LEFT);
- bubble_delegate_view->set_focusable(true);
+ bubble_delegate_view->SetFocusable(true);
BubbleDelegateView::CreateBubble(bubble_delegate_view)->Show();
bubble_delegate_view->RequestFocus();
@@ -1052,7 +1052,7 @@ class DesktopAuraTestValidPaintWidget : public views::Widget {
TEST_F(WidgetTest, DesktopNativeWidgetAuraNoPaintAfterCloseTest) {
View* contents_view = new View;
- contents_view->set_focusable(true);
+ contents_view->SetFocusable(true);
DesktopAuraTestValidPaintWidget widget;
Widget::InitParams init_params =
CreateParams(Widget::InitParams::TYPE_WINDOW_FRAMELESS);
@@ -1072,7 +1072,7 @@ TEST_F(WidgetTest, DesktopNativeWidgetAuraNoPaintAfterCloseTest) {
TEST_F(WidgetTest, DesktopNativeWidgetAuraNoPaintAfterHideTest) {
View* contents_view = new View;
- contents_view->set_focusable(true);
+ contents_view->SetFocusable(true);
DesktopAuraTestValidPaintWidget widget;
Widget::InitParams init_params =
CreateParams(Widget::InitParams::TYPE_WINDOW_FRAMELESS);
diff --git a/ui/views/window/dialog_client_view.cc b/ui/views/window/dialog_client_view.cc
index eb83230..bfb870e 100644
--- a/ui/views/window/dialog_client_view.cc
+++ b/ui/views/window/dialog_client_view.cc
@@ -369,7 +369,7 @@ LabelButton* DialogClientView::CreateDialogButton(ui::DialogButton type) {
button = new LabelButton(this, title);
button->SetStyle(Button::STYLE_NATIVE_TEXTBUTTON);
}
- button->set_focusable(true);
+ button->SetFocusable(true);
const int kDialogMinButtonWidth = 75;
button->set_min_size(gfx::Size(kDialogMinButtonWidth, 0));