Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 50 | 50 |
| 51 // TrayBackgroundView: | 51 // TrayBackgroundView: |
| 52 void ClickedOutsideBubble() override; | 52 void ClickedOutsideBubble() override; |
| 53 base::string16 GetAccessibleNameForTray() override; | 53 base::string16 GetAccessibleNameForTray() override; |
| 54 void HideBubbleWithView(const views::TrayBubbleView* bubble_view) override; | 54 void HideBubbleWithView(const views::TrayBubbleView* bubble_view) override; |
| 55 void SetShelfAlignment(ShelfAlignment alignment) override; | 55 void SetShelfAlignment(ShelfAlignment alignment) override; |
| 56 void AnchorUpdated() override; | 56 void AnchorUpdated() override; |
| 57 | 57 |
| 58 // PaletteToolManager::Delegate: | 58 // PaletteToolManager::Delegate: |
| 59 void HidePalette() override; | 59 void HidePalette() override; |
| 60 void RecordPaletteOptionsUsage(PaletteTrayOptions option) override; | |
| 61 void RecordPaletteModeCancellation(PaletteModeCancelType type) override; | |
| 60 | 62 |
| 61 // Returns true if the shelf should not autohide. | 63 // Returns true if the shelf should not autohide. |
| 62 bool ShouldBlockShelfAutoHide() const; | 64 bool ShouldBlockShelfAutoHide() const; |
| 63 | 65 |
| 64 // Opens up the palette if it is not already open. Returns true if the palette | 66 // Opens up the palette if it is not already open. Returns true if the palette |
| 65 // was opened. | 67 // was opened. |
| 66 bool ShowPalette(); | 68 bool ShowPalette(); |
| 67 | 69 |
| 68 private: | 70 private: |
| 69 // views::TrayBubbleView::Delegate: | 71 // views::TrayBubbleView::Delegate: |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 106 std::unique_ptr<TrayBubbleWrapper> bubble_; | 108 std::unique_ptr<TrayBubbleWrapper> bubble_; |
| 107 | 109 |
| 108 // Manages the callback OnPaletteEnabledPrefChanged callback registered to | 110 // Manages the callback OnPaletteEnabledPrefChanged callback registered to |
| 109 // the PaletteDelegate instance. | 111 // the PaletteDelegate instance. |
| 110 std::unique_ptr<PaletteDelegate::EnableListenerSubscription> | 112 std::unique_ptr<PaletteDelegate::EnableListenerSubscription> |
| 111 palette_enabled_subscription_; | 113 palette_enabled_subscription_; |
| 112 | 114 |
| 113 // Weak pointer, will be parented by TrayContainer for its lifetime. | 115 // Weak pointer, will be parented by TrayContainer for its lifetime. |
| 114 views::ImageView* icon_; | 116 views::ImageView* icon_; |
| 115 | 117 |
| 118 // Used to indicate whether the palette bubble is automatically opened by a | |
| 119 // stylus | |
|
jdufault
2016/09/08 19:51:35
nit: fix wrapping
xiaoyinh(OOO Sep 11-29)
2016/09/08 23:20:58
Done.
| |
| 120 // eject event. | |
| 121 bool is_bubble_auto_opened_ = false; | |
| 122 | |
| 123 // Number of actions in pen palette bubble. | |
| 124 int num_actions_in_bubble_ = 0; | |
| 125 | |
| 116 base::WeakPtrFactory<PaletteTray> weak_factory_; | 126 base::WeakPtrFactory<PaletteTray> weak_factory_; |
| 117 | 127 |
| 118 DISALLOW_COPY_AND_ASSIGN(PaletteTray); | 128 DISALLOW_COPY_AND_ASSIGN(PaletteTray); |
| 119 }; | 129 }; |
| 120 | 130 |
| 121 } // namespace ash | 131 } // namespace ash |
| 122 | 132 |
| 123 #endif // ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_PALETTE_BUTTON_TRAY_H_ | 133 #endif // ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_PALETTE_BUTTON_TRAY_H_ |
| OLD | NEW |