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

Unified Diff: chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h

Issue 2894443002: arc: Set custom icon in shelf for ARC apps. (Closed)
Patch Set: comments addressed Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h
diff --git a/chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h b/chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h
index 0c7b1eabf060a9122ef3abb90b693cb2084aed3b..13f5e31a1a0d69f1bb77543dd39abeed925d3723 100644
--- a/chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h
+++ b/chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h
@@ -60,14 +60,15 @@ class AppWindowLauncherItemController : public ash::ShelfItemDelegate,
// Activates the window at position |index|.
void ActivateIndexedApp(size_t index);
+ // Called when launcher item may need to be updated, for example label or
msw 2017/05/18 22:03:39 optional nit: s/for example/eg./ for one-liner.
khmel 2017/05/18 22:40:02 Done.
+ // icon.
+ virtual void UpdateLauncherItem() {}
msw 2017/05/18 22:03:39 This should be replaced by OnWindowPropertyChanged
khmel 2017/05/18 22:40:02 I added TODO. This sounds as good point. I can do
+
const WindowList& windows() const { return windows_; }
protected:
explicit AppWindowLauncherItemController(const ash::ShelfID& shelf_id);
- // Called when app window is removed from controller.
- virtual void OnWindowRemoved(ui::BaseWindow* window) {}
-
// Returns the action performed. Should be one of SHELF_ACTION_NONE,
// SHELF_ACTION_WINDOW_ACTIVATED, or SHELF_ACTION_WINDOW_MINIMIZED.
ash::ShelfAction ShowAndActivateOrMinimize(ui::BaseWindow* window);
@@ -79,6 +80,9 @@ class AppWindowLauncherItemController : public ash::ShelfItemDelegate,
ash::ShelfAction ActivateOrAdvanceToNextAppWindow(
ui::BaseWindow* window_to_show);
+ // Returns last active window in the controller or first window.
+ ui::BaseWindow* GetLastActiveWindow();
+
private:
WindowList::iterator GetFromNativeWindow(aura::Window* window);
@@ -86,6 +90,8 @@ class AppWindowLauncherItemController : public ash::ShelfItemDelegate,
WindowList windows_;
// Pointer to the most recently active app window
+ // TODO(khmel): Get rid of |last_active_window_| and provide more reliable
+ // way to determine active window.
ui::BaseWindow* last_active_window_ = nullptr;
// Scoped list of observed windows (for removal on destruction)

Powered by Google App Engine
This is Rietveld 408576698