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

Unified Diff: chrome/browser/ui/ash/palette_delegate_chromeos.cc

Issue 2234203002: Auto open and close the palette on an eject event. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tool-note
Patch Set: Rebase on master Created 4 years, 4 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/ash/palette_delegate_chromeos.cc
diff --git a/chrome/browser/ui/ash/palette_delegate_chromeos.cc b/chrome/browser/ui/ash/palette_delegate_chromeos.cc
index ec2defa2b0379677466d5c8050a0e27dfde46082..3ad24a35d6f2282b719f0a2089a4b2637b0877ca 100644
--- a/chrome/browser/ui/ash/palette_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/palette_delegate_chromeos.cc
@@ -11,6 +11,8 @@
#include "ash/utility/screenshot_controller.h"
#include "chrome/browser/chromeos/note_taking_app_utils.h"
#include "chrome/browser/profiles/profile_manager.h"
+#include "chrome/common/pref_names.h"
+#include "components/prefs/pref_service.h"
namespace chromeos {
namespace {
@@ -39,6 +41,11 @@ void PaletteDelegateChromeOS::SetPartialMagnifierState(bool enabled) {
controller->SetEnabled(enabled);
}
+bool PaletteDelegateChromeOS::ShouldAutoOpenPalette() {
+ return GetProfile()->GetPrefs()->GetBoolean(
+ prefs::kLaunchPaletteOnEjectEvent);
+}
+
void PaletteDelegateChromeOS::TakeScreenshot() {
auto* screenshot_delegate = ash::Shell::GetInstance()
->accelerator_controller_delegate()

Powered by Google App Engine
This is Rietveld 408576698