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

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: Initial upload 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 7ad6cef9ed00c6bc5aa4e00faa622be3516be094..e07515f4964f022c4ebadbeeef19a1b066450d56 100644
--- a/chrome/browser/ui/ash/palette_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/palette_delegate_chromeos.cc
@@ -10,6 +10,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 {
@@ -32,6 +34,11 @@ bool PaletteDelegateChromeOS::HasNoteApp() {
return chromeos::IsNoteTakingAppAvailable(GetProfile());
}
+bool PaletteDelegateChromeOS::ShouldAutoOpenPalette() {
+ return GetProfile()->GetPrefs()->GetBoolean(
+ prefs::kLaunchPaletteOnEjectEvent);
+}
+
void PaletteDelegateChromeOS::TakeScreenshot() {
auto screenshot_controller =
ash::Shell::GetInstance()->screenshot_controller();

Powered by Google App Engine
This is Rietveld 408576698