OLD | NEW |
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 23 matching lines...) Expand all Loading... |
34 public: | 34 public: |
35 // Attempts to create a palette delegate. This will return null if the palette | 35 // Attempts to create a palette delegate. This will return null if the palette |
36 // feature is not enabled. | 36 // feature is not enabled. |
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 private: | 41 private: |
42 PaletteDelegateChromeOS(); | 42 PaletteDelegateChromeOS(); |
43 | 43 |
44 class ProxyScreenshotDelegate; | |
45 | |
46 // ash::PaletteDelegate: | 44 // ash::PaletteDelegate: |
47 std::unique_ptr<EnableListenerSubscription> AddPaletteEnableListener( | 45 std::unique_ptr<EnableListenerSubscription> AddPaletteEnableListener( |
48 const EnableListener& on_state_changed) override; | 46 const EnableListener& on_state_changed) override; |
49 void CreateNote() override; | 47 void CreateNote() override; |
50 bool HasNoteApp() override; | 48 bool HasNoteApp() override; |
51 void SetPartialMagnifierState(bool enabled) override; | 49 void SetPartialMagnifierState(bool enabled) override; |
52 void SetStylusStateChangedCallback( | 50 void SetStylusStateChangedCallback( |
53 const OnStylusStateChangedCallback& on_stylus_state_changed) override; | 51 const OnStylusStateChangedCallback& on_stylus_state_changed) override; |
54 bool ShouldAutoOpenPalette() override; | 52 bool ShouldAutoOpenPalette() override; |
55 bool ShouldShowPalette() override; | 53 bool ShouldShowPalette() override; |
(...skipping 14 matching lines...) Expand all Loading... |
70 | 68 |
71 // Called when the palette enabled pref has changed. | 69 // Called when the palette enabled pref has changed. |
72 void OnPaletteEnabledPrefChanged(); | 70 void OnPaletteEnabledPrefChanged(); |
73 | 71 |
74 void SetProfile(Profile* profile); | 72 void SetProfile(Profile* profile); |
75 void OnPartialScreenshotDone(const base::Closure& then); | 73 void OnPartialScreenshotDone(const base::Closure& then); |
76 | 74 |
77 base::CallbackList<void(bool)> palette_enabled_callback_list_; | 75 base::CallbackList<void(bool)> palette_enabled_callback_list_; |
78 OnStylusStateChangedCallback on_stylus_state_changed_; | 76 OnStylusStateChangedCallback on_stylus_state_changed_; |
79 | 77 |
80 std::unique_ptr<ProxyScreenshotDelegate> proxy_screenshot_delegate_; | |
81 | |
82 // Unowned pointer to the active profile. | 78 // Unowned pointer to the active profile. |
83 Profile* profile_ = nullptr; | 79 Profile* profile_ = nullptr; |
84 std::unique_ptr<PrefChangeRegistrar> pref_change_registrar_; | 80 std::unique_ptr<PrefChangeRegistrar> pref_change_registrar_; |
85 std::unique_ptr<ash::ScopedSessionStateObserver> session_state_observer_; | 81 std::unique_ptr<ash::ScopedSessionStateObserver> session_state_observer_; |
86 content::NotificationRegistrar registrar_; | 82 content::NotificationRegistrar registrar_; |
87 | 83 |
88 base::WeakPtrFactory<PaletteDelegateChromeOS> weak_factory_; | 84 base::WeakPtrFactory<PaletteDelegateChromeOS> weak_factory_; |
89 | 85 |
90 DISALLOW_COPY_AND_ASSIGN(PaletteDelegateChromeOS); | 86 DISALLOW_COPY_AND_ASSIGN(PaletteDelegateChromeOS); |
91 }; | 87 }; |
92 | 88 |
93 } // namespace chromeos | 89 } // namespace chromeos |
94 | 90 |
95 #endif // CHROME_BROWSER_UI_ASH_PALETTE_DELEGATE_CHROMEOS_H_ | 91 #endif // CHROME_BROWSER_UI_ASH_PALETTE_DELEGATE_CHROMEOS_H_ |
OLD | NEW |