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

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

Issue 2732813002: chromeos: Move files in //ash/common to //ash, part 1 (Closed)
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
Index: ash/common/system/chromeos/palette/palette_utils.cc
diff --git a/ash/common/system/chromeos/palette/palette_utils.cc b/ash/common/system/chromeos/palette/palette_utils.cc
deleted file mode 100644
index f32e40c2c1d241818618e559e1a171e39fca7768..0000000000000000000000000000000000000000
--- a/ash/common/system/chromeos/palette/palette_utils.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/common/system/chromeos/palette/palette_utils.h"
-
-#include "ash/common/ash_switches.h"
-#include "ash/common/shelf/wm_shelf.h"
-#include "ash/common/system/chromeos/palette/palette_tray.h"
-#include "ash/common/system/status_area_widget.h"
-#include "ash/common/wm_shell.h"
-#include "ash/common/wm_window.h"
-#include "base/command_line.h"
-#include "ui/events/devices/input_device_manager.h"
-#include "ui/events/devices/touchscreen_device.h"
-#include "ui/gfx/geometry/point.h"
-
-namespace ash {
-namespace palette_utils {
-
-bool HasStylusInput() {
- // Allow the user to force-enable by passing a switch.
- if (base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kAshForceEnablePalette)) {
- return true;
- }
-
- for (const ui::TouchscreenDevice& device :
- ui::InputDeviceManager::GetInstance()->GetTouchscreenDevices()) {
- if (device.is_stylus &&
- device.type == ui::InputDeviceType::INPUT_DEVICE_INTERNAL) {
- return true;
- }
- }
-
- return false;
-}
-
-bool IsPaletteEnabledOnEveryDisplay() {
- return base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kAshEnablePaletteOnAllDisplays);
-}
-
-bool PaletteContainsPointInScreen(const gfx::Point& point) {
- for (WmWindow* window : WmShell::Get()->GetAllRootWindows()) {
- PaletteTray* palette_tray =
- WmShelf::ForWindow(window)->GetStatusAreaWidget()->palette_tray();
- if (palette_tray && palette_tray->ContainsPointInScreen(point))
- return true;
- }
-
- return false;
-}
-
-} // namespace palette_utils
-} // namespace ash
« no previous file with comments | « ash/common/system/chromeos/palette/palette_utils.h ('k') | ash/common/system/chromeos/palette/tools/capture_region_mode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698