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

Side by Side Diff: chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.h

Issue 2345043002: arc: Prevent showing Arc app window for secondary user profile. (Closed)
Patch Set: Created 4 years, 3 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
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 4
5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_ARC_APP_WINDOW_LAUNCHER_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_ARC_APP_WINDOW_LAUNCHER_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_ARC_APP_WINDOW_LAUNCHER_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_ARC_APP_WINDOW_LAUNCHER_CONTROLLER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 static std::string GetArcAppIdFromShelfAppId(const std::string& shelf_app_id); 51 static std::string GetArcAppIdFromShelfAppId(const std::string& shelf_app_id);
52 52
53 // AppWindowLauncherController: 53 // AppWindowLauncherController:
54 void ActiveUserChanged(const std::string& user_email) override; 54 void ActiveUserChanged(const std::string& user_email) override;
55 void AdditionalUserAddedToSession(Profile* profile) override; 55 void AdditionalUserAddedToSession(Profile* profile) override;
56 56
57 // aura::EnvObserver: 57 // aura::EnvObserver:
58 void OnWindowInitialized(aura::Window* window) override; 58 void OnWindowInitialized(aura::Window* window) override;
59 59
60 // aura::WindowObserver: 60 // aura::WindowObserver:
61 void OnWindowVisibilityChanged(aura::Window* window, bool visible) override; 61 void OnWindowPropertyChanged(aura::Window* window,
62 const void* key,
63 intptr_t old) override;
62 void OnWindowDestroying(aura::Window* window) override; 64 void OnWindowDestroying(aura::Window* window) override;
63 65
64 // aura::client::ActivationChangeObserver: 66 // aura::client::ActivationChangeObserver:
65 void OnWindowActivated( 67 void OnWindowActivated(
66 aura::client::ActivationChangeObserver::ActivationReason reason, 68 aura::client::ActivationChangeObserver::ActivationReason reason,
67 aura::Window* gained_active, 69 aura::Window* gained_active,
68 aura::Window* lost_active) override; 70 aura::Window* lost_active) override;
69 71
70 // ash::ShellObserver: 72 // ash::ShellObserver:
71 void OnMaximizeModeStarted() override; 73 void OnMaximizeModeStarted() override;
(...skipping 20 matching lines...) Expand all
92 std::map<std::string, ArcAppWindowLauncherItemController*>; 94 std::map<std::string, ArcAppWindowLauncherItemController*>;
93 95
94 void StartObserving(Profile* profile); 96 void StartObserving(Profile* profile);
95 void StopObserving(Profile* profile); 97 void StopObserving(Profile* profile);
96 98
97 void RegisterApp(AppWindow* app_window); 99 void RegisterApp(AppWindow* app_window);
98 void UnregisterApp(AppWindow* app_window, bool close_controller); 100 void UnregisterApp(AppWindow* app_window, bool close_controller);
99 101
100 AppWindow* GetAppWindowForTask(int task_id); 102 AppWindow* GetAppWindowForTask(int task_id);
101 103
102 void AttachControllerToWindowIfNeeded(aura::Window* window); 104 // Returns true if the window has been attached to a controller.
105 bool AttachControllerToWindowIfNeeded(aura::Window* window);
103 void AttachControllerToWindowsIfNeeded(); 106 void AttachControllerToWindowsIfNeeded();
104 107
105 void SetOrientationLockForAppWindow(AppWindow* app_window); 108 void SetOrientationLockForAppWindow(AppWindow* app_window);
106 109
107 // AppWindowLauncherController: 110 // AppWindowLauncherController:
108 AppWindowLauncherItemController* ControllerForWindow( 111 AppWindowLauncherItemController* ControllerForWindow(
109 aura::Window* window) override; 112 aura::Window* window) override;
110 113
111 // Not owned 114 // Not owned
112 ash::ShelfDelegate* shelf_delegate_; 115 ash::ShelfDelegate* shelf_delegate_;
113 int active_task_id_ = -1; 116 int active_task_id_ = -1;
114 TaskIdToAppWindow task_id_to_app_window_; 117 TaskIdToAppWindow task_id_to_app_window_;
115 TaskIdToShelfAppIdMap task_id_to_shelf_app_id_; 118 TaskIdToShelfAppIdMap task_id_to_shelf_app_id_;
116 AppControllerMap app_controller_map_; 119 AppControllerMap app_controller_map_;
117 std::vector<aura::Window*> observed_windows_; 120 std::vector<aura::Window*> observed_windows_;
118 Profile* observed_profile_ = nullptr; 121 Profile* observed_profile_ = nullptr;
119 bool observing_shell_ = false; 122 bool observing_shell_ = false;
120 123
121 DISALLOW_COPY_AND_ASSIGN(ArcAppWindowLauncherController); 124 DISALLOW_COPY_AND_ASSIGN(ArcAppWindowLauncherController);
122 }; 125 };
123 126
124 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_ARC_APP_WINDOW_LAUNCHER_CONTROLLER_H_ 127 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_ARC_APP_WINDOW_LAUNCHER_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698