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

Side by Side Diff: chrome/browser/ui/views/website_settings/permission_selector_view.cc

Issue 1963563002: Views: Flip default value of CustomButton::request_focus_on_press_ to false. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. 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) 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/website_settings/permission_selector_view.h" 5 #include "chrome/browser/ui/views/website_settings/permission_selector_view.h"
6 6
7 #include "base/i18n/rtl.h" 7 #include "base/i18n/rtl.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/ui/views/website_settings/website_settings_popup_view.h " 10 #include "chrome/browser/ui/views/website_settings/website_settings_popup_view.h "
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 PermissionMenuModel* model, 65 PermissionMenuModel* model,
66 bool show_menu_marker) 66 bool show_menu_marker)
67 : MenuButton(text, this, show_menu_marker), menu_model_(model) { 67 : MenuButton(text, this, show_menu_marker), menu_model_(model) {
68 // Update the themed border before the NativeTheme is applied. Usually this 68 // Update the themed border before the NativeTheme is applied. Usually this
69 // happens in a call to LabelButton::OnNativeThemeChanged(). However, if 69 // happens in a call to LabelButton::OnNativeThemeChanged(). However, if
70 // PermissionMenuButton called that from its override, the NativeTheme would 70 // PermissionMenuButton called that from its override, the NativeTheme would
71 // be available, and the button would get native GTK styling on Linux. 71 // be available, and the button would get native GTK styling on Linux.
72 UpdateThemedBorder(); 72 UpdateThemedBorder();
73 73
74 Button::ConfigureDefaultFocus(this); 74 Button::ConfigureDefaultFocus(this);
75 set_request_focus_on_press(true);
75 is_rtl_display_ = 76 is_rtl_display_ =
76 base::i18n::RIGHT_TO_LEFT == base::i18n::GetStringDirection(text); 77 base::i18n::RIGHT_TO_LEFT == base::i18n::GetStringDirection(text);
77 } 78 }
78 79
79 PermissionMenuButton::~PermissionMenuButton() { 80 PermissionMenuButton::~PermissionMenuButton() {
80 } 81 }
81 82
82 void PermissionMenuButton::GetAccessibleState(ui::AXViewState* state) { 83 void PermissionMenuButton::GetAccessibleState(ui::AXViewState* state) {
83 MenuButton::GetAccessibleState(state); 84 MenuButton::GetAccessibleState(state);
84 state->value = GetText(); 85 state->value = GetText();
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 // Update the menu button text to reflect the new setting. 211 // Update the menu button text to reflect the new setting.
211 menu_button_->SetText(WebsiteSettingsUI::PermissionActionToUIString( 212 menu_button_->SetText(WebsiteSettingsUI::PermissionActionToUIString(
212 permission.type, permission.setting, permission.default_setting, 213 permission.type, permission.setting, permission.default_setting,
213 content_settings::SETTING_SOURCE_USER)); 214 content_settings::SETTING_SOURCE_USER));
214 menu_button_->SizeToPreferredSize(); 215 menu_button_->SizeToPreferredSize();
215 216
216 FOR_EACH_OBSERVER(PermissionSelectorViewObserver, 217 FOR_EACH_OBSERVER(PermissionSelectorViewObserver,
217 observer_list_, 218 observer_list_,
218 OnPermissionChanged(permission)); 219 OnPermissionChanged(permission));
219 } 220 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/website_settings/chosen_object_view.cc ('k') | ui/app_list/views/app_list_item_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698