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

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

Issue 23534022: Handling browser item status in BrowserShortcutLauncherItemController (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CreateAppAndBrowserState() 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_BROWSER_STATUS_MONITOR_H_ 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_BROWSER_STATUS_MONITOR_H_
6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_BROWSER_STATUS_MONITOR_H_ 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_BROWSER_STATUS_MONITOR_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 int index, 72 int index,
73 TabStripModelObserver::TabChangeType change_type) OVERRIDE; 73 TabStripModelObserver::TabChangeType change_type) OVERRIDE;
74 virtual void TabReplacedAt(TabStripModel* tab_strip_model, 74 virtual void TabReplacedAt(TabStripModel* tab_strip_model,
75 content::WebContents* old_contents, 75 content::WebContents* old_contents,
76 content::WebContents* new_contents, 76 content::WebContents* new_contents,
77 int index) OVERRIDE; 77 int index) OVERRIDE;
78 78
79 private: 79 private:
80 typedef std::map<Browser*, std::string> BrowserToAppIDMap; 80 typedef std::map<Browser*, std::string> BrowserToAppIDMap;
81 81
82 // Update app state for |contents|. 82 // Update app state for |contents| and browser state.
83 void UpdateAppState(content::WebContents* contents); 83 void UpdateAppAndBrowserState(content::WebContents* contents);
84
85 // A shortcut to call the BrowserShortcutLauncherItemController's
86 // UpdateBrowserItemState().
87 void UpdateBrowserItemState();
84 88
85 ChromeLauncherController* launcher_controller_; 89 ChromeLauncherController* launcher_controller_;
86 90
87 // Hold all observed activation clients. 91 // Hold all observed activation clients.
88 ScopedObserverWithDuplicatedSources<aura::client::ActivationClient, 92 ScopedObserverWithDuplicatedSources<aura::client::ActivationClient,
89 aura::client::ActivationChangeObserver> observed_activation_clients_; 93 aura::client::ActivationChangeObserver> observed_activation_clients_;
90 94
91 // Hold all observed root windows. 95 // Hold all observed root windows.
92 ScopedObserver<aura::Window, aura::WindowObserver> observed_root_windows_; 96 ScopedObserver<aura::Window, aura::WindowObserver> observed_root_windows_;
93 97
94 BrowserToAppIDMap browser_to_app_id_map_; 98 BrowserToAppIDMap browser_to_app_id_map_;
95 99
96 DISALLOW_COPY_AND_ASSIGN(BrowserStatusMonitor); 100 DISALLOW_COPY_AND_ASSIGN(BrowserStatusMonitor);
97 }; 101 };
98 102
99 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_BROWSER_STATUS_MONITOR_H_ 103 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_BROWSER_STATUS_MONITOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698