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

Side by Side Diff: ash/common/system/chromeos/palette/tools/magnifier_mode.cc

Issue 2642723007: chromeos: Removed enable magnifier from palette delegate. (Closed)
Patch Set: Trybot. Created 3 years, 11 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
« no previous file with comments | « ash/common/palette_delegate.h ('k') | ash/common/test/test_palette_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ash/resources/vector_icons/vector_icons.h"
(...skipping 14 matching lines...) Expand all
25 PaletteToolId MagnifierMode::GetToolId() const { 25 PaletteToolId MagnifierMode::GetToolId() const {
26 return PaletteToolId::MAGNIFY; 26 return PaletteToolId::MAGNIFY;
27 } 27 }
28 28
29 const gfx::VectorIcon& MagnifierMode::GetActiveTrayIcon() const { 29 const gfx::VectorIcon& MagnifierMode::GetActiveTrayIcon() const {
30 return kPaletteTrayIconMagnifyIcon; 30 return kPaletteTrayIconMagnifyIcon;
31 } 31 }
32 32
33 void MagnifierMode::OnEnable() { 33 void MagnifierMode::OnEnable() {
34 CommonPaletteTool::OnEnable(); 34 CommonPaletteTool::OnEnable();
35 WmShell::Get()->palette_delegate()->SetPartialMagnifierState(true); 35 WmShell::Get()->SetPartialMagnifierEnabled(true);
36 delegate()->HidePalette(); 36 delegate()->HidePalette();
37 } 37 }
38 38
39 void MagnifierMode::OnDisable() { 39 void MagnifierMode::OnDisable() {
40 CommonPaletteTool::OnDisable(); 40 CommonPaletteTool::OnDisable();
41 WmShell::Get()->palette_delegate()->SetPartialMagnifierState(false); 41 WmShell::Get()->SetPartialMagnifierEnabled(false);
42 } 42 }
43 43
44 views::View* MagnifierMode::CreateView() { 44 views::View* MagnifierMode::CreateView() {
45 return CreateDefaultView( 45 return CreateDefaultView(
46 l10n_util::GetStringUTF16(IDS_ASH_STYLUS_TOOLS_MAGNIFIER_MODE)); 46 l10n_util::GetStringUTF16(IDS_ASH_STYLUS_TOOLS_MAGNIFIER_MODE));
47 } 47 }
48 48
49 const gfx::VectorIcon& MagnifierMode::GetPaletteIcon() const { 49 const gfx::VectorIcon& MagnifierMode::GetPaletteIcon() const {
50 return kPaletteModeMagnifyIcon; 50 return kPaletteModeMagnifyIcon;
51 } 51 }
52 52
53 } // namespace ash 53 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/palette_delegate.h ('k') | ash/common/test/test_palette_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698