OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 "components/arc/arc_util.h" | 5 #include "components/arc/arc_util.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
| 9 #include "ash/shared/app_types.h" |
9 #include "base/command_line.h" | 10 #include "base/command_line.h" |
10 #include "base/feature_list.h" | 11 #include "base/feature_list.h" |
11 #include "chromeos/chromeos_switches.h" | 12 #include "chromeos/chromeos_switches.h" |
12 #include "components/user_manager/user_manager.h" | 13 #include "components/user_manager/user_manager.h" |
| 14 #include "ui/aura/client/aura_constants.h" |
| 15 #include "ui/aura/window.h" |
13 | 16 |
14 namespace arc { | 17 namespace arc { |
15 | 18 |
16 namespace { | 19 namespace { |
17 | 20 |
18 // This is for finch. See also crbug.com/633704 for details. | 21 // This is for finch. See also crbug.com/633704 for details. |
19 // TODO(hidehiko): More comments of the intention how this works, when | 22 // TODO(hidehiko): More comments of the intention how this works, when |
20 // we unify the commandline flags. | 23 // we unify the commandline flags. |
21 const base::Feature kEnableArcFeature{"EnableARC", | 24 const base::Feature kEnableArcFeature{"EnableARC", |
22 base::FEATURE_DISABLED_BY_DEFAULT}; | 25 base::FEATURE_DISABLED_BY_DEFAULT}; |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 chromeos::switches::kArcAvailability) == | 107 chromeos::switches::kArcAvailability) == |
105 kAvailabilityOfficiallySupportedWithActiveDirectory; | 108 kAvailabilityOfficiallySupportedWithActiveDirectory; |
106 } | 109 } |
107 | 110 |
108 bool IsArcOptInVerificationDisabled() { | 111 bool IsArcOptInVerificationDisabled() { |
109 const auto* command_line = base::CommandLine::ForCurrentProcess(); | 112 const auto* command_line = base::CommandLine::ForCurrentProcess(); |
110 return command_line->HasSwitch( | 113 return command_line->HasSwitch( |
111 chromeos::switches::kDisableArcOptInVerification); | 114 chromeos::switches::kDisableArcOptInVerification); |
112 } | 115 } |
113 | 116 |
| 117 bool IsArcAppWindow(aura::Window* window) { |
| 118 if (!window) |
| 119 return false; |
| 120 return window->GetProperty(aura::client::kAppType) == |
| 121 static_cast<int>(ash::AppType::ARC_APP); |
| 122 } |
| 123 |
114 } // namespace arc | 124 } // namespace arc |
OLD | NEW |