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

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

Issue 13007002: Create launcher app list for shell windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 9 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
11 #include "base/memory/scoped_ptr.h"
11 #include "base/scoped_observer.h" 12 #include "base/scoped_observer.h"
12 #include "chrome/browser/ui/ash/launcher/launcher_item_controller.h" 13 #include "chrome/browser/ui/ash/launcher/launcher_item_controller.h"
13 #include "ui/aura/window_observer.h" 14 #include "ui/aura/window_observer.h"
14 15
15 namespace aura { 16 namespace aura {
16 class Window; 17 class Window;
17 } 18 }
18 19
19 namespace gfx { 20 namespace gfx {
20 class Image; 21 class Image;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 73
73 // Get the number of running applications/incarnations of this. 74 // Get the number of running applications/incarnations of this.
74 size_t shell_window_count() const { return shell_windows_.size(); } 75 size_t shell_window_count() const { return shell_windows_.size(); }
75 76
76 // Activates the window at position |index|. 77 // Activates the window at position |index|.
77 void ActivateIndexedApp(size_t index); 78 void ActivateIndexedApp(size_t index);
78 79
79 private: 80 private:
80 typedef std::list<ShellWindow*> ShellWindowList; 81 typedef std::list<ShellWindow*> ShellWindowList;
81 82
82 // Get the title of the running application with this |index|.
83 string16 GetTitleOfIndexedApp(size_t index);
84
85 // Get the title of the running application with this |index|.
86 // Note that the returned image needs to be released by the caller.
87 gfx::Image* GetIconOfIndexedApp(size_t index);
88
89 void RestoreOrShow(ShellWindow* shell_window); 83 void RestoreOrShow(ShellWindow* shell_window);
90 84
91 // List of associated shell windows in activation order. 85 // List of associated shell windows
92 ShellWindowList shell_windows_; 86 ShellWindowList shell_windows_;
93 87
88 // Pointer to the most recently active shell window
89 ShellWindow* last_active_shell_window_;
90
94 // 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
95 // AppLauncherItemController for each |app_launcher_id_|. 92 // AppLauncherItemController for each |app_launcher_id_|.
96 const std::string app_launcher_id_; 93 const std::string app_launcher_id_;
97 94
98 // Scoped list of observed windows (for removal on destruction) 95 // Scoped list of observed windows (for removal on destruction)
99 ScopedObserver<aura::Window, aura::WindowObserver> observed_windows_; 96 ScopedObserver<aura::Window, aura::WindowObserver> observed_windows_;
100 97
101 DISALLOW_COPY_AND_ASSIGN(ShellWindowLauncherItemController); 98 DISALLOW_COPY_AND_ASSIGN(ShellWindowLauncherItemController);
102 }; 99 };
103 100
104 #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