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

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

Issue 2276233002: ash/chromeos: Add shift-alt-p shortcut to open palette. (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 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 13 matching lines...) Expand all
24 } 24 }
25 25
26 namespace chromeos { 26 namespace chromeos {
27 27
28 // A class which allows the Ash palette to perform chrome actions. 28 // A class which allows the Ash palette to perform chrome actions.
29 class PaletteDelegateChromeOS : public ash::PaletteDelegate, 29 class PaletteDelegateChromeOS : public ash::PaletteDelegate,
30 public ui::InputDeviceEventObserver, 30 public ui::InputDeviceEventObserver,
31 public ash::SessionStateObserver, 31 public ash::SessionStateObserver,
32 public content::NotificationObserver { 32 public content::NotificationObserver {
33 public: 33 public:
34 PaletteDelegateChromeOS(); 34 // Attempts to create a palette delegate. This will return null if the palette
35 // feature is not enabled.
36 static std::unique_ptr<PaletteDelegateChromeOS> Create();
37
35 ~PaletteDelegateChromeOS() override; 38 ~PaletteDelegateChromeOS() override;
36 39
37 private: 40 private:
41 PaletteDelegateChromeOS();
42
38 // ash::PaletteDelegate: 43 // ash::PaletteDelegate:
39 std::unique_ptr<EnableListenerSubscription> AddPaletteEnableListener( 44 std::unique_ptr<EnableListenerSubscription> AddPaletteEnableListener(
40 const EnableListener& on_state_changed) override; 45 const EnableListener& on_state_changed) override;
41 void CreateNote() override; 46 void CreateNote() override;
42 bool HasNoteApp() override; 47 bool HasNoteApp() override;
43 void SetPartialMagnifierState(bool enabled) override; 48 void SetPartialMagnifierState(bool enabled) override;
44 void SetStylusStateChangedCallback( 49 void SetStylusStateChangedCallback(
45 const OnStylusStateChangedCallback& on_stylus_state_changed) override; 50 const OnStylusStateChangedCallback& on_stylus_state_changed) override;
46 bool ShouldAutoOpenPalette() override; 51 bool ShouldAutoOpenPalette() override;
52 bool ShouldShowPalette() override;
47 void TakeScreenshot() override; 53 void TakeScreenshot() override;
48 void TakePartialScreenshot() override; 54 void TakePartialScreenshot() override;
49 55
50 // ash::SessionStateObserver: 56 // ash::SessionStateObserver:
51 void ActiveUserChanged(const AccountId& account_id) override; 57 void ActiveUserChanged(const AccountId& account_id) override;
52 58
53 // content::NotificationObserver: 59 // content::NotificationObserver:
54 void Observe(int type, 60 void Observe(int type,
55 const content::NotificationSource& source, 61 const content::NotificationSource& source,
56 const content::NotificationDetails& details) override; 62 const content::NotificationDetails& details) override;
(...skipping 14 matching lines...) Expand all
71 std::unique_ptr<PrefChangeRegistrar> pref_change_registrar_; 77 std::unique_ptr<PrefChangeRegistrar> pref_change_registrar_;
72 std::unique_ptr<ash::ScopedSessionStateObserver> session_state_observer_; 78 std::unique_ptr<ash::ScopedSessionStateObserver> session_state_observer_;
73 content::NotificationRegistrar registrar_; 79 content::NotificationRegistrar registrar_;
74 80
75 DISALLOW_COPY_AND_ASSIGN(PaletteDelegateChromeOS); 81 DISALLOW_COPY_AND_ASSIGN(PaletteDelegateChromeOS);
76 }; 82 };
77 83
78 } // namespace chromeos 84 } // namespace chromeos
79 85
80 #endif // CHROME_BROWSER_UI_ASH_PALETTE_DELEGATE_CHROMEOS_H_ 86 #endif // CHROME_BROWSER_UI_ASH_PALETTE_DELEGATE_CHROMEOS_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/chrome_shell_delegate.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