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

Side by Side Diff: ash/common/system/chromeos/palette/palette_tray.h

Issue 2308823002: Add UMA stats for pen palette (Closed)
Patch Set: rebase 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 2016 The Chromium Authors. All rights reserved. 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 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 ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_PALETTE_BUTTON_TRAY_H_ 5 #ifndef ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_PALETTE_BUTTON_TRAY_H_
6 #define ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_PALETTE_BUTTON_TRAY_H_ 6 #define ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_PALETTE_BUTTON_TRAY_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 // TrayBackgroundView: 55 // TrayBackgroundView:
56 void ClickedOutsideBubble() override; 56 void ClickedOutsideBubble() override;
57 base::string16 GetAccessibleNameForTray() override; 57 base::string16 GetAccessibleNameForTray() override;
58 void HideBubbleWithView(const views::TrayBubbleView* bubble_view) override; 58 void HideBubbleWithView(const views::TrayBubbleView* bubble_view) override;
59 void SetShelfAlignment(ShelfAlignment alignment) override; 59 void SetShelfAlignment(ShelfAlignment alignment) override;
60 void AnchorUpdated() override; 60 void AnchorUpdated() override;
61 61
62 // PaletteToolManager::Delegate: 62 // PaletteToolManager::Delegate:
63 void HidePalette() override; 63 void HidePalette() override;
64 void RecordPaletteOptionsUsage(PaletteTrayOptions option) override;
65 void RecordPaletteModeCancellation(PaletteModeCancelType type) override;
64 66
65 // Returns true if the shelf should not autohide. 67 // Returns true if the shelf should not autohide.
66 bool ShouldBlockShelfAutoHide() const; 68 bool ShouldBlockShelfAutoHide() const;
67 69
68 // Opens up the palette if it is not already open. Returns true if the palette 70 // Opens up the palette if it is not already open. Returns true if the palette
69 // was opened. 71 // was opened.
70 bool ShowPalette(); 72 bool ShowPalette();
71 73
72 // Returns true if the palette tray contains the given point. This is useful 74 // Returns true if the palette tray contains the given point. This is useful
73 // for determining if an event should be propagated through to the palette. 75 // for determining if an event should be propagated through to the palette.
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 std::unique_ptr<TrayBubbleWrapper> bubble_; 116 std::unique_ptr<TrayBubbleWrapper> bubble_;
115 117
116 // Manages the callback OnPaletteEnabledPrefChanged callback registered to 118 // Manages the callback OnPaletteEnabledPrefChanged callback registered to
117 // the PaletteDelegate instance. 119 // the PaletteDelegate instance.
118 std::unique_ptr<PaletteDelegate::EnableListenerSubscription> 120 std::unique_ptr<PaletteDelegate::EnableListenerSubscription>
119 palette_enabled_subscription_; 121 palette_enabled_subscription_;
120 122
121 // Weak pointer, will be parented by TrayContainer for its lifetime. 123 // Weak pointer, will be parented by TrayContainer for its lifetime.
122 views::ImageView* icon_; 124 views::ImageView* icon_;
123 125
126 // Used to indicate whether the palette bubble is automatically opened by a
127 // stylus eject event.
128 bool is_bubble_auto_opened_ = false;
129
130 // Number of actions in pen palette bubble.
131 int num_actions_in_bubble_ = 0;
132
124 base::WeakPtrFactory<PaletteTray> weak_factory_; 133 base::WeakPtrFactory<PaletteTray> weak_factory_;
125 134
126 DISALLOW_COPY_AND_ASSIGN(PaletteTray); 135 DISALLOW_COPY_AND_ASSIGN(PaletteTray);
127 }; 136 };
128 137
129 } // namespace ash 138 } // namespace ash
130 139
131 #endif // ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_PALETTE_BUTTON_TRAY_H_ 140 #endif // ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_PALETTE_BUTTON_TRAY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698