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

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

Issue 2251313002: Revert of arc: Fix crash on Arc window close. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 4 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
« no previous file with comments | « no previous file | chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 const std::string& package_name, 78 const std::string& package_name,
79 const std::string& activity) override; 79 const std::string& activity) override;
80 void OnTaskDestroyed(int task_id) override; 80 void OnTaskDestroyed(int task_id) override;
81 void OnTaskSetActive(int32_t task_id) override; 81 void OnTaskSetActive(int32_t task_id) override;
82 void OnTaskOrientationLockRequested( 82 void OnTaskOrientationLockRequested(
83 int32_t task_id, 83 int32_t task_id,
84 const arc::mojom::OrientationLock orientation_lock) override; 84 const arc::mojom::OrientationLock orientation_lock) override;
85 85
86 private: 86 private:
87 class AppWindow; 87 class AppWindow;
88 struct TaskInfo;
89 88
90 using TaskIdToAppWindow = std::map<int, std::unique_ptr<AppWindow>>; 89 using TaskIdToAppWindow = std::map<int, std::unique_ptr<AppWindow>>;
91 using TaskIdToTaskInfoMap = std::map<int, std::unique_ptr<TaskInfo>>;
92 using AppControllerMap = 90 using AppControllerMap =
93 std::map<std::string, ArcAppWindowLauncherItemController*>; 91 std::map<std::string, ArcAppWindowLauncherItemController*>;
94 92
95 void StartObserving(Profile* profile); 93 void StartObserving(Profile* profile);
96 void StopObserving(Profile* profile); 94 void StopObserving(Profile* profile);
97 95
98 void RegisterApp(AppWindow* app_window); 96 void RegisterApp(AppWindow* app_window);
99 void UnregisterApp(AppWindow* app_window); 97 void UnregisterApp(AppWindow* app_window);
100 98
101 AppWindow* GetAppWindowForTask(int task_id); 99 AppWindow* GetAppWindowForTask(int task_id);
102 100
103 void MayAttachContollerToWindow(aura::Window* window); 101 void CheckForAppWindowWidget(aura::Window* window);
104 102
105 void SetOrientationLockForAppWindow(AppWindow* app_window); 103 void SetOrientationLockForAppWindow(AppWindow* app_window);
106 104
107 // AppWindowLauncherController: 105 // AppWindowLauncherController:
108 AppWindowLauncherItemController* ControllerForWindow( 106 AppWindowLauncherItemController* ControllerForWindow(
109 aura::Window* window) override; 107 aura::Window* window) override;
110 108
111 // Not owned 109 // Not owned
112 ash::ShelfDelegate* shelf_delegate_; 110 ash::ShelfDelegate* shelf_delegate_;
113 int active_task_id_ = -1; 111 int active_task_id_ = -1;
114 TaskIdToAppWindow task_id_to_app_window_; 112 TaskIdToAppWindow task_id_to_app_window_;
115 TaskIdToTaskInfoMap task_id_to_task_info_;
116 AppControllerMap app_controller_map_; 113 AppControllerMap app_controller_map_;
117 std::vector<aura::Window*> observed_windows_; 114 std::vector<aura::Window*> observed_windows_;
118 Profile* observed_profile_ = nullptr; 115 Profile* observed_profile_ = nullptr;
119 bool observing_shell_ = false; 116 bool observing_shell_ = false;
120 117
121 DISALLOW_COPY_AND_ASSIGN(ArcAppWindowLauncherController); 118 DISALLOW_COPY_AND_ASSIGN(ArcAppWindowLauncherController);
122 }; 119 };
123 120
124 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_ARC_APP_WINDOW_LAUNCHER_CONTROLLER_H_ 121 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_ARC_APP_WINDOW_LAUNCHER_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698