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

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

Issue 2291913002: Allow the user to cancel the capture region action, and show its active status in the tray. (Closed)
Patch Set: 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.h
diff --git a/chrome/browser/ui/ash/palette_delegate_chromeos.h b/chrome/browser/ui/ash/palette_delegate_chromeos.h
index 9897c497104ad36cb7320f2de58b00e8ccee4e59..9fc1b34d48707faeb2c2853b82810ae877ff808b 100644
--- a/chrome/browser/ui/ash/palette_delegate_chromeos.h
+++ b/chrome/browser/ui/ash/palette_delegate_chromeos.h
@@ -11,6 +11,7 @@
#include "ash/common/session/session_state_observer.h"
#include "base/callback_list.h"
#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
#include "base/values.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
@@ -40,6 +41,8 @@ class PaletteDelegateChromeOS : public ash::PaletteDelegate,
private:
PaletteDelegateChromeOS();
+ class ProxyScreenshotDelegate;
+
// ash::PaletteDelegate:
std::unique_ptr<EnableListenerSubscription> AddPaletteEnableListener(
const EnableListener& on_state_changed) override;
@@ -51,7 +54,8 @@ class PaletteDelegateChromeOS : public ash::PaletteDelegate,
bool ShouldAutoOpenPalette() override;
bool ShouldShowPalette() override;
void TakeScreenshot() override;
- void TakePartialScreenshot() override;
+ void TakePartialScreenshot(const base::Closure& done) override;
+ void CancelPartialScreenshot() override;
// ash::SessionStateObserver:
void ActiveUserChanged(const AccountId& account_id) override;
@@ -68,16 +72,21 @@ class PaletteDelegateChromeOS : public ash::PaletteDelegate,
void OnPaletteEnabledPrefChanged();
void SetProfile(Profile* profile);
+ void OnPartialScreenshotDone(const base::Closure& then);
base::CallbackList<void(bool)> palette_enabled_callback_list_;
OnStylusStateChangedCallback on_stylus_state_changed_;
+ std::unique_ptr<ProxyScreenshotDelegate> proxy_screenshot_delegate_;
+
// Unowned pointer to the active profile.
Profile* profile_ = nullptr;
std::unique_ptr<PrefChangeRegistrar> pref_change_registrar_;
std::unique_ptr<ash::ScopedSessionStateObserver> session_state_observer_;
content::NotificationRegistrar registrar_;
+ base::WeakPtrFactory<PaletteDelegateChromeOS> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(PaletteDelegateChromeOS);
};

Powered by Google App Engine
This is Rietveld 408576698