| 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/system/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/resources/vector_icons/vector_icons.h" | 9 #include "ash/resources/vector_icons/vector_icons.h" |
| 10 #include "ash/system/palette/palette_tool.h" | 10 #include "ash/system/palette/palette_tool.h" |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 } | 121 } |
| 122 | 122 |
| 123 void PaletteToolManager::HidePalette() { | 123 void PaletteToolManager::HidePalette() { |
| 124 delegate_->HidePalette(); | 124 delegate_->HidePalette(); |
| 125 } | 125 } |
| 126 | 126 |
| 127 void PaletteToolManager::HidePaletteImmediately() { | 127 void PaletteToolManager::HidePaletteImmediately() { |
| 128 delegate_->HidePaletteImmediately(); | 128 delegate_->HidePaletteImmediately(); |
| 129 } | 129 } |
| 130 | 130 |
| 131 WmWindow* PaletteToolManager::GetWindow() { | 131 aura::Window* PaletteToolManager::GetWindow() { |
| 132 return delegate_->GetWindow(); | 132 return delegate_->GetWindow(); |
| 133 } | 133 } |
| 134 | 134 |
| 135 void PaletteToolManager::RecordPaletteOptionsUsage(PaletteTrayOptions option) { | 135 void PaletteToolManager::RecordPaletteOptionsUsage(PaletteTrayOptions option) { |
| 136 return delegate_->RecordPaletteOptionsUsage(option); | 136 return delegate_->RecordPaletteOptionsUsage(option); |
| 137 } | 137 } |
| 138 | 138 |
| 139 void PaletteToolManager::RecordPaletteModeCancellation( | 139 void PaletteToolManager::RecordPaletteModeCancellation( |
| 140 PaletteModeCancelType type) { | 140 PaletteModeCancelType type) { |
| 141 return delegate_->RecordPaletteModeCancellation(type); | 141 return delegate_->RecordPaletteModeCancellation(type); |
| 142 } | 142 } |
| 143 | 143 |
| 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 |