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

Unified Diff: chrome/browser/ui/views/toolbar/app_menu.cc

Issue 1870573003: Full Keyboard Access: Second Approach (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/toolbar/app_menu.cc
diff --git a/chrome/browser/ui/views/toolbar/app_menu.cc b/chrome/browser/ui/views/toolbar/app_menu.cc
index 5cee86832ae3396e4b4c76212220bbd13796c8b4..cd66c1a3dbbb10eb42b62741c7d3b22bec3c9f77 100644
--- a/chrome/browser/ui/views/toolbar/app_menu.cc
+++ b/chrome/browser/ui/views/toolbar/app_menu.cc
@@ -65,6 +65,7 @@
#include "ui/views/controls/menu/menu_runner.h"
#include "ui/views/controls/menu/menu_scroll_view_container.h"
#include "ui/views/controls/menu/submenu_view.h"
+#include "ui/views/style/platform_style.h"
#include "ui/views/widget/widget.h"
using base::UserMetricsAction;
@@ -284,7 +285,8 @@ class InMenuButton : public LabelButton {
~InMenuButton() override {}
void Init(InMenuButtonBackground::ButtonType type) {
- SetFocusable(true);
+ views::PlatformStyle::ConfigureFocus(
+ views::PlatformStyle::CONTROL::IN_MENU_BUTTON, this);
set_request_focus_on_press(false);
SetHorizontalAlignment(gfx::ALIGN_CENTER);
@@ -553,7 +555,9 @@ class AppMenu::ZoomView : public AppMenuView {
IDR_FULLSCREEN_MENU_BUTTON);
fullscreen_button_->SetImage(ImageButton::STATE_NORMAL, full_screen_image);
- fullscreen_button_->SetFocusable(true);
+ views::PlatformStyle::ConfigureFocus(
+ views::PlatformStyle::CONTROL::IN_MENU_BUTTON, fullscreen_button_);
+
fullscreen_button_->set_request_focus_on_press(false);
fullscreen_button_->set_tag(fullscreen_index);
fullscreen_button_->SetImageAlignment(

Powered by Google App Engine
This is Rietveld 408576698