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

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

Issue 2346833003: cros: Hide stylus tools on various sign-in screens, disable active mode when inserting stylus. (Closed)
Patch Set: Initial upload 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
« no previous file with comments | « no previous file | ash/common/system/chromeos/palette/palette_tool_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_TOOL_MANAGER_H_ 5 #ifndef ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_PALETTE_TOOL_MANAGER_H_
6 #define ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_PALETTE_TOOL_MANAGER_H_ 6 #define ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_PALETTE_TOOL_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 // gfx::VectorIconId::VECTOR_ICON_NONE if not available. 83 // gfx::VectorIconId::VECTOR_ICON_NONE if not available.
84 const gfx::VectorIcon& GetActiveTrayIcon(PaletteToolId tool_id) const; 84 const gfx::VectorIcon& GetActiveTrayIcon(PaletteToolId tool_id) const;
85 85
86 // Create views for all of the registered tools. 86 // Create views for all of the registered tools.
87 std::vector<PaletteToolView> CreateViews(); 87 std::vector<PaletteToolView> CreateViews();
88 88
89 // Called when the views returned by CreateViews have been destroyed. This 89 // Called when the views returned by CreateViews have been destroyed. This
90 // should clear any (now) stale references. 90 // should clear any (now) stale references.
91 void NotifyViewsDestroyed(); 91 void NotifyViewsDestroyed();
92 92
93 // Helper method to disable any active tool in the given |group|.
94 void DisableActiveTool(PaletteGroup group);
95
93 private: 96 private:
94 // PaleteTool::Delegate overrides. 97 // PaleteTool::Delegate overrides.
95 void EnableTool(PaletteToolId tool_id) override; 98 void EnableTool(PaletteToolId tool_id) override;
96 void DisableTool(PaletteToolId tool_id) override; 99 void DisableTool(PaletteToolId tool_id) override;
97 void HidePalette() override; 100 void HidePalette() override;
98 WmWindow* GetWindow() override; 101 WmWindow* GetWindow() override;
99 void RecordPaletteOptionsUsage(ash::PaletteTrayOptions option) override; 102 void RecordPaletteOptionsUsage(ash::PaletteTrayOptions option) override;
100 void RecordPaletteModeCancellation(PaletteModeCancelType type) override; 103 void RecordPaletteModeCancellation(PaletteModeCancelType type) override;
101 104
102 PaletteTool* FindToolById(PaletteToolId tool_id) const; 105 PaletteTool* FindToolById(PaletteToolId tool_id) const;
103 106
104 // Unowned pointer to the delegate to provide external functionality. 107 // Unowned pointer to the delegate to provide external functionality.
105 Delegate* delegate_; 108 Delegate* delegate_;
106 109
107 // Unowned pointer to the active tool / group. 110 // Unowned pointer to the active tool / group.
108 std::map<PaletteGroup, PaletteTool*> active_tools_; 111 std::map<PaletteGroup, PaletteTool*> active_tools_;
109 112
110 // Owned list of all tools. 113 // Owned list of all tools.
111 std::vector<std::unique_ptr<PaletteTool>> tools_; 114 std::vector<std::unique_ptr<PaletteTool>> tools_;
112 115
113 DISALLOW_COPY_AND_ASSIGN(PaletteToolManager); 116 DISALLOW_COPY_AND_ASSIGN(PaletteToolManager);
114 }; 117 };
115 118
116 } // namespace ash 119 } // namespace ash
117 120
118 #endif // ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_PALETTE_TOOL_MANAGER_H_ 121 #endif // ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_PALETTE_TOOL_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | ash/common/system/chromeos/palette/palette_tool_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698