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 #include "ash/common/system/chromeos/palette/palette_tool_manager.h" | 5 #include "ash/system/palette/palette_tool_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "ash/common/system/chromeos/palette/palette_tool.h" | |
10 #include "ash/resources/vector_icons/vector_icons.h" | 9 #include "ash/resources/vector_icons/vector_icons.h" |
| 10 #include "ash/system/palette/palette_tool.h" |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/metrics/histogram_macros.h" | 12 #include "base/metrics/histogram_macros.h" |
13 | 13 |
14 namespace ash { | 14 namespace ash { |
15 | 15 |
16 PaletteToolManager::PaletteToolManager(Delegate* delegate) | 16 PaletteToolManager::PaletteToolManager(Delegate* delegate) |
17 : delegate_(delegate) { | 17 : delegate_(delegate) { |
18 DCHECK(delegate_); | 18 DCHECK(delegate_); |
19 } | 19 } |
20 | 20 |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 PaletteTool* PaletteToolManager::FindToolById(PaletteToolId tool_id) const { | 144 PaletteTool* PaletteToolManager::FindToolById(PaletteToolId tool_id) const { |
145 for (const std::unique_ptr<PaletteTool>& tool : tools_) { | 145 for (const std::unique_ptr<PaletteTool>& tool : tools_) { |
146 if (tool->GetToolId() == tool_id) | 146 if (tool->GetToolId() == tool_id) |
147 return tool.get(); | 147 return tool.get(); |
148 } | 148 } |
149 | 149 |
150 return nullptr; | 150 return nullptr; |
151 } | 151 } |
152 | 152 |
153 } // namespace ash | 153 } // namespace ash |
OLD | NEW |