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

Side by Side Diff: ash/common/system/chromeos/palette/tools/magnifier_mode.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 unified diff | Download patch
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 #include "ash/common/system/chromeos/palette/tools/magnifier_mode.h" 5 #include "ash/common/system/chromeos/palette/tools/magnifier_mode.h"
6 6
7 #include "ash/common/palette_delegate.h" 7 #include "ash/common/palette_delegate.h"
8 #include "ash/common/system/chromeos/palette/palette_ids.h" 8 #include "ash/common/system/chromeos/palette/palette_ids.h"
9 #include "ash/common/wm_shell.h" 9 #include "ash/common/wm_shell.h"
10 #include "ash/resources/vector_icons/vector_icons.h"
10 #include "grit/ash_strings.h" 11 #include "grit/ash_strings.h"
11 #include "ui/base/l10n/l10n_util.h" 12 #include "ui/base/l10n/l10n_util.h"
12 13
13 namespace ash { 14 namespace ash {
14 15
15 MagnifierMode::MagnifierMode(Delegate* delegate) 16 MagnifierMode::MagnifierMode(Delegate* delegate)
16 : CommonPaletteTool(delegate) {} 17 : CommonPaletteTool(delegate) {}
17 18
18 MagnifierMode::~MagnifierMode() {} 19 MagnifierMode::~MagnifierMode() {}
19 20
20 PaletteGroup MagnifierMode::GetGroup() const { 21 PaletteGroup MagnifierMode::GetGroup() const {
21 return PaletteGroup::MODE; 22 return PaletteGroup::MODE;
22 } 23 }
23 24
24 PaletteToolId MagnifierMode::GetToolId() const { 25 PaletteToolId MagnifierMode::GetToolId() const {
25 return PaletteToolId::MAGNIFY; 26 return PaletteToolId::MAGNIFY;
26 } 27 }
27 28
28 gfx::VectorIconId MagnifierMode::GetActiveTrayIcon() { 29 const gfx::VectorIcon& MagnifierMode::GetActiveTrayIcon() const {
29 return gfx::VectorIconId::PALETTE_TRAY_ICON_MAGNIFY; 30 return kPaletteTrayIconMagnifyIcon;
30 } 31 }
31 32
32 void MagnifierMode::OnEnable() { 33 void MagnifierMode::OnEnable() {
33 CommonPaletteTool::OnEnable(); 34 CommonPaletteTool::OnEnable();
34 WmShell::Get()->palette_delegate()->SetPartialMagnifierState(true); 35 WmShell::Get()->palette_delegate()->SetPartialMagnifierState(true);
35 } 36 }
36 37
37 void MagnifierMode::OnDisable() { 38 void MagnifierMode::OnDisable() {
38 CommonPaletteTool::OnDisable(); 39 CommonPaletteTool::OnDisable();
39 WmShell::Get()->palette_delegate()->SetPartialMagnifierState(false); 40 WmShell::Get()->palette_delegate()->SetPartialMagnifierState(false);
40 } 41 }
41 42
42 views::View* MagnifierMode::CreateView() { 43 views::View* MagnifierMode::CreateView() {
43 return CreateDefaultView( 44 return CreateDefaultView(
44 l10n_util::GetStringUTF16(IDS_ASH_STYLUS_TOOLS_MAGNIFIER_MODE)); 45 l10n_util::GetStringUTF16(IDS_ASH_STYLUS_TOOLS_MAGNIFIER_MODE));
45 } 46 }
46 47
47 gfx::VectorIconId MagnifierMode::GetPaletteIconId() { 48 const gfx::VectorIcon& MagnifierMode::GetPaletteIcon() const {
48 return gfx::VectorIconId::PALETTE_MODE_MAGNIFY; 49 return kPaletteModeMagnifyIcon;
49 } 50 }
50 51
51 } // namespace ash 52 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/chromeos/palette/tools/magnifier_mode.h ('k') | ash/common/system/chromeos/power/power_status.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698