| 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 3192f8b4bfe9ba1cef05121b3f5c968977d1497f..8a1d2648402f454cc4d27e4854000475f7b33b04 100644
|
| --- a/chrome/browser/ui/ash/palette_delegate_chromeos.cc
|
| +++ b/chrome/browser/ui/ash/palette_delegate_chromeos.cc
|
| @@ -5,6 +5,7 @@
|
| #include "chrome/browser/ui/ash/palette_delegate_chromeos.h"
|
|
|
| #include "ash/accelerators/accelerator_controller_delegate_aura.h"
|
| +#include "ash/common/system/chromeos/palette/palette_utils.h"
|
| #include "ash/magnifier/partial_magnification_controller.h"
|
| #include "ash/screenshot_delegate.h"
|
| #include "ash/shell.h"
|
| @@ -24,6 +25,13 @@
|
|
|
| namespace chromeos {
|
|
|
| +// static
|
| +std::unique_ptr<PaletteDelegateChromeOS> PaletteDelegateChromeOS::Create() {
|
| + if (!ash::IsPaletteFeatureEnabled())
|
| + return nullptr;
|
| + return base::WrapUnique(new PaletteDelegateChromeOS());
|
| +}
|
| +
|
| PaletteDelegateChromeOS::PaletteDelegateChromeOS() {
|
| registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED,
|
| content::NotificationService::AllSources());
|
| @@ -134,6 +142,13 @@ bool PaletteDelegateChromeOS::ShouldAutoOpenPalette() {
|
| return profile_->GetPrefs()->GetBoolean(prefs::kLaunchPaletteOnEjectEvent);
|
| }
|
|
|
| +bool PaletteDelegateChromeOS::ShouldShowPalette() {
|
| + if (!profile_)
|
| + return false;
|
| +
|
| + return profile_->GetPrefs()->GetBoolean(prefs::kEnableStylusTools);
|
| +}
|
| +
|
| void PaletteDelegateChromeOS::TakeScreenshot() {
|
| auto* screenshot_delegate = ash::Shell::GetInstance()
|
| ->accelerator_controller_delegate()
|
|
|