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

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

Issue 2738133003: Promotes a handful of members from WmShell to Shell (Closed)
Patch Set: merge Created 3 years, 9 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/capture_screen_action.h" 5 #include "ash/common/system/chromeos/palette/tools/capture_screen_action.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"
10 #include "ash/resources/vector_icons/vector_icons.h" 9 #include "ash/resources/vector_icons/vector_icons.h"
10 #include "ash/shell.h"
11 #include "ash/strings/grit/ash_strings.h" 11 #include "ash/strings/grit/ash_strings.h"
12 #include "ui/base/l10n/l10n_util.h" 12 #include "ui/base/l10n/l10n_util.h"
13 13
14 namespace ash { 14 namespace ash {
15 15
16 CaptureScreenAction::CaptureScreenAction(Delegate* delegate) 16 CaptureScreenAction::CaptureScreenAction(Delegate* delegate)
17 : CommonPaletteTool(delegate) {} 17 : CommonPaletteTool(delegate) {}
18 18
19 CaptureScreenAction::~CaptureScreenAction() {} 19 CaptureScreenAction::~CaptureScreenAction() {}
20 20
21 PaletteGroup CaptureScreenAction::GetGroup() const { 21 PaletteGroup CaptureScreenAction::GetGroup() const {
22 return PaletteGroup::ACTION; 22 return PaletteGroup::ACTION;
23 } 23 }
24 24
25 PaletteToolId CaptureScreenAction::GetToolId() const { 25 PaletteToolId CaptureScreenAction::GetToolId() const {
26 return PaletteToolId::CAPTURE_SCREEN; 26 return PaletteToolId::CAPTURE_SCREEN;
27 } 27 }
28 28
29 void CaptureScreenAction::OnEnable() { 29 void CaptureScreenAction::OnEnable() {
30 CommonPaletteTool::OnEnable(); 30 CommonPaletteTool::OnEnable();
31 31
32 delegate()->DisableTool(GetToolId()); 32 delegate()->DisableTool(GetToolId());
33 delegate()->HidePaletteImmediately(); 33 delegate()->HidePaletteImmediately();
34 WmShell::Get()->palette_delegate()->TakeScreenshot(); 34 Shell::GetInstance()->palette_delegate()->TakeScreenshot();
35 } 35 }
36 36
37 views::View* CaptureScreenAction::CreateView() { 37 views::View* CaptureScreenAction::CreateView() {
38 return CreateDefaultView( 38 return CreateDefaultView(
39 l10n_util::GetStringUTF16(IDS_ASH_STYLUS_TOOLS_CAPTURE_SCREEN_ACTION)); 39 l10n_util::GetStringUTF16(IDS_ASH_STYLUS_TOOLS_CAPTURE_SCREEN_ACTION));
40 } 40 }
41 41
42 const gfx::VectorIcon& CaptureScreenAction::GetPaletteIcon() const { 42 const gfx::VectorIcon& CaptureScreenAction::GetPaletteIcon() const {
43 return kPaletteActionCaptureScreenIcon; 43 return kPaletteActionCaptureScreenIcon;
44 } 44 }
45 45
46 } // namespace ash 46 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698