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

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

Issue 14328031: Adding a minimize function for clicks on launcher items if only a single item (already active) is a… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added one unit test and addressed comments Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698