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

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

Issue 2644713002: cros: Use runtime stylus detection for ash palette. (Closed)
Patch Set: Fix test Created 3 years, 10 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 7c923d6f3d1b574124cb2fa4406768d080155591..cc6db0d86cbcae37adf71c554c29ba8b4798de83 100644
--- a/chrome/browser/ui/ash/palette_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/palette_delegate_chromeos.cc
@@ -21,29 +21,17 @@
#include "components/user_manager/user_manager.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
-#include "ui/events/devices/input_device_manager.h"
namespace chromeos {
-// static
-std::unique_ptr<PaletteDelegateChromeOS> PaletteDelegateChromeOS::Create() {
- if (!ash::IsPaletteFeatureEnabled())
- return nullptr;
- return base::WrapUnique(new PaletteDelegateChromeOS());
-}
-
PaletteDelegateChromeOS::PaletteDelegateChromeOS() : weak_factory_(this) {
registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED,
content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_PROFILE_DESTROYED,
content::NotificationService::AllSources());
-
- ui::InputDeviceManager::GetInstance()->AddObserver(this);
}
-PaletteDelegateChromeOS::~PaletteDelegateChromeOS() {
- ui::InputDeviceManager::GetInstance()->RemoveObserver(this);
-}
+PaletteDelegateChromeOS::~PaletteDelegateChromeOS() {}
std::unique_ptr<PaletteDelegateChromeOS::EnableListenerSubscription>
PaletteDelegateChromeOS::AddPaletteEnableListener(
@@ -131,11 +119,6 @@ void PaletteDelegateChromeOS::OnPartialScreenshotDone(
then.Run();
}
-void PaletteDelegateChromeOS::SetStylusStateChangedCallback(
- const OnStylusStateChangedCallback& on_stylus_state_changed) {
- on_stylus_state_changed_ = on_stylus_state_changed;
-}
-
bool PaletteDelegateChromeOS::ShouldAutoOpenPalette() {
if (!profile_)
return false;
@@ -176,7 +159,4 @@ void PaletteDelegateChromeOS::CancelPartialScreenshot() {
ash::Shell::GetInstance()->screenshot_controller()->CancelScreenshotSession();
}
-void PaletteDelegateChromeOS::OnStylusStateChanged(ui::StylusState state) {
- on_stylus_state_changed_.Run(state);
-}
} // namespace chromeos
« no previous file with comments | « chrome/browser/ui/ash/palette_delegate_chromeos.h ('k') | chrome/browser/ui/webui/options/chromeos/options_stylus_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698