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

Unified Diff: ash/common/system/chromeos/palette/palette_tool_manager.cc

Issue 2316183003: Move a bunch of ash-only vector icons to ash/. (Closed)
Patch Set: drop the "id". Just "icon". It's cleaner. 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 side-by-side diff with in-line comments
Download patch
Index: ash/common/system/chromeos/palette/palette_tool_manager.cc
diff --git a/ash/common/system/chromeos/palette/palette_tool_manager.cc b/ash/common/system/chromeos/palette/palette_tool_manager.cc
index f06900a16b276b98dab8da7be05dee965da99858..b9a306ec2d91e4103125ffffa00a45812d153ecf 100644
--- a/ash/common/system/chromeos/palette/palette_tool_manager.cc
+++ b/ash/common/system/chromeos/palette/palette_tool_manager.cc
@@ -7,8 +7,8 @@
#include <algorithm>
#include "ash/common/system/chromeos/palette/palette_tool.h"
+#include "ash/resources/vector_icons/vector_icons.h"
#include "base/bind.h"
-#include "ui/gfx/vector_icons_public.h"
namespace ash {
@@ -69,10 +69,11 @@ PaletteToolId PaletteToolManager::GetActiveTool(PaletteGroup group) {
return active_tool ? active_tool->GetToolId() : PaletteToolId::NONE;
}
-gfx::VectorIconId PaletteToolManager::GetActiveTrayIcon(PaletteToolId tool_id) {
+const gfx::VectorIcon& PaletteToolManager::GetActiveTrayIcon(
+ PaletteToolId tool_id) const {
PaletteTool* tool = FindToolById(tool_id);
if (!tool)
- return gfx::VectorIconId::PALETTE_TRAY_ICON_DEFAULT;
+ return kPaletteTrayIconDefaultIcon;
return tool->GetActiveTrayIcon();
}
@@ -117,8 +118,8 @@ WmWindow* PaletteToolManager::GetWindow() {
return delegate_->GetWindow();
}
-PaletteTool* PaletteToolManager::FindToolById(PaletteToolId tool_id) {
- for (std::unique_ptr<PaletteTool>& tool : tools_) {
+PaletteTool* PaletteToolManager::FindToolById(PaletteToolId tool_id) const {
+ for (const std::unique_ptr<PaletteTool>& tool : tools_) {
if (tool->GetToolId() == tool_id)
return tool.get();
}
« no previous file with comments | « ash/common/system/chromeos/palette/palette_tool_manager.h ('k') | ash/common/system/chromeos/palette/palette_tray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698