OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_SHELL_WINDOW_LAUNCHER_ITEM_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_SHELL_WINDOW_LAUNCHER_ITEM_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_SHELL_WINDOW_LAUNCHER_ITEM_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_SHELL_WINDOW_LAUNCHER_ITEM_CONTROLLER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 | 73 |
74 // Get the number of running applications/incarnations of this. | 74 // Get the number of running applications/incarnations of this. |
75 size_t shell_window_count() const { return shell_windows_.size(); } | 75 size_t shell_window_count() const { return shell_windows_.size(); } |
76 | 76 |
77 // Activates the window at position |index|. | 77 // Activates the window at position |index|. |
78 void ActivateIndexedApp(size_t index); | 78 void ActivateIndexedApp(size_t index); |
79 | 79 |
80 private: | 80 private: |
81 typedef std::list<ShellWindow*> ShellWindowList; | 81 typedef std::list<ShellWindow*> ShellWindowList; |
82 | 82 |
83 void ShowAndActivate(ShellWindow* shell_window); | 83 void ShowAndActivateOrMinimize(ShellWindow* shell_window); |
84 | 84 |
85 // List of associated shell windows | 85 // List of associated shell windows |
86 ShellWindowList shell_windows_; | 86 ShellWindowList shell_windows_; |
87 | 87 |
88 // Pointer to the most recently active shell window | 88 // Pointer to the most recently active shell window |
89 ShellWindow* last_active_shell_window_; | 89 ShellWindow* last_active_shell_window_; |
90 | 90 |
91 // The launcher id associated with this set of windows. There is one | 91 // The launcher id associated with this set of windows. There is one |
92 // AppLauncherItemController for each |app_launcher_id_|. | 92 // AppLauncherItemController for each |app_launcher_id_|. |
93 const std::string app_launcher_id_; | 93 const std::string app_launcher_id_; |
94 | 94 |
95 // Scoped list of observed windows (for removal on destruction) | 95 // Scoped list of observed windows (for removal on destruction) |
96 ScopedObserver<aura::Window, aura::WindowObserver> observed_windows_; | 96 ScopedObserver<aura::Window, aura::WindowObserver> observed_windows_; |
97 | 97 |
98 DISALLOW_COPY_AND_ASSIGN(ShellWindowLauncherItemController); | 98 DISALLOW_COPY_AND_ASSIGN(ShellWindowLauncherItemController); |
99 }; | 99 }; |
100 | 100 |
101 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_SHELL_WINDOW_LAUNCHER_ITEM_CONTROLLER_
H_ | 101 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_SHELL_WINDOW_LAUNCHER_ITEM_CONTROLLER_
H_ |
OLD | NEW |