OLD | NEW |
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 #include "chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.h" | 4 #include "chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.h" |
5 | 5 |
6 #include <string> | 6 #include <string> |
7 | 7 |
8 #include "ash/aura/wm_window_aura.h" | 8 #include "ash/aura/wm_window_aura.h" |
9 #include "ash/common/shelf/shelf_delegate.h" | 9 #include "ash/common/shelf/shelf_delegate.h" |
10 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h" | 10 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h" |
11 #include "ash/common/wm/window_state.h" | 11 #include "ash/common/wm/window_state.h" |
12 #include "ash/common/wm_lookup.h" | 12 #include "ash/common/wm_lookup.h" |
13 #include "ash/common/wm_shell.h" | 13 #include "ash/common/wm_shell.h" |
14 #include "ash/common/wm_window_property.h" | 14 #include "ash/common/wm_window_property.h" |
15 #include "ash/display/display_manager.h" | |
16 #include "ash/display/screen_orientation_controller_chromeos.h" | 15 #include "ash/display/screen_orientation_controller_chromeos.h" |
17 #include "ash/shared/app_types.h" | 16 #include "ash/shared/app_types.h" |
18 #include "ash/shell.h" | 17 #include "ash/shell.h" |
19 #include "ash/wm/window_state_aura.h" | 18 #include "ash/wm/window_state_aura.h" |
20 #include "ash/wm/window_util.h" | 19 #include "ash/wm/window_util.h" |
21 #include "base/bind.h" | 20 #include "base/bind.h" |
22 #include "chrome/browser/chromeos/arc/arc_auth_service.h" | 21 #include "chrome/browser/chromeos/arc/arc_auth_service.h" |
23 #include "chrome/browser/chromeos/arc/arc_support_host.h" | 22 #include "chrome/browser/chromeos/arc/arc_support_host.h" |
24 #include "chrome/browser/profiles/profile.h" | 23 #include "chrome/browser/profiles/profile.h" |
25 #include "chrome/browser/ui/app_list/arc/arc_app_utils.h" | 24 #include "chrome/browser/ui/app_list/arc/arc_app_utils.h" |
26 #include "chrome/browser/ui/ash/launcher/arc_app_window_launcher_item_controller
.h" | 25 #include "chrome/browser/ui/ash/launcher/arc_app_window_launcher_item_controller
.h" |
27 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" | 26 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" |
28 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h" | 27 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h" |
29 #include "components/arc/arc_bridge_service.h" | 28 #include "components/arc/arc_bridge_service.h" |
30 #include "components/exo/shell_surface.h" | 29 #include "components/exo/shell_surface.h" |
31 #include "components/signin/core/account_id/account_id.h" | 30 #include "components/signin/core/account_id/account_id.h" |
32 #include "components/user_manager/user_manager.h" | 31 #include "components/user_manager/user_manager.h" |
33 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebScree
nOrientationLockType.h" | 32 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebScree
nOrientationLockType.h" |
34 #include "ui/aura/client/aura_constants.h" | 33 #include "ui/aura/client/aura_constants.h" |
35 #include "ui/aura/env.h" | 34 #include "ui/aura/env.h" |
36 #include "ui/base/base_window.h" | 35 #include "ui/base/base_window.h" |
37 #include "ui/display/display.h" | 36 #include "ui/display/display.h" |
| 37 #include "ui/display/manager/display_manager.h" |
38 #include "ui/views/widget/widget.h" | 38 #include "ui/views/widget/widget.h" |
39 | 39 |
40 namespace { | 40 namespace { |
41 | 41 |
42 enum class FullScreenMode { | 42 enum class FullScreenMode { |
43 NOT_DEFINED, // Fullscreen mode was not defined. | 43 NOT_DEFINED, // Fullscreen mode was not defined. |
44 ACTIVE, // Fullscreen is activated for an app. | 44 ACTIVE, // Fullscreen is activated for an app. |
45 NON_ACTIVE, // Fullscreen was not activated for an app. | 45 NON_ACTIVE, // Fullscreen was not activated for an app. |
46 }; | 46 }; |
47 | 47 |
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
716 | 716 |
717 if (orientation_lock == arc::mojom::OrientationLock::CURRENT) { | 717 if (orientation_lock == arc::mojom::OrientationLock::CURRENT) { |
718 // Resolve the orientation when it first resolved. | 718 // Resolve the orientation when it first resolved. |
719 orientation_lock = GetCurrentOrientation(); | 719 orientation_lock = GetCurrentOrientation(); |
720 info->set_requested_orientation_lock(orientation_lock); | 720 info->set_requested_orientation_lock(orientation_lock); |
721 } | 721 } |
722 ash::Shell* shell = ash::Shell::GetInstance(); | 722 ash::Shell* shell = ash::Shell::GetInstance(); |
723 shell->screen_orientation_controller()->LockOrientationForWindow( | 723 shell->screen_orientation_controller()->LockOrientationForWindow( |
724 window, BlinkOrientationLockFromMojom(orientation_lock)); | 724 window, BlinkOrientationLockFromMojom(orientation_lock)); |
725 } | 725 } |
OLD | NEW |