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

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

Issue 2269383002: Magnifier border is now more visible on light backgrounds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Created 4 years, 4 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "ash/common/system/chromeos/palette/tools/capture_screen_action.h"
6
7 #include "ash/common/palette_delegate.h"
8 #include "ash/common/system/chromeos/palette/palette_ids.h"
9 #include "ash/common/wm_shell.h"
10 #include "grit/ash_strings.h"
11 #include "ui/base/l10n/l10n_util.h"
12
13 namespace ash {
14
15 CaptureScreenAction::CaptureScreenAction(Delegate* delegate)
16 : CommonPaletteTool(delegate) {}
17
18 CaptureScreenAction::~CaptureScreenAction() {}
19
20 PaletteGroup CaptureScreenAction::GetGroup() const {
21 return PaletteGroup::ACTION;
22 }
23
24 PaletteToolId CaptureScreenAction::GetToolId() const {
25 return PaletteToolId::CAPTURE_SCREEN;
26 }
27
28 void CaptureScreenAction::OnEnable() {
29 CommonPaletteTool::OnEnable();
30
31 WmShell::Get()->palette_delegate()->TakeScreenshot();
32 delegate()->DisableTool(GetToolId());
33 delegate()->HidePalette();
34 }
35
36 views::View* CaptureScreenAction::CreateView() {
37 return CreateDefaultView(
38 l10n_util::GetStringUTF16(IDS_ASH_PALETTE_CAPTURE_SCREEN_ACTION));
39 }
40
41 gfx::VectorIconId CaptureScreenAction::GetPaletteIconId() {
42 return gfx::VectorIconId::PALETTE_ACTION_CAPTURE_SCREEN;
43 }
44
45 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698