| 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/common/system/chromeos/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" | 9 #include "ash/common/system/chromeos/palette/palette_tool.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/metrics/histogram_macros.h" | 11 #include "base/metrics/histogram_macros.h" |
| 12 #include "ui/gfx/vector_icons_public.h" |
| 12 | 13 |
| 13 namespace ash { | 14 namespace ash { |
| 14 | 15 |
| 15 PaletteToolManager::PaletteToolManager(Delegate* delegate) | 16 PaletteToolManager::PaletteToolManager(Delegate* delegate) |
| 16 : delegate_(delegate) { | 17 : delegate_(delegate) { |
| 17 DCHECK(delegate_); | 18 DCHECK(delegate_); |
| 18 } | 19 } |
| 19 | 20 |
| 20 PaletteToolManager::~PaletteToolManager() {} | 21 PaletteToolManager::~PaletteToolManager() {} |
| 21 | 22 |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 PaletteTool* PaletteToolManager::FindToolById(PaletteToolId tool_id) { | 139 PaletteTool* PaletteToolManager::FindToolById(PaletteToolId tool_id) { |
| 139 for (std::unique_ptr<PaletteTool>& tool : tools_) { | 140 for (std::unique_ptr<PaletteTool>& tool : tools_) { |
| 140 if (tool->GetToolId() == tool_id) | 141 if (tool->GetToolId() == tool_id) |
| 141 return tool.get(); | 142 return tool.get(); |
| 142 } | 143 } |
| 143 | 144 |
| 144 return nullptr; | 145 return nullptr; |
| 145 } | 146 } |
| 146 | 147 |
| 147 } // namespace ash | 148 } // namespace ash |
| OLD | NEW |