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

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

Issue 2545923004: Remove LauncherItemController::type; use ShelfItems::type. (Closed)
Patch Set: Rebase; remove new LauncherItemController::TYPE_APP check. Created 4 years 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_APP_WINDOW_LAUNCHER_ITEM_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_APP_WINDOW_LAUNCHER_ITEM_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_APP_WINDOW_LAUNCHER_ITEM_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_APP_WINDOW_LAUNCHER_ITEM_CONTROLLER_H_
7 7
8 #include <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 10
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 // Get the number of running applications/incarnations of this. 64 // Get the number of running applications/incarnations of this.
65 size_t window_count() const { return windows_.size(); } 65 size_t window_count() const { return windows_.size(); }
66 66
67 // Activates the window at position |index|. 67 // Activates the window at position |index|.
68 void ActivateIndexedApp(size_t index); 68 void ActivateIndexedApp(size_t index);
69 69
70 const WindowList& windows() const { return windows_; } 70 const WindowList& windows() const { return windows_; }
71 71
72 protected: 72 protected:
73 AppWindowLauncherItemController(Type type, 73 AppWindowLauncherItemController(const std::string& app_id,
74 const std::string& app_id,
75 const std::string& launch_id, 74 const std::string& launch_id,
76 ChromeLauncherController* controller); 75 ChromeLauncherController* controller);
77 76
78 // Called when app window is removed from controller. 77 // Called when app window is removed from controller.
79 virtual void OnWindowRemoved(ui::BaseWindow* window) {} 78 virtual void OnWindowRemoved(ui::BaseWindow* window) {}
80 79
81 // Returns the action performed. Should be one of kNoAction, 80 // Returns the action performed. Should be one of kNoAction,
82 // kExistingWindowActivated, or kExistingWindowMinimized. 81 // kExistingWindowActivated, or kExistingWindowMinimized.
83 ash::ShelfItemDelegate::PerformedAction ShowAndActivateOrMinimize( 82 ash::ShelfItemDelegate::PerformedAction ShowAndActivateOrMinimize(
84 ui::BaseWindow* window); 83 ui::BaseWindow* window);
(...skipping 14 matching lines...) Expand all
99 // Pointer to the most recently active app window 98 // Pointer to the most recently active app window
100 ui::BaseWindow* last_active_window_ = nullptr; 99 ui::BaseWindow* last_active_window_ = nullptr;
101 100
102 // Scoped list of observed windows (for removal on destruction) 101 // Scoped list of observed windows (for removal on destruction)
103 ScopedObserver<aura::Window, aura::WindowObserver> observed_windows_; 102 ScopedObserver<aura::Window, aura::WindowObserver> observed_windows_;
104 103
105 DISALLOW_COPY_AND_ASSIGN(AppWindowLauncherItemController); 104 DISALLOW_COPY_AND_ASSIGN(AppWindowLauncherItemController);
106 }; 105 };
107 106
108 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_APP_WINDOW_LAUNCHER_ITEM_CONTROLLER_H_ 107 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_APP_WINDOW_LAUNCHER_ITEM_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698