Commit 92eabd43 authored by Qiang Xu's avatar Qiang Xu Committed by Commit Bot

cros: move MagnifierType to chrome/

changes:
MagnifierType is only used in chrome/. This CL moves it to chrome/.

TBR=emaxx@chromium.org

Bug: none
Test: compile
Change-Id: I75241de96f77004b906cfb762829c9bd01e470b9
Reviewed-on: https://chromium-review.googlesource.com/1116760
Commit-Queue: Qiang Xu <warx@google.com>
Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#570797}
parent fdadc5fd
......@@ -6,7 +6,6 @@
#define ASH_ACCESSIBILITY_ACCESSIBILITY_DELEGATE_H_
#include "ash/ash_export.h"
#include "ash/public/cpp/accessibility_types.h"
#include "base/time/time.h"
#include "ui/accessibility/ax_enums.mojom.h"
......
......@@ -7,7 +7,6 @@
#include "ash/accessibility/accessibility_delegate.h"
#include "ash/ash_export.h"
#include "ash/public/cpp/accessibility_types.h"
#include "base/macros.h"
namespace ash {
......
......@@ -9,7 +9,6 @@ component("cpp") {
sources = [
"accelerators.cc",
"accelerators.h",
"accessibility_types.h",
"app_list/answer_card_contents_registry.cc",
"app_list/answer_card_contents_registry.h",
"app_list/app_list_config.cc",
......
......@@ -243,6 +243,7 @@ source_set("chromeos") {
"accessibility/event_handler_common.h",
"accessibility/magnification_manager.cc",
"accessibility/magnification_manager.h",
"accessibility/magnifier_type.h",
"accessibility/select_to_speak_event_handler.cc",
"accessibility/select_to_speak_event_handler.h",
"accessibility/spoken_feedback_event_rewriter_delegate.cc",
......
// Copyright 2014 The Chromium Authors. All rights reserved.
// Copyright 2018 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.
#ifndef ASH_PUBLIC_CPP_ACCESSIBILITY_TYPES_H_
#define ASH_PUBLIC_CPP_ACCESSIBILITY_TYPES_H_
#ifndef CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_MAGNIFIER_TYPE_H_
#define CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_MAGNIFIER_TYPE_H_
namespace ash {
namespace chromeos {
// TODO(warx): move MagnifierType under chrome/browser/chromeos/accessibility/.
// Note: Do not change these values; UMA and prefs depend on them.
enum MagnifierType {
MAGNIFIER_DISABLED = 0, // Used by enterprise policy.
MAGNIFIER_FULL = 1,
// Never shipped. Deprioritized in 2013. http://crbug.com/170850
// MAGNIFIER_PARTIAL = 2,
// TODO(afakhy|warx): Docked magnifier (MAGNIFIER_PARTIAL) is shipped in M66.
// Add policy control of it.
// TODO(afakhy): Consider adding Docked Magnifier type (shipped in M66) for
// policy control.
};
} // namespace ash
} // namespace chromeos
#endif // ASH_PUBLIC_CPP_ACCESSIBILITY_TYPES_H_
#endif // CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_MAGNIFIER_TYPE_H_
......@@ -10,7 +10,6 @@
#include <utility>
#include <vector>
#include "ash/public/cpp/accessibility_types.h"
#include "ash/public/cpp/ash_pref_names.h"
#include "base/callback.h"
#include "base/json/json_reader.h"
......@@ -19,6 +18,7 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/values.h"
#include "chrome/browser/chromeos/accessibility/magnifier_type.h"
#include "chrome/browser/ui/ash/chrome_launcher_prefs.h"
#include "chrome/common/pref_names.h"
#include "chromeos/dbus/power_policy_controller.h"
......@@ -337,8 +337,8 @@ void PinnedLauncherAppsPolicyHandler::ApplyList(
ScreenMagnifierPolicyHandler::ScreenMagnifierPolicyHandler()
: IntRangePolicyHandlerBase(key::kScreenMagnifierType,
ash::MAGNIFIER_DISABLED,
ash::MAGNIFIER_FULL,
chromeos::MAGNIFIER_DISABLED,
chromeos::MAGNIFIER_FULL,
false) {}
ScreenMagnifierPolicyHandler::~ScreenMagnifierPolicyHandler() {
......@@ -353,7 +353,7 @@ void ScreenMagnifierPolicyHandler::ApplyPolicySettings(
// The "type" is only used to enable or disable the feature as a whole.
// http://crbug.com/170850
prefs->SetBoolean(ash::prefs::kAccessibilityScreenMagnifierEnabled,
value_in_range != ash::MAGNIFIER_DISABLED);
value_in_range != chromeos::MAGNIFIER_DISABLED);
}
}
......
......@@ -4,7 +4,6 @@
#include <string>
#include "ash/public/cpp/accessibility_types.h"
#include "ash/public/cpp/ash_pref_names.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
......
......@@ -70,8 +70,8 @@
#endif
#if defined(OS_CHROMEOS)
#include "ash/public/cpp/accessibility_types.h"
#include "ash/public/cpp/ash_pref_names.h"
#include "chrome/browser/chromeos/accessibility/magnifier_type.h"
#include "chrome/browser/chromeos/platform_keys/key_permissions_policy_handler.h"
#include "chrome/browser/chromeos/policy/configuration_policy_handler_chromeos.h"
#include "chrome/browser/chromeos/policy/secondary_google_account_signin_policy_handler.h"
......@@ -1213,7 +1213,7 @@ std::unique_ptr<ConfigurationPolicyHandlerList> BuildHandlerList(
key::kUptimeLimit, prefs::kUptimeLimit, 3600, INT_MAX, true));
handlers->AddHandler(base::WrapUnique(new IntRangePolicyHandler(
key::kDeviceLoginScreenDefaultScreenMagnifierType, nullptr,
ash::MAGNIFIER_DISABLED, ash::MAGNIFIER_FULL, false)));
chromeos::MAGNIFIER_DISABLED, chromeos::MAGNIFIER_FULL, false)));
// TODO(binjin): Remove LegacyPoliciesDeprecatingPolicyHandler for these two
// policies once deprecation of legacy power management policies is done.
// http://crbug.com/346229
......
......@@ -238,11 +238,11 @@
#include "url/origin.h"
#if defined(OS_CHROMEOS)
#include "ash/public/cpp/accessibility_types.h"
#include "ash/public/cpp/ash_switches.h"
#include "ash/shell.h"
#include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
#include "chrome/browser/chromeos/accessibility/magnification_manager.h"
#include "chrome/browser/chromeos/accessibility/magnifier_type.h"
#include "chrome/browser/chromeos/arc/arc_session_manager.h"
#include "chrome/browser/chromeos/login/test/js_checker.h"
#include "chrome/browser/chromeos/note_taking_helper.h"
......@@ -3540,7 +3540,8 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, ScreenMagnifierTypeFull) {
PolicyMap policies;
policies.Set(key::kScreenMagnifierType, POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER, POLICY_SOURCE_CLOUD,
std::make_unique<base::Value>(ash::MAGNIFIER_FULL), nullptr);
std::make_unique<base::Value>(chromeos::MAGNIFIER_FULL),
nullptr);
UpdateProviderPolicy(policies);
EXPECT_TRUE(magnification_manager->IsMagnifierEnabled());
......
......@@ -10,7 +10,6 @@
#include <vector>
#include "ash/accessibility/accessibility_delegate.h"
#include "ash/public/cpp/accessibility_types.h"
#include "ash/screenshot_delegate.h"
#include "base/macros.h"
#include "chrome/browser/browser_process.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment