From aa950f8bdb7d9dd34099515efc388c8233c55ac2 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Mon, 8 Aug 2016 19:15:34 +0300 Subject: [PATCH] views: Restore hover state on menu buttons --- tests/cefclient/browser/client_app_browser.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/cefclient/browser/client_app_browser.cc b/tests/cefclient/browser/client_app_browser.cc index 40a0378f1..f7ccd3514 100644 --- a/tests/cefclient/browser/client_app_browser.cc +++ b/tests/cefclient/browser/client_app_browser.cc @@ -49,6 +49,14 @@ void ClientAppBrowser::OnBeforeCommandLineProcessing( command_line->AppendSwitch("enable-begin-frame-scheduling"); } + if (command_line->HasSwitch(switches::kUseViews) && + !command_line->HasSwitch("top-chrome-md")) { + // Use non-material mode on all platforms by default. Among other things + // this causes menu buttons to show hover state. See usage of + // MaterialDesignController::IsModeMaterial() in Chromium code. + command_line->AppendSwitchWithValue("top-chrome-md", "non-material"); + } + DelegateSet::iterator it = delegates_.begin(); for (; it != delegates_.end(); ++it) (*it)->OnBeforeCommandLineProcessing(this, command_line);