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

Side by Side Diff: chrome/browser/ui/ash/palette_delegate_chromeos.h

Issue 2324803003: cros/ash: Cancel screenshot mode if screenshot is cancelled or not taken. (Closed)
Patch Set: Update icon to final version 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_ASH_PALETTE_DELEGATE_CHROMEOS_H_ 5 #ifndef CHROME_BROWSER_UI_ASH_PALETTE_DELEGATE_CHROMEOS_H_
6 #define CHROME_BROWSER_UI_ASH_PALETTE_DELEGATE_CHROMEOS_H_ 6 #define CHROME_BROWSER_UI_ASH_PALETTE_DELEGATE_CHROMEOS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "ash/common/palette_delegate.h" 10 #include "ash/common/palette_delegate.h"
(...skipping 26 matching lines...) Expand all
37 static std::unique_ptr<PaletteDelegateChromeOS> Create(); 37 static std::unique_ptr<PaletteDelegateChromeOS> Create();
38 38
39 ~PaletteDelegateChromeOS() override; 39 ~PaletteDelegateChromeOS() override;
40 40
41 void OnLaserPointerEnabled() override; 41 void OnLaserPointerEnabled() override;
42 void OnLaserPointerDisabled() override; 42 void OnLaserPointerDisabled() override;
43 43
44 private: 44 private:
45 PaletteDelegateChromeOS(); 45 PaletteDelegateChromeOS();
46 46
47 class ProxyScreenshotDelegate;
48
49 // ash::PaletteDelegate: 47 // ash::PaletteDelegate:
50 std::unique_ptr<EnableListenerSubscription> AddPaletteEnableListener( 48 std::unique_ptr<EnableListenerSubscription> AddPaletteEnableListener(
51 const EnableListener& on_state_changed) override; 49 const EnableListener& on_state_changed) override;
52 void CreateNote() override; 50 void CreateNote() override;
53 bool HasNoteApp() override; 51 bool HasNoteApp() override;
54 void SetPartialMagnifierState(bool enabled) override; 52 void SetPartialMagnifierState(bool enabled) override;
55 void SetStylusStateChangedCallback( 53 void SetStylusStateChangedCallback(
56 const OnStylusStateChangedCallback& on_stylus_state_changed) override; 54 const OnStylusStateChangedCallback& on_stylus_state_changed) override;
57 bool ShouldAutoOpenPalette() override; 55 bool ShouldAutoOpenPalette() override;
58 bool ShouldShowPalette() override; 56 bool ShouldShowPalette() override;
(...skipping 14 matching lines...) Expand all
73 71
74 // Called when the palette enabled pref has changed. 72 // Called when the palette enabled pref has changed.
75 void OnPaletteEnabledPrefChanged(); 73 void OnPaletteEnabledPrefChanged();
76 74
77 void SetProfile(Profile* profile); 75 void SetProfile(Profile* profile);
78 void OnPartialScreenshotDone(const base::Closure& then); 76 void OnPartialScreenshotDone(const base::Closure& then);
79 77
80 base::CallbackList<void(bool)> palette_enabled_callback_list_; 78 base::CallbackList<void(bool)> palette_enabled_callback_list_;
81 OnStylusStateChangedCallback on_stylus_state_changed_; 79 OnStylusStateChangedCallback on_stylus_state_changed_;
82 80
83 std::unique_ptr<ProxyScreenshotDelegate> proxy_screenshot_delegate_;
84
85 // Unowned pointer to the active profile. 81 // Unowned pointer to the active profile.
86 Profile* profile_ = nullptr; 82 Profile* profile_ = nullptr;
87 std::unique_ptr<PrefChangeRegistrar> pref_change_registrar_; 83 std::unique_ptr<PrefChangeRegistrar> pref_change_registrar_;
88 std::unique_ptr<ash::ScopedSessionStateObserver> session_state_observer_; 84 std::unique_ptr<ash::ScopedSessionStateObserver> session_state_observer_;
89 content::NotificationRegistrar registrar_; 85 content::NotificationRegistrar registrar_;
90 86
91 base::WeakPtrFactory<PaletteDelegateChromeOS> weak_factory_; 87 base::WeakPtrFactory<PaletteDelegateChromeOS> weak_factory_;
92 88
93 DISALLOW_COPY_AND_ASSIGN(PaletteDelegateChromeOS); 89 DISALLOW_COPY_AND_ASSIGN(PaletteDelegateChromeOS);
94 }; 90 };
95 91
96 } // namespace chromeos 92 } // namespace chromeos
97 93
98 #endif // CHROME_BROWSER_UI_ASH_PALETTE_DELEGATE_CHROMEOS_H_ 94 #endif // CHROME_BROWSER_UI_ASH_PALETTE_DELEGATE_CHROMEOS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698