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

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: Address comments Created 4 years, 3 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
« no previous file with comments | « ash/utility/screenshot_controller_unittest.cc ('k') | chrome/browser/ui/ash/palette_delegate_chromeos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 be708c05b1cdc18285203d0182b84bf82bff625c..3655cd2a3dde57df59a4ddef13f8aa93ee94720e 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"
@@ -43,6 +44,8 @@ class PaletteDelegateChromeOS : public ash::PaletteDelegate,
private:
PaletteDelegateChromeOS();
+ class ProxyScreenshotDelegate;
+
// ash::PaletteDelegate:
std::unique_ptr<EnableListenerSubscription> AddPaletteEnableListener(
const EnableListener& on_state_changed) override;
@@ -54,7 +57,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;
@@ -71,16 +75,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);
};
« no previous file with comments | « ash/utility/screenshot_controller_unittest.cc ('k') | chrome/browser/ui/ash/palette_delegate_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698