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

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

Issue 23606016: Refactor LauncherItemController and LauncherItemDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix for LauncherTest and observing LauncherModel in DelegateManager Created 7 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 (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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 void AddShellWindow(apps::ShellWindow* shell_window, 48 void AddShellWindow(apps::ShellWindow* shell_window,
49 ash::LauncherItemStatus status); 49 ash::LauncherItemStatus status);
50 50
51 void RemoveShellWindowForWindow(aura::Window* window); 51 void RemoveShellWindowForWindow(aura::Window* window);
52 52
53 void SetActiveWindow(aura::Window* window); 53 void SetActiveWindow(aura::Window* window);
54 54
55 const std::string& app_launcher_id() const { return app_launcher_id_; } 55 const std::string& app_launcher_id() const { return app_launcher_id_; }
56 56
57 // LauncherItemController 57 // LauncherItemController overrides:
58 virtual string16 GetTitle() OVERRIDE;
59 virtual bool IsCurrentlyShownInWindow(aura::Window* window) const OVERRIDE; 58 virtual bool IsCurrentlyShownInWindow(aura::Window* window) const OVERRIDE;
60 virtual bool IsOpen() const OVERRIDE; 59 virtual bool IsOpen() const OVERRIDE;
61 virtual bool IsVisible() const OVERRIDE; 60 virtual bool IsVisible() const OVERRIDE;
62 virtual void Launch(int event_flags) OVERRIDE; 61 virtual void Launch(int event_flags) OVERRIDE;
63 virtual void Activate() OVERRIDE; 62 virtual void Activate() OVERRIDE;
64 virtual void Close() OVERRIDE; 63 virtual void Close() OVERRIDE;
65 virtual void Clicked(const ui::Event& event) OVERRIDE;
66 virtual void OnRemoved() OVERRIDE {} 64 virtual void OnRemoved() OVERRIDE {}
67 virtual ChromeLauncherAppMenuItems GetApplicationList( 65 virtual ChromeLauncherAppMenuItems GetApplicationList(
68 int event_flags) OVERRIDE; 66 int event_flags) OVERRIDE;
67 virtual void ItemSelected(const ui::Event& eent) OVERRIDE;
68 virtual base::string16 GetTitle() OVERRIDE;
69 virtual ui::MenuModel* CreateContextMenu(
70 aura::RootWindow* root_window) OVERRIDE;
71 virtual ash::LauncherMenuModel* CreateApplicationMenu(
72 int event_flags) OVERRIDE;
73 virtual bool IsDraggable() OVERRIDE;
74 virtual bool ShouldShowTooltip() OVERRIDE;
69 75
70 // aura::WindowObserver 76 // aura::WindowObserver
71 virtual void OnWindowPropertyChanged(aura::Window* window, 77 virtual void OnWindowPropertyChanged(aura::Window* window,
72 const void* key, 78 const void* key,
73 intptr_t old) OVERRIDE; 79 intptr_t old) OVERRIDE;
74 80
75 // Get the number of running applications/incarnations of this. 81 // Get the number of running applications/incarnations of this.
76 size_t shell_window_count() const { return shell_windows_.size(); } 82 size_t shell_window_count() const { return shell_windows_.size(); }
77 83
78 // Activates the window at position |index|. 84 // Activates the window at position |index|.
(...skipping 18 matching lines...) Expand all
97 // AppLauncherItemController for each |app_launcher_id_|. 103 // AppLauncherItemController for each |app_launcher_id_|.
98 const std::string app_launcher_id_; 104 const std::string app_launcher_id_;
99 105
100 // Scoped list of observed windows (for removal on destruction) 106 // Scoped list of observed windows (for removal on destruction)
101 ScopedObserver<aura::Window, aura::WindowObserver> observed_windows_; 107 ScopedObserver<aura::Window, aura::WindowObserver> observed_windows_;
102 108
103 DISALLOW_COPY_AND_ASSIGN(ShellWindowLauncherItemController); 109 DISALLOW_COPY_AND_ASSIGN(ShellWindowLauncherItemController);
104 }; 110 };
105 111
106 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_SHELL_WINDOW_LAUNCHER_ITEM_CONTROLLER_ H_ 112 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_SHELL_WINDOW_LAUNCHER_ITEM_CONTROLLER_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698