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

Side by Side Diff: ash/palette_delegate.h

Issue 2734733002: Revert "chromeos: Move files in //ash/common to //ash, part 3" (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « ash/new_window_controller.cc ('k') | ash/root_window_controller.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef ASH_PALETTE_DELEGATE_H_
6 #define ASH_PALETTE_DELEGATE_H_
7
8 #include "ash/ash_export.h"
9 #include "base/callback.h"
10 #include "base/callback_list.h"
11 #include "base/macros.h"
12 #include "ui/events/devices/stylus_state.h"
13
14 namespace ash {
15
16 // This delegate allows the UI code in ash, e.g. |PaletteTray|, to perform
17 // Chrome-specific actions.
18 class PaletteDelegate {
19 public:
20 using EnableListener = base::Callback<void(bool)>;
21 using EnableListenerSubscription =
22 base::CallbackList<void(bool)>::Subscription;
23
24 virtual ~PaletteDelegate() {}
25
26 // Sets callback function that will receive the current state of the palette
27 // enabled pref. The callback will be invoked once the initial pref value is
28 // available.
29 virtual std::unique_ptr<EnableListenerSubscription> AddPaletteEnableListener(
30 const EnableListener& on_state_changed) = 0;
31
32 // Create a new note.
33 virtual void CreateNote() = 0;
34
35 // Returns true if there is a note-taking application available.
36 virtual bool HasNoteApp() = 0;
37
38 // Returns true if the palette should be automatically opened on an eject
39 // event.
40 virtual bool ShouldAutoOpenPalette() = 0;
41
42 // Returns true if the palette should be displayed. This is the one-shot
43 // equivalent to AddPaletteEnableListener.
44 virtual bool ShouldShowPalette() = 0;
45
46 // Take a screenshot of the entire window.
47 virtual void TakeScreenshot() = 0;
48
49 // Take a screenshot of a user-selected region. |done| is called when the
50 // partial screenshot session has finished; a screenshot may or may not have
51 // been taken.
52 virtual void TakePartialScreenshot(const base::Closure& done) = 0;
53
54 // Cancels any active partial screenshot session.
55 virtual void CancelPartialScreenshot() = 0;
56
57 private:
58 DISALLOW_ASSIGN(PaletteDelegate);
59 };
60
61 } // namespace ash
62
63 #endif // ASH_PALETTE_DELEGATE_H_
OLDNEW
« no previous file with comments | « ash/new_window_controller.cc ('k') | ash/root_window_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698