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 RecordPaletteMetrics(ash::PaletteTrayOptions option) override; | |
| 60 | 61 |
| 61 // Returns true if the shelf should not autohide. | 62 // Returns true if the shelf should not autohide. |
| 62 bool ShouldBlockShelfAutoHide() const; | 63 bool ShouldBlockShelfAutoHide() const; |
| 63 | 64 |
| 64 // Opens up the palette if it is not already open. Returns true if the palette | 65 // Opens up the palette if it is not already open. Returns true if the palette |
| 65 // was opened. | 66 // was opened. |
| 66 bool ShowPalette(); | 67 bool ShowPalette(); |
| 67 | 68 |
| 68 private: | 69 private: |
| 69 // views::TrayBubbleView::Delegate: | 70 // views::TrayBubbleView::Delegate: |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 106 std::unique_ptr<TrayBubbleWrapper> bubble_; | 107 std::unique_ptr<TrayBubbleWrapper> bubble_; |
| 107 | 108 |
| 108 // Manages the callback OnPaletteEnabledPrefChanged callback registered to | 109 // Manages the callback OnPaletteEnabledPrefChanged callback registered to |
| 109 // the PaletteDelegate instance. | 110 // the PaletteDelegate instance. |
| 110 std::unique_ptr<PaletteDelegate::EnableListenerSubscription> | 111 std::unique_ptr<PaletteDelegate::EnableListenerSubscription> |
| 111 palette_enabled_subscription_; | 112 palette_enabled_subscription_; |
| 112 | 113 |
| 113 // Weak pointer, will be parented by TrayContainer for its lifetime. | 114 // Weak pointer, will be parented by TrayContainer for its lifetime. |
| 114 views::ImageView* icon_; | 115 views::ImageView* icon_; |
| 115 | 116 |
| 117 // Used to indicate whether the palette is automatically opened by a stylus | |
| 118 // eject event. | |
| 119 bool is_palette_auto_opened = false; | |
|
jdufault
2016/09/02 21:54:30
What about is_bubble_auto_opened_?
xiaoyinh(OOO Sep 11-29)
2016/09/06 17:40:05
Done.
| |
| 120 | |
| 121 // Number of actions in pen palette. | |
| 122 int num_actions_in_palette = 0; | |
|
jdufault
2016/09/02 21:54:30
num_actions_in_bubble_?
xiaoyinh(OOO Sep 11-29)
2016/09/06 17:40:05
Done.
| |
| 123 | |
| 116 base::WeakPtrFactory<PaletteTray> weak_factory_; | 124 base::WeakPtrFactory<PaletteTray> weak_factory_; |
| 117 | 125 |
| 118 DISALLOW_COPY_AND_ASSIGN(PaletteTray); | 126 DISALLOW_COPY_AND_ASSIGN(PaletteTray); |
| 119 }; | 127 }; |
| 120 | 128 |
| 121 } // namespace ash | 129 } // namespace ash |
| 122 | 130 |
| 123 #endif // ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_PALETTE_BUTTON_TRAY_H_ | 131 #endif // ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_PALETTE_BUTTON_TRAY_H_ |
| OLD | NEW |